1
0
ansible-home-assistant/roles/automations/files/office-keylight-button.yaml

100 lines
2.5 KiB
YAML
Raw Normal View History

2023-08-18 19:04:28 +00:00
- id: office_keylight_button_toggle
alias: '[Office] Keylight button toggle'
mode: single
trigger:
- device_id: 800c754de6e6b10259f371adc123b909
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: light.toggle
data: { }
target:
entity_id: light.elgato_gw33l1a00453
- id: office_keylight_button_brightness_up
alias: '[Office] Keylight button brightness up'
mode: single
trigger:
- device_id: 800c754de6e6b10259f371adc123b909
domain: zha
platform: device
type: remote_button_short_press
subtype: dim_up
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: light.turn_on
data:
brightness_step_pct: 10
target:
entity_id: light.elgato_gw33l1a00453
- id: office_keylight_button_brightness_down
alias: '[Office] Keylight button brightness down'
mode: single
trigger:
- device_id: 800c754de6e6b10259f371adc123b909
domain: zha
platform: device
type: remote_button_short_press
subtype: dim_down
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: light.turn_on
data:
brightness_step_pct: -10
target:
entity_id: light.elgato_gw33l1a00453
- id: office_keylight_button_left
alias: '[Office] Keylight button left'
mode: single
trigger:
- device_id: 800c754de6e6b10259f371adc123b909
domain: zha
platform: device
type: remote_button_short_press
subtype: left
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: light.turn_on
data_template:
color_temp: "{{ state_attr('light.elgato_gw33l1a00453', 'color_temp')|int - 10}}"
target:
entity_id: light.elgato_gw33l1a00453
- id: office_keylight_button_right
alias: '[Office] Keylight button right'
mode: single
trigger:
- device_id: 800c754de6e6b10259f371adc123b909
domain: zha
platform: device
type: remote_button_short_press
subtype: right
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: light.turn_on
data_template:
color_temp: "{{ state_attr('light.elgato_gw33l1a00453', 'color_temp')|int + 10}}"
target:
entity_id: light.elgato_gw33l1a00453