Change mirror button functions to also handle music
This commit is contained in:
parent
e1ebf5ed61
commit
76d12defa8
@ -73,3 +73,7 @@
|
|||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: light.bathroom_lights
|
entity_id: light.bathroom_lights
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.bathroom_mirror_lights
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.shower_lights
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- id: bathroom-mirror-lights-on
|
- id: bathroom-mirror-lights-on
|
||||||
alias: '[Bathroom] Mirror Lights On'
|
alias: '[Bathroom] Mirror Button Music'
|
||||||
trigger:
|
trigger:
|
||||||
- device_id: 4d5298037e93ba11438409bff01b5005
|
- device_id: 4d5298037e93ba11438409bff01b5005
|
||||||
domain: zha
|
domain: zha
|
||||||
@ -7,44 +7,52 @@
|
|||||||
type: remote_button_short_press
|
type: remote_button_short_press
|
||||||
subtype: turn_on
|
subtype: turn_on
|
||||||
action:
|
action:
|
||||||
- choose:
|
- service: media_player.media_play_pause
|
||||||
- conditions:
|
target:
|
||||||
- condition: state
|
entity_id: media_player.bathroom
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
state: 'on'
|
|
||||||
sequence:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.bathroom_mirror_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_mirror_lights
|
|
||||||
data:
|
|
||||||
brightness_pct: 100
|
|
||||||
kelvin: 3200
|
|
||||||
mode: single
|
mode: single
|
||||||
|
|
||||||
- id: bathroom-mirror-lights-off
|
- id: bathroom-mirror-lights-off
|
||||||
alias: '[Bathroom] Mirror Button Off'
|
alias: '[Bathroom] Mirror Button Lights toggle'
|
||||||
trigger:
|
trigger:
|
||||||
- device_id: 4d5298037e93ba11438409bff01b5005
|
- device_id: 4d5298037e93ba11438409bff01b5005
|
||||||
domain: zha
|
domain: zha
|
||||||
platform: device
|
platform: device
|
||||||
type: remote_button_short_press
|
type: remote_button_short_press
|
||||||
subtype: turn_off
|
subtype: turn_off
|
||||||
- platform: state
|
|
||||||
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
||||||
for: '0:05:00'
|
|
||||||
from: 'on'
|
|
||||||
to: 'off'
|
|
||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- choose:
|
||||||
data:
|
- conditions:
|
||||||
entity_id: light.bathroom_mirror_lights
|
- condition: state
|
||||||
|
entity_id: light.bathroom_mirror_lights
|
||||||
|
state: 'on'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.bathroom_mirror_lights
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: light.bathroom_mirror_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_mirror_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_mirror_lights
|
||||||
|
data:
|
||||||
|
brightness_pct: 100
|
||||||
|
kelvin: 3200
|
||||||
mode: single
|
mode: single
|
||||||
|
Loading…
Reference in New Issue
Block a user