Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

AV receiver state condition

$
0
0

@Umbe wrote:

Hi all,
just a simple question , i try to add in the mini media player card some buttons in order to change source , but i need to add a condition which state : if the av is on change the source to the one selected otherwise wait 10 sec(the av is turning on) and then change the source.
The following is working great , but i would avoid to wait always 10 sec to change source if the av is already on

entity: media_player.denon
hide_when_off: false
hide: name
shortcuts:
  buttons:
    - icon: 'mdi:kodi'
      id: script.denon1_kodi
      type: script
    - icon: 'mdi:bluetooth'
      id: script.denon1_bluetooth
      type: script
    - data:
        entity_id: switch.TV_Audio
      icon: 'mdi:television'
      id: script.denon1_tv
      type: script
    - data:
        entity_id: switch.internet_radio
      icon: 'mdi:radio-tower'
      id: script.denon1_internet_radio
      type: script
  columns: 4
type: 'custom:mini-media-player'


and the script

  denon1_internet_radio:
    sequence:
      - service: media_player.turn_on
        data:
          entity_id: media_player.denon  
      - delay: '00:00:10'           
      - service: media_player.select_source
        data:
          entity_id: media_player.denon
          source: 'Internet Radio'      

thanks

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>