So I want to have a bedtime script that I trigger that does things based on over things.
So if the lights are on dim them.
If the tv is on send mute.
If door alerts are not enabled, enable them.
Was thinking it would be a python script, but as my python coding is lacking, would this be better in node red ?
Or has someone got a script I can bash my limited skills at till it does what I need ?
None of what you mention would necessarily require a complex script. What you have is just a string on on/off events. You could possibly even use a scene. Have a look at the scripts doc.
You can also have a look through the cookbook for ideas.
When you trigger âGoodnightâ the following happens:
Checks if itâs between the hours of 8pm and 5am. Aborts if not (donât want to trigger Goodnight in the middle of the day)
Checks if the front door is closed. If so, it locks it. If not, it sends an alert to my wall-mounted tablet to close and lock the door.
Checks the status of all other doors, and alerts me if any need closed.
Turns off the TV, and other misc items.
Turns off most lights in the âcommonâ areas (anywhere thatâs not a bedroom or bathroom)
Depending on what lights are on in the living room, a certain light will be dimmed for 30 before shutting off, while the rest of the living room lights are shut off immediately.
If the under-cabinet lights in the kitchen are on, theyâll be dimmed for 30 seconds before shutting off.
Sends a trigger to turn off the screens on my wall-mounted tablets.
I can check the state of input_boolean.goodnight to see if the house is in Goodnight mode, and then other automations can trigger or respond accordingly.