Hello, I am new to Apilio and am not sure if I am doing things right…
For boolean variables that are always true and matching conditions that use a timeout to only be true for a certain amount of time, what is the best way to evaluate if the condition has become false? The use case is similar to the examples that use motion detectors that only send a true condition.
I currently use a logic block the uses an OR condition with several other booleans and then performs the desired action when the entire block evaluates to false. I end up doing this because NOT is not supported for complex conditions for the logic block and one cannot create a condition that checks the value of another condition that has a delay. Simplified example:
If OR(lights_paused, lights_are_off,motion_detected)
True: Do nothing
IF NOT WERE SUPPORTED:
If AND(NOT(lights_paused) ,NOT(lights_are_off),NOT(motion_detected)
Flase: Do nothing
IF CONDITIONS COULD CHECK OTHER CONDITIONS:
False: Do nothing
I ask this mostly from a code readability point of view and in anticipation of writing more complex conditions. To me, the logic seems clearest in the last block above if we could use conditions to check the state of other conditions in the context of a timeout. Or perhaps I’m going about this all wrong.
Perhaps if we could comment our code/logic blocks if the logic seems not straightforward, that would be a simple fix.
Thanks for your time.