I have several scenes that are based on Schedules, but 'tied' to a house "status". To simplify things, I'd like to use Virtual Devices (switches) to turn enable/disable them in batches.
For instance...
I have 6 Scenes for AWAY status, and 5 Scenes for VACATION status -- thus, I'd like to have one virtual device for each status, AWAY & VACATION, and have a single scene that monitors for status changes and enables/disables the proper scenes accordingly.
I was thinking something like the below code. If you can help me complete this, or have an easier way, please let me know.
thx for the help!
local VACATION=67
local AWAY=68
local AWAYmode = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", AWAY)
local VACATIONmode = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", VACATION)
if (AWAYmode == "1") then
<code to enable scenes goes here>
else
<code to disable scenes goes here>
end
if (GuestMode == "1") then
<code to enable scenes goes here>
else
<code to disable scenes goes here>
end