first sleep switch implementation

This commit is contained in:
2026-04-17 19:41:16 +02:00
parent 30397fe9ef
commit 61c115be37
7 changed files with 492 additions and 65 deletions

46
apps/apps.yaml Normal file
View File

@@ -0,0 +1,46 @@
debugger:
module: debugger
class: Debugger
port: 5678
motion_tracker:
module: motiontracker
class: MotionTracker
priority: 5 # this need to be initialized before app using motion tracker
mqtt_device_name: AD Motion Tracker
max_time: 30
areas:
corridor:
motion_sensors: binary_sensor.corridor_motion
hallway:
motion_sensors: binary_sensor.hallway_motion
restroom:
motion_sensors: binary_sensor.restroom_motion
sleep_switch:
module: smartswitch
class: SmartSwitch
entity: input_boolean.sleeping
trace_events: zha_event
toggle_events:
button_long_press:
event_name: zha_event
event_data:
device_ieee: '00:17:88:01:09:27:74:45'
args:
press_type: 'hold'
button: 'off'
reset_data:
device_ieee: '00:17:88:01:09:27:74:45'
args:
button: 'off'
press_type: 'long_release'