I want to be able to conditionally trigger events based on what "mode" the house is in. I want to be able to do things such as: when in "at home" mode and a door/window sensor triggers it triggers a simple announcement like "front door opened", but when in "sleeping" mode it sounds the alarm.
I've implemented a little of this by creating some scripts that get and set global variables for the mode and then using that simple api in an event script. Unfortunately doing it this way seems to mean that I have to script every event that needs to check the mode. I don't see a way to set a condition on a variable in the trigger page. Before I go a turn all my events into scripts I wanted to ask if there's a better way to do this sort of thing.
I've implemented a little of this by creating some scripts that get and set global variables for the mode and then using that simple api in an event script. Unfortunately doing it this way seems to mean that I have to script every event that needs to check the mode. I don't see a way to set a condition on a variable in the trigger page. Before I go a turn all my events into scripts I wanted to ask if there's a better way to do this sort of thing.
Comment