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,6 +7,33 @@
|
|||||||
type: remote_button_short_press
|
type: remote_button_short_press
|
||||||
subtype: turn_on
|
subtype: turn_on
|
||||||
action:
|
action:
|
||||||
|
- service: media_player.media_play_pause
|
||||||
|
target:
|
||||||
|
entity_id: media_player.bathroom
|
||||||
|
mode: single
|
||||||
|
|
||||||
|
- id: bathroom-mirror-lights-off
|
||||||
|
alias: '[Bathroom] Mirror Button Lights toggle'
|
||||||
|
trigger:
|
||||||
|
- device_id: 4d5298037e93ba11438409bff01b5005
|
||||||
|
domain: zha
|
||||||
|
platform: device
|
||||||
|
type: remote_button_short_press
|
||||||
|
subtype: turn_off
|
||||||
|
action:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- 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:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -29,22 +56,3 @@
|
|||||||
brightness_pct: 100
|
brightness_pct: 100
|
||||||
kelvin: 3200
|
kelvin: 3200
|
||||||
mode: single
|
mode: single
|
||||||
|
|
||||||
- id: bathroom-mirror-lights-off
|
|
||||||
alias: '[Bathroom] Mirror Button Off'
|
|
||||||
trigger:
|
|
||||||
- device_id: 4d5298037e93ba11438409bff01b5005
|
|
||||||
domain: zha
|
|
||||||
platform: device
|
|
||||||
type: remote_button_short_press
|
|
||||||
subtype: turn_off
|
|
||||||
- platform: state
|
|
||||||
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
||||||
for: '0:05:00'
|
|
||||||
from: 'on'
|
|
||||||
to: 'off'
|
|
||||||
action:
|
|
||||||
- service: light.turn_off
|
|
||||||
data:
|
|
||||||
entity_id: light.bathroom_mirror_lights
|
|
||||||
mode: single
|
|
||||||
|
Loading…
Reference in New Issue
Block a user