Add bedroom bed button
This commit is contained in:
parent
fdcf0ff92b
commit
0f9a0489dc
60
configuration/automations/bedroom-bed-button.yaml
Normal file
60
configuration/automations/bedroom-bed-button.yaml
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
- id: bedroom-bed-lamp
|
||||||
|
alias: '[Bedroom] Bed Button Lamp'
|
||||||
|
trigger:
|
||||||
|
- device_id: 0d584dbfe721e00880b38c4dfc1c108e
|
||||||
|
domain: zha
|
||||||
|
platform: device
|
||||||
|
type: remote_button_short_press
|
||||||
|
subtype: turn_off
|
||||||
|
action:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: light.bed_lamp
|
||||||
|
state: 'on'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.bed_lamp
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.bed_lightstrip
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.bedroom_lights
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: light.bed_lamp
|
||||||
|
state: 'off'
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_select.home_mode
|
||||||
|
state: Night
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.bed_lamp
|
||||||
|
data:
|
||||||
|
brightness_pct: 10
|
||||||
|
kelvin: 2000
|
||||||
|
default:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.bed_lamp
|
||||||
|
data:
|
||||||
|
brightness_pct: 30
|
||||||
|
kelvin: 3200
|
||||||
|
|
||||||
|
- id: bedroom-bed-sleep
|
||||||
|
alias: '[Bedroom] Bed Sleep'
|
||||||
|
trigger:
|
||||||
|
- device_id: 0d584dbfe721e00880b38c4dfc1c108e
|
||||||
|
domain: zha
|
||||||
|
platform: device
|
||||||
|
type: remote_button_short_press
|
||||||
|
subtype: turn_on
|
||||||
|
condition:
|
||||||
|
- condition: not
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_select.home_mode
|
||||||
|
state: Away
|
||||||
|
action:
|
||||||
|
- service: script.good_night
|
Loading…
Reference in New Issue
Block a user