123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- alias: Floppy Player
- description: ""
- trigger:
- - platform: state
- entity_id:
- - sensor.floppy_player_current_disc_id
- id: disc_changed
- - platform: state
- entity_id:
- - sensor.floppy_player_device_status
- id: EJECT
- to: EJECT
- - platform: state
- entity_id:
- - sensor.floppy_player_device_status
- id: PLAY
- to: PLAY
- enabled: true
- - platform: state
- entity_id:
- - sensor.floppy_player_device_status
- id: PAUSE
- to: PAUSE
- enabled: true
- - platform: state
- entity_id:
- - sensor.floppy_player_device_status
- id: SKIP
- to: SKIP
- enabled: true
- - platform: state
- entity_id:
- - sensor.floppy_player_device_status
- id: RADIO
- to: RADIO
- enabled: true
- condition: []
- action:
- - if:
- - condition: trigger
- id:
- - disc_changed
- then:
- - service: media_player.play_media
- data:
- media_content_id: "{{ states('sensor.floppy_player_current_disc_id') | string }}"
- media_content_type: "{{ states('sensor.floppy_player_current_disc_type') | string }}"
- target:
- entity_id: media_player.ytube_music_player
- - if:
- - condition: trigger
- id:
- - EJECT
- then:
- - service: media_player.media_stop
- target:
- entity_id: media_player.ytube_music_player
- data: {}
- - if:
- - condition: trigger
- id:
- - PLAY
- - PAUSE
- then:
- - service: media_player.media_play_pause
- target:
- entity_id:
- - media_player.ytube_music_player
- data: {}
- - if:
- - condition: trigger
- id:
- - SKIP
- then:
- - service: media_player.media_next_track
- target:
- entity_id:
- - media_player.ytube_music_player
- data: {}
- - if:
- - condition: trigger
- id:
- - RADIO
- then:
- - alias: RadioOnSong
- sequence:
- - service: media_player.play_media
- data:
- media_content_id: |
- {{state_attr("media_player.ytube_music_player","videoId") }}
- media_content_type: vid_channel
- entity_id: media_player.ytube_music_player
- mode: single
|