1
0

Update bathroom automations

fix turning on lights
  change service to call to play music
This commit is contained in:
Przemek Grondek 2021-08-11 23:57:13 +02:00
parent 4659bc42ce
commit e30d4a8d2e
3 changed files with 46 additions and 10 deletions

View File

@ -1,5 +1,5 @@
- id: button-bathroom-on - id: button-bathroom-on-off
alias: '[Bathroom] Button On' alias: '[Bathroom] Button On/Off'
trigger: trigger:
- device_id: 800c754de6e6b10259f371adc123b909 - device_id: 800c754de6e6b10259f371adc123b909
domain: zha domain: zha
@ -7,7 +7,42 @@
type: remote_button_short_press type: remote_button_short_press
subtype: turn_on subtype: turn_on
action: action:
- service: light.toggle - choose:
data: - conditions:
entity_id: light.bathroom_lights - condition: state
entity_id: light.bathroom_lights
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.bathroom_lights
- service: light.turn_off
entity_id: light.bathroom_mirror_lights
- service: light.turn_off
entity_id: light.shower_lights
- conditions:
- condition: state
entity_id: light.bathroom_lights
state: 'off'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.bathroom_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.bathroom_lights
data:
brightness_pct: 100
kelvin: 3200
mode: single mode: single

View File

@ -57,5 +57,4 @@
subtype: remote_button_short_press subtype: remote_button_short_press
action: action:
- service: media_player.media_play_pause - service: media_player.media_play_pause
target: entity_id: media_player.bathroom
entity_id: media_player.bathroom

View File

@ -16,10 +16,12 @@
entity_id: media_player.bathroom_speaker entity_id: media_player.bathroom_speaker
state: 'off' state: 'off'
action: action:
- service: spotcast.start - service: media_player.play_media
target:
entity_id: media_player.bathroom
data: data:
device_name: Bathroom speaker media_content_id: https://open.spotify.com/playlist/71mXIu6HcdVj3fAMduaHop
uri: 'spotify:playlist:71mXIu6HcdVj3fAMduaHop' media_content_type: music
- id: bathroom-music-off - id: bathroom-music-off
alias: '[Bathroom] Music Off' alias: '[Bathroom] Music Off'