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
@@ -56,6 +56,9 @@ cards:
- automation.lighting_temperature_adjust_on_start
- automation.lighting_temperature_adjust_based_on_time
- type: divider
- automation.lighting_living_room_toggle_ceiling_lights_on_desk_switch_single_click
- automation.lighting_living_room_toggle_ambient_lights_on_desk_switch_double_click
- type: divider
- automation.lighting_master_bedroom_toggle_lights_on_bedside_switch_single_click
- type: divider
- automation.lighting_kitchen_day_mode_motion_turn_lights_on
@@ -92,6 +95,8 @@ cards:
- automation.youtube_download_latest_pds
- automation.media_sonos_put_beam_in_night_mode
- automation.media_sonos_put_beam_in_day_mode
- type: divider
- automation.music_living_room_play_pause_on_desk_switch_hold
- type: divider
@@ -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 %}
+12
View File
@@ -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
+1
View File
@@ -49,6 +49,7 @@ platinum_user: user
platinum_password: pass
master_bedroom_bedside_switch_ieee: 00:00:00:00:00:00:00:00
desk_switch_ieee: 00:00:00:00:00:00:00:00
magic_cube_ieee: 00:00:00:00:00:00:00:00
sonos_hosts: