1
0
ansible-home-assistant/configuration/automations/computer-button.yaml

56 lines
1.6 KiB
YAML

- id: button-office-table
alias: '[Office] Button Light'
trigger:
- device_id: 5b972523e427721ec88e095994f7cc16
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
action:
- choose:
- conditions:
- condition: state
entity_id: light.office
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.office
- conditions:
- condition: state
entity_id: light.office
state: 'off'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.office
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.office
data:
brightness_pct: 100
kelvin: 3200
mode: single
- id: button-office-desk
alias: '[Office] Button Desk'
trigger:
- device_id: 5b972523e427721ec88e095994f7cc16
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_off
action: []
mode: single