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

59 lines
1.7 KiB
YAML
Raw Normal View History

2022-05-13 22:02:03 +00:00
- id: button-office-on
2021-10-11 18:15:50 +00:00
alias: '[Office] Button Light'
2020-12-06 19:47:20 +00:00
trigger:
- device_id: 5b972523e427721ec88e095994f7cc16
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
action:
- choose:
- conditions:
- condition: state
2021-12-14 15:09:31 +00:00
entity_id: light.office
state: 'on'
sequence:
2021-07-02 23:03:37 +00:00
- service: light.turn_off
2021-12-14 15:09:31 +00:00
entity_id: light.office
- conditions:
- condition: state
2021-12-14 15:09:31 +00:00
entity_id: light.office
state: 'off'
sequence:
2021-07-02 23:03:37 +00:00
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
2021-12-14 15:09:31 +00:00
entity_id: light.office
2021-07-02 23:03:37 +00:00
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
2021-12-14 15:09:31 +00:00
entity_id: light.office
2021-07-02 23:03:37 +00:00
data:
brightness_pct: 100
kelvin: 3200
2020-12-06 19:47:20 +00:00
mode: single
2021-05-10 10:24:31 +00:00
2022-05-13 22:02:03 +00:00
- id: button-office-off
alias: '[Office] Button WoL'
2020-12-06 19:47:20 +00:00
trigger:
- device_id: 5b972523e427721ec88e095994f7cc16
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_off
2022-05-13 22:02:03 +00:00
action:
- service: switch.turn_on
target:
entity_id: switch.hulk_wol
2020-12-06 19:47:20 +00:00
mode: single