This is actually a set of rules that control the automations in my master bedroom. See post #50 above for a link to a file where you can see all of my rules. But, I thought I would put these out here for y’all to see. I’d like some comments on how I can improve these. I’ve found a flaw that I’m trying to work around right now.
Goal of the Automations:
- Bed room lights turn on upon entering room. Different lights will be at different levels based on the current mode.
- All automations stop when my wife is using her pump
- All automations stop when my wife is in bed (usually before me) and set lights to custom level for her.
- All automations are easy to edit and quick to change. I do not want to change every rule just to make one change in the system.
Rule One - Master Bedroom Lights On/Off - This is the rule that triggers the lights on and off. It does this by telling the other rules to turn on and off. It is the heart of my bedroom automations. I think of it as the hub in a wheel. The other rules are spokes. This one is also where the override switches work. I turn on an override switch for this one rule, and everything shuts down.
Something to note about this rule. This rule becomes true when the motion sensor fires. That sensor resets after 15 seconds of no motion. The spoke rules determine how long the lights stay on. Every time motion is detected, the spoke rules are reset. I wanted the automation to be put on hold while my wife’s pumping. The problem with using an override switch is that the rules kept having to be jump started after the switch was turned off. This is how I got around that…
This rule becomes true when the pump goes above 1 watt. It stays true until the pump turns off. This keeps the spoke rules true until the pump turns off. The motion sensor still picks up motion, but since the rule never change truth state with the pump on, all automation are halted, and immediately restarted when the pump goes off. (This is my favorite part of all of this) @bravenel you might like this part too!
These rules are all of the mode rules. They determine which lights and what levels they are set at.
This rule is for when my wife wants to shut down the automations and take a nap, or put the baby down for sleep…
This rule turns everything off when we leave the house.
Now that I’ve written this I realize I’m missing a rule. I need to create one that turns the lights on if the house is in sleep mode and we arrive during that mode. (kids went to bed before we got home).
Also the flaw. I just remembered, I fixed the flaw by adjusting one of the rules.
With my rules set up this way I can add new scenarios to the room without rewriting a bunch of rules. I just create the new scene rule and add it to the On/Off rule.
Opinions? Remarks? Do you see any flaws or ways to improve this? Thanks.
Oh yeah, I forgot. Along with the automations the room is completely controlled by its own Amazon Echo and 2 minimotes.
**** And now thanks to @bravenel updating the capture/restore bug I am setting up the minimotes to do mood lighting scenes at the touch of a button!!!