09-12-2023 10:48 AM
Hello all!
I've been playing around with the new automation script editor and it's been a fun time!
I've recently set up an automation that when I arm my security system it turns off various devices, turns on our bedroom TV and our nightstand lamps.
When the bedroom TV turns on that kicks off another routine that is intended to be a "wind-down". It will wait for 5 minutes, then turn the lamps to 25% brightness, another 5 and to 10% brightness, another 5 and to 1%, and then finally after another 5 minutes it turns the lamps off. Then after about an hour the TV turns off.
This all works except for one case I've discovered: If I turn off one of the lamps before the routine turns it off, when it runs the next brightness command, it turns the lamp back on.
This is not my intended behavior. Ideally I would like the lamp to stay off if we manually turn it off. This could happen because maybe I want my lamp off or my wife's lamp is bothering her (or whatever reason). Is there anyway to check device state during actions (almost like a nested condition in an action?) so that it's essentially an if statement? Basically: if lamp off, don't run the brightness action
I am using the BrightnessAbsolute command, would BrightnessRelative be the better option? I wasn't sure what the difference was since the documentation pages for those commands don't really sate the difference between them.
Any help would be appreciated, thanks!
Answered! Go to the Recommended Answer.
09-12-2023 01:28 PM - edited 09-14-2023 10:50 AM
I think I may have figured out a solution to this in a different thread.
The link for that is here: https://www.googlenestcommunity.com/t5/Home-Automation/Starter-gt-condition1-gt-action1-gt-condition...
-----EDIT: MORE INFORMATION BELOW-----
I wanted to edit this reply to say that I found out some other ways to achieve what I was looking for. The key points are:
# ---- TV STARTERS ---- #
# ---- TV SLEEP TIMER ---- #
- name: TV Sleep Timer
starters:
- type: device.state.OnOff
state: on
is: true
device: Master bedroom Roku - Master Bedroom
for: 1 hour 30 min
I hope all this information helps some of you out! Please let me know if you have any questions, I'm happy to help if I can.
09-12-2023 01:28 PM - edited 09-14-2023 10:50 AM
I think I may have figured out a solution to this in a different thread.
The link for that is here: https://www.googlenestcommunity.com/t5/Home-Automation/Starter-gt-condition1-gt-action1-gt-condition...
-----EDIT: MORE INFORMATION BELOW-----
I wanted to edit this reply to say that I found out some other ways to achieve what I was looking for. The key points are:
# ---- TV STARTERS ---- #
# ---- TV SLEEP TIMER ---- #
- name: TV Sleep Timer
starters:
- type: device.state.OnOff
state: on
is: true
device: Master bedroom Roku - Master Bedroom
for: 1 hour 30 min
I hope all this information helps some of you out! Please let me know if you have any questions, I'm happy to help if I can.