@Hellis81 wrote:
I want an automation that triggers when I switch source on the receiver.
When you switch between two sources it’s not uncommon that the volume is too high for the source you switch too.What can I do to trigger on the attribute source change?
trigger: - platform: template value_template: '{{ states.media_player.yamaha_receiver.attributes.source }}' condition: - condition: state entity_id: media_player.yamaha_receiver state: 'On' - condition: template value_template: '{{ states.media_player.yamaha_receiver.attributes.volume_level > 0.72 }}' action: - data: volume_level: 0.65 entity_id: media_player.yamaha_receiver service: media_player.volume_set
The attribute source has the following options so making one automation per change is not really ideal:
source_list: AUDIO, AV1, AV2, AV3, AV4, AV5, AV6, AirPlay, HDMI1, HDMI2, HDMI3, HDMI4, NET RADIO, SERVER, TUNER, USB, V-AUX, iPod (USB)
Posts: 2
Participants: 2