I’ve got a problem I can’t find a solution for. Let’s start with an example to explain the problem.
I’ve got a light device (just an on/off property). I’d like to have a flow executed only if the light has been switched on outside of a Homey flow (e.g. with a light switch in the wall connected with this device).
To achieve this I:
- Prepare a Boolean variable auto_turn_on = false
- Create first flow (named X):
a. WHEN this light turns ON
b. AND auto_turn_on = false
c. THEN send me a notification
- I create the second flow (named Y):
a. WHEN this flow is started
b. AND this light is OFF
i) auto_turn_on = true
II) turn on this light
iii) auto_turn_on = false with delay e.g. 3 seconds
If the cards would be executed in this order, then eveytime I run flow Y, flow X shouldn’t send me a notification. The notification should be only executed if the light has been turned on outside flow Y. But it looks like it’s different. Sometimes I do get a notification after I execute flow Y. It looks like the light is turned on before the variable is set to true. Is there any possibility to be sure in which order the cards are executed? Or any other idea how to achieve what I try to do (execute some action only if the device state was not changed by another flow)?