Fix bedside switch light toggle

This commit is contained in:
2020-04-19 01:58:37 +03:00
parent e1d3fac491
commit 847c7c942e
3 changed files with 11 additions and 3 deletions
@@ -32,7 +32,7 @@ cards:
- automation.lighting_turn_on_ceiling_lights_after_sunset
- automation.lighting_turn_off_all_lights_after_sunrise
- automation.lighting_adjust_temperature_on_start
- automation.lighting_master_bedroom_toggle_main_lights_on_bedside_switch_single_click
- automation.lighting_master_bedroom_toggle_lights_on_bedside_switch_single_click
- automation.lighting_master_bedroom_adjust_temperature_based_on_time
- automation.lighting_living_room_adjust_temperature_based_on_time
- automation.lighting_living_room_turn_all_lights_on_on_magic_cube_flip_90
+1
View File
@@ -117,6 +117,7 @@ automation:
data_template:
entity_id: input_datetime.alarm_time
time: >-
{% if is_state('binary_sensor.workday_tomorrow', 'on') %}
09:20:00
{% else %}
+9 -2
View File
@@ -21,7 +21,7 @@ automation:
- service: light.turn_off
entity_id: light.all_lights
- alias: Lighting · Master bedroom · Toggle main lights on bedside switch single click
- alias: Lighting · Master bedroom · Toggle lights on bedside switch single click
trigger:
platform: event
event_type: zha_event
@@ -30,7 +30,14 @@ automation:
command: single
action:
- service: light.toggle
entity_id: light.master_bedroom_main_lights
data_template:
entity_id: >-
{% if is_state('input_boolean.sleep_mode', 'on') %}
light.bedside_light
{% else %}
light.master_bedroom_main_lights
{% endif %}
- alias: Lighting · Living room · Turn all lights on on Magic Cube flip 90
trigger: