diff --git a/configuration/automations/bathroom-music-button.yaml b/configuration/automations/bathroom-music-button.yaml index 60a953a..f7b4f78 100644 --- a/configuration/automations/bathroom-music-button.yaml +++ b/configuration/automations/bathroom-music-button.yaml @@ -1,6 +1,5 @@ - id: bathroom-music-button-next alias: '[Bathroom] Music button - next' - description: '' mode: single trigger: - device_id: e233cdffb05076ad7bb049581ffa8c9c @@ -22,9 +21,34 @@ target: entity_id: media_player.bathroom +- id: bathroom-music-play-playlist + alias: '[Bathroom] Play playlist' + mode: single + trigger: + - device_id: e233cdffb05076ad7bb049581ffa8c9c + domain: zha + platform: device + type: remote_button_long_press + subtype: button + - device_id: ea9d3cc90cf5da1108925e50489efce9 + domain: zha + platform: device + type: remote_button_alt_long_press + subtype: button_2 + action: + - service: media_player.shuffle_set + entity_id: media_player.bathroom + data: + shuffle: true + - service: media_player.play_media + target: + entity_id: media_player.bathroom + data: + media_content_id: "{{ states('input_text.bathroom_playlist') }}" + media_content_type: music + - id: bathroom-music-button-play alias: '[Bathroom] Music button - play' - description: '' mode: single trigger: - device_id: e233cdffb05076ad7bb049581ffa8c9c