Refactor motion tracker configuration and add presence detection module

This commit is contained in:
2026-05-13 19:51:13 +02:00
parent 60224f0459
commit f163b9eede
2 changed files with 50 additions and 33 deletions

36
apps/global/presence.yaml Normal file
View File

@@ -0,0 +1,36 @@
motion_tracker:
module: motiontracker
class: MotionTracker
priority: 5 # this need to be initialized before app using 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
garage:
motion_sensors: binary_sensor.garage_motion
kitchen:
motion_sensors: binary_sensor.kitchen_motion
mezzanine:
motion_sensors: binary_sensor.mezzanine_motion
living_room:
motion_sensors: binary_sensor.living_room_presence_presence
occupancy_sensors:
module: virtualsensors
class: VirtualSensorsApp
priority: 8 # default priority app is 50, since most of them require sensors created by virtual sensors, it's important that virtual_sensors start first
sensors:
binary_sensor.occupancy_living_room:
trigger_conditions: sensor.living_room_last_motion <= 5
binary_sensor.occupancy_kitchen:
trigger_conditions: sensor.kitchen_last_motion <= 5
binary_sensor.occupancy_restroom:
trigger_conditions: sensor.restroom_last_motion <= 3