Lua action on change of svalue
Posted: Saturday 25 November 2017 22:55
Hi, I am trying to switch everything off in my house when I switch on the alarm to away mode, also the heating switches to a fixed setpoint, and when disarming the heating switches back to program, this all works, but the problem is when I have the alarm switched off but for some reason I want to change the heating to manual, I can't because the Lua script is blocking it. How do i make this to be a single command and not continuous? Is there a function for flank detection? (Rising trigger)
I don't understand the explanation in the standard lua script:
-- device changed contains state and svalues for the device that changed.
-- devicechanged['yourdevicename'] = state
-- devicechanged['svalues'] = svalues string
if devicechanged['alarmon'] == "on" then... would work on a switch device but this device only has svalue so does not work, but how do i use the svalue?
I have it now as the screenshot, but then it is always blocking when the alarm is switched off
I don't understand the explanation in the standard lua script:
-- device changed contains state and svalues for the device that changed.
-- devicechanged['yourdevicename'] = state
-- devicechanged['svalues'] = svalues string
if devicechanged['alarmon'] == "on" then... would work on a switch device but this device only has svalue so does not work, but how do i use the svalue?
I have it now as the screenshot, but then it is always blocking when the alarm is switched off