Hi, I’m pretty new to HA, I’d like to setup a button that when pressed, starts a timer to turn my TV off. Specifically if I should fall asleep while watching.
I see there are a few ways to do this but I’m trying to start doing it the most efficient way from the get go so suggestions would be very helpful.
If you want full control of the timer (see the duration, pause, cancel, etc.) a timer helper would be my first choice. You can create one in the helpers section in the GUI.
When it runs out, an event is emitted that you can react to:
alias: Turn of tv
description: ""
triggers:
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.tv_off
conditions: []
actions:
- action: media_player.turn_off
target:
entity_id: media_player.android_tv
data: {}
mode: single