Enhance motion tracking and occupancy detection with new sensor configurations and improved logic

This commit is contained in:
2026-05-24 22:10:41 +02:00
parent f483c85502
commit 2c9044553e
4 changed files with 79 additions and 16 deletions

View File

@@ -14,12 +14,18 @@ motion_tracker:
restroom:
motion_sensors: binary_sensor.restroom_motion
garage:
motion_sensors: binary_sensor.garage_motion
door_generate_motion: true
motion_sensors:
- binary_sensor.garage_motion
door_sensors:
- binary_sensor.garage_entrance
- binary_sensor.garage_door
kitchen:
motion_sensors: binary_sensor.kitchen_motion
mezzanine:
motion_sensors: binary_sensor.mezzanine_motion
living_room:
update_on_both_front: true
motion_sensors: binary_sensor.living_room_presence_presence
occupancy_sensors:
@@ -28,9 +34,15 @@ occupancy_sensors:
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:
binary_sensor.living_room_occupancy:
trigger_conditions: sensor.living_room_last_motion <= 5
binary_sensor.occupancy_kitchen:
binary_sensor.kitchen_occupancy:
trigger_conditions: sensor.kitchen_last_motion <= 5
binary_sensor.occupancy_restroom:
binary_sensor.restroom_occupancy:
trigger_conditions: sensor.restroom_last_motion <= 3
retain_condition.desk_occupancy:
retain_time: 5 * 60
conditions:
trigger_conditions:
- binary_sensor.alienware_r10
- sensor.macbook_m3_pro_de_pierre_frontmost_app != 'loginwindow' and sensor.macbook_m3_pro_de_pierre_displays == 2

View File

@@ -0,0 +1,14 @@
virtual_sensors:
module: virtualsensors
class: VirtualSensorsApp
priority: 10 # default priority app is 50, since most of them require sensors created by virtual sensors, it's important that virtual_sensors start first
sensors:
continuous_condition.is_apple_tv_idle:
time: 5
conditions: media_player.apple_tv == 'paused' or media_player.apple_tv == 'idle' or media_player.apple_tv == 'standby'
binary_sensor.is_apple_tv_on: media_player.apple_tv != 'off'
binary_sensor.someone_home: person.maeva == 'home' or person.pierre == 'home'
binary_sensor.is_everybody_sleeping: input_boolean.sleeping