1
0
ansible-home-assistant/automations/computer-button.yaml
2021-05-24 20:26:03 +02:00

58 lines
1.4 KiB
YAML

- id: button-computer-cave-on
alias: '[Computer Cave] Button On'
trigger:
- device_id: 5b972523e427721ec88e095994f7cc16
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
action:
- service: light.turn_on
data:
entity_id: light.desk_lightbar
mode: single
- id: button-computer-cave-off
alias: '[Computer Cave] Button Off'
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
mode: single
- id: button-computer-cave-hold-on
alias: '[Computer Cave] Button Hold On'
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: 5b972523e427721ec88e095994f7cc16
command: move_with_on_off
action:
- service: light.turn_on
data:
entity_id: light.tv_lights
mode: single
- id: button-computer-cave-hold-off
alias: '[Computer Cave] Button Hold Off'
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: 5b972523e427721ec88e095994f7cc16
command: move
args:
- 1
- 83
action:
- service: light.turn_off
data:
entity_id: light.tv_lights
mode: single