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