Add desk switch

This commit is contained in:
2020-05-12 23:24:26 +03:00
parent 218f17e5d6
commit 00d8fef34e
4 changed files with 56 additions and 0 deletions
@@ -0,0 +1,38 @@
automation:
- alias: Lighting · Living Room · Toggle ceiling lights on desk switch single click
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret desk_switch_ieee
command: single
action:
- service: light.toggle
data_template:
entity_id: light.living_room_ceiling
brightness_pct: >-
{% if is_state('input_select.house_mode', 'night') %}
40
{% else %}
100
{% endif %}
- alias: Lighting · Living Room · Toggle ambient lights on desk switch double click
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret desk_switch_ieee
command: double
action:
- service: light.toggle
data_template:
entity_id: light.living_room_ambient
brightness_pct: >-
{% if is_state('input_select.house_mode', 'night') %}
40
{% else %}
100
{% endif %}