My TV needs about 10 seconds before it can change sources (from TV to Netflix for example), but the change is instantaneous if the TV is already on.
So I want to have a condition that check if the TV is off, and if this is the case to turn on and wait 10 seconds before changing source. But I want no delay if the TV is on.
This is my actual configuration for watching Netflix for example. The delay of 1 second is there because the Yamaha need a little time after turned on to change audio source. As this is just one second there is no problem for the delay from one to another source. With this script I need to ask the same order two times for the source to change. One time the TV turns on. After at least seconds I ask again and then the source is changes.
I´ve been trying for hours different things with no success…
Help please.
netflix:
alias: Netflix
sequence:
- entity_id: media_player.lgtv
service: media_player.turn_on
- entity_id: switch.yamaha_power
service: switch.turn_on
- delay: 00:00:01
- entity_id: media_player.lgtv
service: media_player.select_source
data:
source: Netflix
- entity_id: switch.yamaha_scene_1
service: switch.turn_on
- entity_id: script.actividades
service: script.turn_on