After extensive testing with the assistance of my kids and cats, I can finally sleep at night knowing this will now work to my family’s standards!
Surprising enough, I’ll need this setup for most of my motion sensors. Having 3 dogs, 3 cats, 2 kids, and a wife, that’s a LOT of motion in common rooms at a given time. I can totally see having some lower delay sensors not needing this, but to be honest, why? This seems to be a more fool proof method, are there downsides in any way? I’m going to apply this to my dining room and office rules now. Thank you again Adrian!
Piston Mode: Latching
If...
Upstairs Hall Motion Sensor -> motion is active
Then... (3 actions, to be clear)
@ If mode is {Home, Evening, Night}
Using Upstairs Hall Light -> Set level to {100%, 10%, 1%}
But If...
Upstairs Hall Motion Sensor -> motion is inactive
Then...
Using Upstairs Hall Light -> Wait 1 minutes - > Turn off (Cancel on piston state change)
Individual actions applied to groups run when the group evaluates true. That is the only scenario that makes sense, isn’t it? You can apply individual actions to each action and the whole group. Flexibility galore. :)))
Piston Mode: Latching
If...
Living Room Motion Sensor -> motion is active
And
Living Room Theater outlet -> power is less than 30W
And
Bloomsky -> Illuminance is less than 3600lux
Then...
Using Dining Room Light -> Turn on
But If...
Upstairs Hall Motion Sensor -> motion is inactive
Then...
Using Living Room Light -> Wait 5 minutes -> Turn off -> Turn on after 1000ms -> Wait 1 minutes -> Turn off (Cancel on piston state change)
Yes. Normal programming optimizations would never even evaluate B nor C because the end result is false due to A being false. If I used optimizations, non-programmers would be lost… So, as I said before, no logical evaluation optimizations are used. So C does get evaluated regardless of A being false, and yes, if it is true, the actions applied individually to C would execute.
Note that you can also add actions to the whole group (B AND C), which would only run if both B and C are true.
I have never used parameters for the custom commands when it was available in RM. I remember it not working when a parameter was used with the custom command.
@ady624, I can’t seem to get a Zero for the sunrise/sunset variable, it always shows as null. You commented on it before. It will take a value of 1 but not zero.
You’re probably right that the way it currently works makes more sense to the average user. As a developer, it will take a little getting used, but I’ll still be able to make things work the way I want them to so it’s not that big of a deal.
If you were able to make logical evaluation optimization an advanced feature that could be enabled, that would be great and would most likely make the pistons execute faster.
1 Like
bamarayne
(Jason "The Enabler" as deemed so by @Smart)
2237
Crap! Duh.
bamarayne
(Jason "The Enabler" as deemed so by @Smart)
2238
@ady624
This is the log with simulate on an entirely new piston (described above).