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