95 lines
3.0 KiB
YAML
95 lines
3.0 KiB
YAML
- id: button-computer-cave-living-room-table
|
|
alias: '[Computer Cave] Living Room Table'
|
|
trigger:
|
|
- device_id: 5b972523e427721ec88e095994f7cc16
|
|
domain: zha
|
|
platform: device
|
|
type: remote_button_short_press
|
|
subtype: turn_on
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: light.table_lamp
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_off
|
|
entity_id: light.table_lamp
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: light.table_lamp
|
|
state: 'off'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.sleep_mode
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_on
|
|
entity_id: light.table_lamp
|
|
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.table_lamp
|
|
data:
|
|
brightness_pct: 100
|
|
kelvin: 3200
|
|
mode: single
|
|
|
|
- id: button-computer-cave-desk
|
|
alias: '[Computer Cave] Button Desk'
|
|
trigger:
|
|
- device_id: 5b972523e427721ec88e095994f7cc16
|
|
domain: zha
|
|
platform: device
|
|
type: remote_button_short_press
|
|
subtype: turn_off
|
|
action:
|
|
- service: light.turn_off
|
|
data:
|
|
entity_id: light.desk_lightbar
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: light.desk_lightbar
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_off
|
|
entity_id: light.desk_lightbar
|
|
- service: light.turn_off
|
|
entity_id: light.desk_lightbar_ambilight
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: light.desk_lightbar
|
|
state: 'off'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.sleep_mode
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_on
|
|
entity_id: light.desk_lightbar
|
|
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.desk_lightbar
|
|
data:
|
|
brightness_pct: 100
|
|
kelvin: 3200
|
|
mode: single
|