I’d like to set a scene that runs every minute but only while the central heating is on. I’m having trouble with the scene wizard creating it. Can this be done.
Yes with multiple scene and Lua code.
Would be easier to install the Reactor plugin.
You can do this with a single scene.
What you need to do is easy to achieve if approached in simple steps:
- create a scene, including the actions you want to run
- add the one minute timer
- add Lua code before your code to stop the rest of the scene from running if the heating is off.
Which bit do you need help with?
Ah, I hadn’t thought of adding LUA. I was trying to add two triggers via the scene wizard.
So if I add an if statement in the LUA field that says if heating off end? Or something like that?
Yes, you’ll need to check the status of the switch, or thermostat, or whatever controls the heating, and then return
false from the scene code to abort the rest of the scene.
local x = luup.variable_get ("serviceId", "varname", devnumber) if x == “0” then return false end -- rest of your code goes here
…something like that.
Thank you very much. I’ll give that a try.