Add bed_led light

This commit is contained in:
2020-04-23 21:19:28 +03:00
parent 8108de9a8c
commit dac8d3d00d
14 changed files with 96 additions and 41 deletions
+1 -2
View File
@@ -12,8 +12,7 @@ group:
- automation.house_mode_set_to_night
- automation.house_mode_set_to_bed
- automation.house_mode_set_to_day
- automation.house_mode_set_to_night_on_bedside_switch_double_click
- automation.house_mode_set_to_bed_on_bedside_switch_hold
- automation.house_mode_toggle_on_bedside_switch_double_click
- automation.alarm_wake_up
- automation.music_play_pause_on_magic_cube_knock
- automation.music_volume_down_on_magic_cube_rotate_left
+4 -16
View File
@@ -63,7 +63,7 @@ automation:
action:
- service: script.routine_good_night
- alias: House mode · Set to night on bedside switch double click
- alias: House mode · Toggle on bedside switch double click
trigger:
- platform: event
event_type: zha_event
@@ -76,26 +76,14 @@ automation:
data_template:
option: >
{% if now().strftime('%H')|int > 20 or now().strftime('%H')|int < 6 %}
{% if is_state('input_select.house_mode', 'day') %}
bed
{% elif is_state('input_select.house_mode', 'bed') %}
night
{% else %}
day
{% endif %}
- alias: House mode · Set to bed on bedside switch hold
trigger:
- platform: event
event_type: zha_event
event_data:
device_ieee: !secret master_bedroom_bedside_switch_ieee
command: hold
action:
- service: input_select.select_option
entity_id: input_select.house_mode
data:
option: bed
- alias: Alarm · Wake up
trigger:
platform: template