1
0
ansible-home-assistant/configuration/automations/bedroom-bed-button.yaml
2021-07-06 08:52:04 +02:00

61 lines
1.8 KiB
YAML

- 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