Full bedroom setup with two bedlight, two remote and the sonos led

This commit is contained in:
2026-04-20 22:12:41 +02:00
parent 534059d831
commit 6e8eb58c97
5 changed files with 126 additions and 54 deletions

View File

@@ -22,24 +22,3 @@ motion_tracker:
restroom: restroom:
motion_sensors: binary_sensor.restroom_motion motion_sensors: binary_sensor.restroom_motion
sleep_switch:
module: smartswitch
class: SmartSwitch
entity: input_boolean.sleeping
toggle_events:
button_long_press:
event_name: zha_event
event_data:
device_name: 'bedroom_hue_remote'
args:
press_type: 'hold'
button: 'off'
reset_data:
device_name: 'bedroom_hue_remote'
args:
button: 'off'
press_type: 'long_release'

109
apps/rooms/bedroom.yaml Normal file
View File

@@ -0,0 +1,109 @@
sleep_switch:
module: smartswitch
class: SmartSwitch
entity: input_boolean.sleeping
toggle_events:
button_long_press_pierre:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_pierre'
args:
press_type: 'hold'
button: 'off'
reset_data:
device_name: 'bedroom_remote_pierre'
args:
button: 'off'
press_type: 'long_release'
button_long_press_maeva:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_maeva'
args:
press_type: 'hold'
button: 'off'
reset_data:
device_name: 'bedroom_remote_maeva'
args:
button: 'off'
press_type: 'long_release'
sonos_led:
module: smartswitch
class: SmartSwitch
entity: switch.bedroom_led
smart_conditions: not input_boolean.sleeping
light_bedroom_bedlight_pierre:
module: smartlight
class: SmartLight
entity: light.bedroom_bedlight_pierre
toggle_events:
button_press:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_pierre'
args:
press_type: 'press'
button: 'off'
off_events:
- turn_off_all_lights
increase_brightness_events:
up_hold:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_pierre'
args:
press_type: 'hold'
button: 'up'
decrease_brightness_events:
down_hold:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_pierre'
args:
press_type: 'hold'
button: 'down'
light_bedroom_bedlight_maeva:
module: smartlight
class: SmartLight
entity: light.bedroom_bedlight_maeva
toggle_events:
button_press:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_maeva'
args:
press_type: 'press'
button: 'off'
off_events:
- turn_off_all_lights
increase_brightness_events:
up_hold:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_maeva'
args:
press_type: 'hold'
button: 'up'
decrease_brightness_events:
down_hold:
event_name: zha_event
event_data:
device_name: 'bedroom_remote_maeva'
args:
press_type: 'hold'
button: 'down'

View File

@@ -41,37 +41,5 @@ light_restroom:
25: binary_sensor.day_interval_night 25: binary_sensor.day_interval_night
100: True 100: True
light_bedroom_nightstand:
module: smartlight
class: SmartLight
entity: light.berdroom_bedlight
toggle_events:
button_press:
event_name: zha_event
event_data:
device_name: 'bedroom_hue_remote'
args:
press_type: 'press'
button: 'off'
increase_brightness_events:
up_hold:
event_name: zha_event
event_data:
device_name: 'bedroom_hue_remote'
args:
press_type: 'hold'
button: 'up'
decrease_brightness_events:
down_hold:
event_name: zha_event
event_data:
device_name: 'bedroom_hue_remote'
args:
press_type: 'hold'
button: 'down'

16
apps/virtualevents.yaml Normal file
View File

@@ -0,0 +1,16 @@
virtual_events:
module: virtualevents
class: VirtualEvents
priority: 100 # default priority app is 50, since the virtual_events doesn't create any sensor but is based on sensor created by many app, it's important it's created last
virtual_events:
good_morning:
event_name: good_morning
event_condition: not input_boolean.sleeping
turn_off_all_lights:
event_name: turn_off_all_lights
event_condition: input_boolean.sleeping