I would like to make a automation that turns ofg a Philips Hue light after 5 minutes. I have no idea how to start, I am quite new to home assistant.
Thanks in advance!
I would like to make a automation that turns ofg a Philips Hue light after 5 minutes. I have no idea how to start, I am quite new to home assistant.
Thanks in advance!
in an automation you will have a trigger that will turn on the lights.
in the action of the automation you will do something like:
You can also just have an automation that looks to see if a light has been in for 20 and then turns it off.
Like this one.
https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/automation/System/watchdog_light.yaml
Thanks for replying! I will test it out when I get home from work. It look like it is going to work.
I guess you wanted this automation in case of power fluctuation and you have the gen 1 hue bulbs. I’m using this one:
No, it is a hue light in the closet that is left on and forgotten with the door closet. I wanted to know if there was a solution for it.
Thanks for the response!
It does not seem to work. i changed it to:
- alias: Automated Light WatchDog!
trigger:
- platform: state
entity_id:
- light.iris
state: ‘on’
for: ‘00:01:00’ #1 minute for testing
Turn it off!
action:
- service: light.turn_off
data:
entity_id: lights.iris
When posting logs or configuration snippets please use code blocks and syntax highlighting.
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting
I found a solution!
I now have it configured like this.
- alias: Automated Light WatchDog!
trigger:
- platform: state
entity_id:
- light.iris
state: ‘on’
for: ‘00:02:00’
action:
- service: light.turn_off
entity_id: light.iris