Help with scene triggers

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.

1 Like

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.

1 Like

Thank you very much. I’ll give that a try.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules