Refactor home alarm notifications and enhance intrusion detection logic

This commit is contained in:
2026-06-19 08:51:18 +02:00
parent eca30960f9
commit 757ece983c
2 changed files with 106 additions and 21 deletions

View File

@@ -20,6 +20,7 @@ home_alarm:
- binary_sensor.living_room_presence_presence
motion_intrusion_increment: 0.2
opening_intrusion_increment: 0.9
intrusion_cooldown_step: 0.1
intrusion_cooldown_interval: 60
@@ -33,12 +34,12 @@ home_alarm_notifications:
priority: 100 # default priority app is 50, since the notification_manager doesn't create any sensor but is based on sensor created by many app, it's important it's created last
notifications:
home_alarm_armed_notification:
alarm_armed_notification:
recipients:
all:
services:
- notify/mobile_app_iphone_de_pierre
#- notify/mobile_app_mae
- notify/mobile_app_mae
conditions: binary_sensor.home_alarm_armed
message:
@@ -48,13 +49,13 @@ home_alarm_notifications:
data:
tag: home_alarm_notification
home_alarm_windows_open_notification:
windows_open_notification:
recipients:
all:
services:
- notify/mobile_app_iphone_de_pierre
#- notify/mobile_app_mae
conditions: binary_sensor.home_alarm_armed and sensor.ad_number_of_windows_open > 0 and sensor.home_alarm_intrusion_level == 0
- notify/mobile_app_mae
conditions: binary_sensor.home_alarm_armed and sensor.ad_number_of_windows_open > 0 and binary_sensor.home_alarm_just_armed
message:
title: Alarme
@@ -64,13 +65,13 @@ home_alarm_notifications:
push:
interruption-level: critical
home_alarm_doors_open_notification:
doors_open_notification:
recipients:
all:
services:
- notify/mobile_app_iphone_de_pierre
#- notify/mobile_app_mae
conditions: binary_sensor.home_alarm_armed and sensor.ad_number_of_doors_open > 0 and sensor.home_alarm_intrusion_level == 0
- notify/mobile_app_mae
conditions: binary_sensor.home_alarm_armed and sensor.ad_number_of_doors_open > 0 and binary_sensor.home_alarm_just_armed
message:
title: Alarme
@@ -80,12 +81,42 @@ home_alarm_notifications:
push:
interruption-level: critical
home_alarm_unarmed_notification:
intrusion_detected_notification:
recipients:
all:
services:
- notify/mobile_app_iphone_de_pierre
#- notify/mobile_app_mae
- notify/mobile_app_mae
conditions: binary_sensor.home_alarm_armed and sensor.home_alarm_intrusion_level >= 1
message:
title: Alarme
content: Intrusion détectée
data:
tag: home_alarm_notification
push:
interruption-level: critical
intrusion_suspected_notification:
recipients:
all:
services:
- notify/mobile_app_iphone_de_pierre
- notify/mobile_app_mae
conditions: binary_sensor.home_alarm_armed and sensor.home_alarm_intrusion_level > 0 and sensor.home_alarm_intrusion_level < 1
message:
title: Alarme
content: Intrusion suspectée
data:
tag: home_alarm_notification
alarm_unarmed_notification:
recipients:
all:
services:
- notify/mobile_app_iphone_de_pierre
- notify/mobile_app_mae
conditions: not binary_sensor.home_alarm_armed
message: