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 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: {} mode: single