howartp wrote:I'm hoping Indigo 7 will allow the virtual device to call it's own on/off actions upon toggle, rather than needing a third toggle action.
Have an Insteon scene defined and attached to an action group. In my custom control page I attach the action group to my control (button) with a server action "send scene 1 (Test Scene) on". In browser preview the control will turn it on but how do I make it act like a on/off toggle?
device = indigo.devices[YOURVIRTUALDEVICEIDHERE] # the ID of your Virtual On/Off Device
variable = indigo.variables[int(device.globalProps['com.perceptiveautomation.indigoplugin.devicecollection']['statusVariable'])]
if not variable.getValue(bool):
indigo.actionGroup.execute(int(device.globalProps['com.perceptiveautomation.indigoplugin.devicecollection']['onActionGroup']))
else:
indigo.actionGroup.execute(int(device.globalProps['com.perceptiveautomation.indigoplugin.devicecollection']['offActionGroup']))
Users browsing this forum: No registered users and 5 guests