mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
Add desk switch
This commit is contained in:
@@ -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 %}
|
||||
@@ -20,3 +20,15 @@ script:
|
||||
entity_id: media_player.master_bedroom
|
||||
data_template:
|
||||
source: "{{ playlist | default('Evening Chill') }}"
|
||||
|
||||
automation:
|
||||
- alias: Music · Living Room · Play pause on desk switch hold
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret desk_switch_ieee
|
||||
command: hold
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
|
||||
Reference in New Issue
Block a user