Hi all,
I am trying to make a Value changed script for an alarm system.
My goal is:
When the alarm becomes active the lights must be switched off.
This is what i have so far, but i am stuck here.
Does anyone have any experience with this?
thanks for the help in advance,
kind regards Luc Sieben
Why don’t you just put the script into the “Alarm Active” Event?
# assuming a false value turns the lights off
system.tag.writeBlocking(['[MQTT Engine]cmnd/Lamp_ingang'], [false])
Hi @Luc.Sieben, if you are using MQTT you may not be able to write to the tags to publish a value to the device topic unless all the appropriate settings are setup (depending on which modules you are using).
You may find it better to use system.cirruslink.engine.publish()
1 Like