From cdd1f592f3859aed69cdffbb5a1d89edd3e26608 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Fri, 2 Apr 2021 00:19:16 +0200 Subject: [PATCH] Setup Bathroom music button --- .../automations/bathroom-music-button.yaml | 43 +++++++++++++++++++ automations/files/configuration.yaml | 4 -- 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 automations/files/automations/bathroom-music-button.yaml diff --git a/automations/files/automations/bathroom-music-button.yaml b/automations/files/automations/bathroom-music-button.yaml new file mode 100644 index 0000000..5406ae7 --- /dev/null +++ b/automations/files/automations/bathroom-music-button.yaml @@ -0,0 +1,43 @@ +- id: bathroom-music-button-next + alias: '[Bathroom] Music button - next' + description: '' + mode: single + trigger: + - device_id: e233cdffb05076ad7bb049581ffa8c9c + domain: zha + platform: device + type: remote_button_short_press + subtype: remote_button_short_press + condition: + - condition: state + entity_id: media_player.bathroom + state: playing + action: + - service: media_player.media_next_track + target: + entity_id: media_player.bathroom + +- id: bathroom-music-button-play + alias: '[Bathroom] Music button - play' + description: '' + mode: single + trigger: + - device_id: e233cdffb05076ad7bb049581ffa8c9c + domain: zha + platform: device + type: remote_button_short_press + subtype: remote_button_short_press + condition: + - condition: not1212 + conditions: + - condition: state + entity_id: media_player.bathroom + state: playing + action: + - service: media_player.play_media + target: + entity_id: media_player.bathroom + data: + media_content_id: https://open.spotify.com/playlist/71mXIu6HcdVj3fAMduaHop + media_content_type: music + shuffle: true diff --git a/automations/files/configuration.yaml b/automations/files/configuration.yaml index 2f22eb5..9c79699 100644 --- a/automations/files/configuration.yaml +++ b/automations/files/configuration.yaml @@ -60,10 +60,6 @@ calendar: username: pgrondek password: !secret nextcloud_token -spotcast: - sp_dc: !secret spotcast_sp_dc - sp_key: !secret spotcast_sp_key - fan: # Living Room Air Purifier (3h 2019) - platform: xiaomi_miio