Add sleep switch for living room

This commit is contained in:
2026-07-09 23:14:23 +02:00
parent 30965c2a8a
commit dd27cdc952
2 changed files with 30 additions and 2 deletions

View File

@@ -17,4 +17,6 @@ virtual_events:
event_name: turn_off_all_lights
event_condition: binary_sensor.is_everybody_sleeping
turn_off_all_living_room_lights:
event_name: turn_off_all_living_room_lights
event_condition: binary_sensor.is_living_room_sleeping or binary_sensor.projector_on

View File

@@ -14,6 +14,10 @@ light_mezzanine_01:
35: binary_sensor.day_interval_night
100: True
off_events:
- turn_off_all_lights
- turn_off_all_living_room_lights
light_mezzanine_02:
module: smartlight
class: SmartLight
@@ -30,6 +34,10 @@ light_mezzanine_02:
25: binary_sensor.day_interval_night
100: True
off_events:
- turn_off_all_lights
- turn_off_all_living_room_lights
light_bookshelves:
module: smartlight
class: SmartLight
@@ -77,6 +85,8 @@ light_living_room:
off_events:
- turn_off_all_lights
- turn_off_all_living_room_lights
projection_screen:
module: smartshutter
@@ -114,3 +124,19 @@ mezzanine_curtains:
close_conditions:
trigger_conditions: binary_sensor.projector_on or not binary_sensor.projector_off_for_a_while
disable_conditions: self == 'closed' and (binary_sensor.is_dark_outside or binary_sensor.is_anybody_sleeping)
living_room_sleep_switch:
module: smartswitch
class: SmartSwitch
entity: input_boolean.living_room_sleeping
toggle_events:
button_press:
event_name: state_changed
debounce_seconds: 0.5
event_data:
entity_id: event.living_room_bilresa_button_bouton_2
new_state:
attributes:
event_type: multi_press_1