Hello all,
I am trying to add a condition to my yamaha automation. The automation should only be trigger when the yamaha receiver is on the correct source.
- alias: "Yamaha (off) -> Licht aus"
trigger:
platform: state
entity_id: media_player.yamahaav
to: 'off'
condition:
condition: and
conditions:
- condition: ????
entity_id: 'media_player.yamahaav'
source: 'TV'
action:
- service: scene.turn_on
entity_id: scene.tv_licht_aus
- service: shell_command.stop_hyperion
is this possible?
Daranto
diplix
(felix schwenzel)
3
you can make a source sensor an use it’s state for the condition:
sebk-666
(Sebastian)
4
I don’t know about the Yamaha platform, but I’m doing do something similar with my denon receiver (using denonavr
):
trigger:
- platform: template
value_template: "{% if is_state_attr('media_player.denon_avr', 'source', 'PhonoPre') %}true{% endif %}"
Sebastian