I want to use wait_for_trigger to make sure a device (my tv) is ready to receive a command. But I always find myself having to guard for the fact that the TV might already be ready to receive the command
- if:
- condition: state
entity_id: switch.aramathinewall_power_button
state:
- 'off'
then:
- wait_for_trigger:
- trigger: state
entity_id:
- switch.aramathinewall_power_button
from:
to:
- 'on'
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
continue_on_timeout: false
alias: wait for tv to turn on
this gets quite repetitive. Am I missing something? This is also a race condition which is bad