176 lines
5.2 KiB
YAML
176 lines
5.2 KiB
YAML
home_alarm:
|
|
module: homealarm
|
|
class: HomeAlarm
|
|
|
|
smart_conditions:
|
|
trigger_conditions: not binary_sensor.someone_home or input_select.alarm_mode == 'On'
|
|
blocking_conditions: input_select.alarm_mode == 'Off'
|
|
|
|
opening_sensors:
|
|
- binary_sensor.group_doors
|
|
- binary_sensor.group_windows
|
|
|
|
motion_sensors:
|
|
- binary_sensor.corridor_motion
|
|
- binary_sensor.hallway_motion
|
|
- binary_sensor.restroom_motion
|
|
- binary_sensor.garage_motion
|
|
- binary_sensor.kitchen_motion
|
|
- binary_sensor.mezzanine_motion
|
|
- 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
|
|
|
|
reset_button: input_button.alarm_reset
|
|
|
|
presence_simulation:
|
|
smart_conditions: input_boolean.simulate_presence #and binary_sensor.home_alarm_armed
|
|
|
|
target_apps:
|
|
restroom:
|
|
# 5 minutes every 2 hours with 1 hour jitter
|
|
app: light_restroom
|
|
mode: method
|
|
start_payload:
|
|
brightness_pct: 100
|
|
transition: 1
|
|
stop_payload:
|
|
transition: 1
|
|
on_duration_min: 5
|
|
on_jitter_min: 1
|
|
interval_min: 120
|
|
interval_jitter_min: 60
|
|
start_delay_min: 60
|
|
start_delay_jitter_min: 20
|
|
|
|
light_living_room:
|
|
# Exemple "bureau toute la soiree": longues periodes allumees le soir
|
|
# on_duration_min / interval_min are optional:
|
|
# if omitted, the app stays active for the whole simulation window
|
|
# (still gated by smart_conditions + time_window).
|
|
app: light_living_room
|
|
status_sensor: binary_sensor.home_alarm_presence_mezzanine
|
|
mode: method
|
|
#smart_conditions: binary_sensor.is_dark_outside
|
|
smart_conditions: input_boolean.simulate_presence
|
|
time_window:
|
|
stop: '23:30'
|
|
stop_jitter_min: 30
|
|
start_payload:
|
|
brightness_pct: 100
|
|
transition: 2
|
|
stop_payload:
|
|
transition: 2
|
|
|
|
home_alarm_notifications:
|
|
module: notificationsmanager
|
|
class: NotificationsManager
|
|
|
|
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:
|
|
alarm_armed_notification:
|
|
recipients:
|
|
all:
|
|
services:
|
|
- notify/mobile_app_iphone_de_pierre
|
|
- notify/mobile_app_mae
|
|
conditions: binary_sensor.home_alarm_armed
|
|
|
|
message:
|
|
title: Alarme
|
|
content: Activation de l'alarme
|
|
timeout: 600
|
|
data:
|
|
tag: home_alarm_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 binary_sensor.home_alarm_just_armed
|
|
|
|
message:
|
|
title: Alarme
|
|
content: "{sensor.ad_number_of_windows_open} fenêtre(s) ouvertes"
|
|
data:
|
|
tag: home_alarm_notification
|
|
push:
|
|
interruption-level: critical
|
|
|
|
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 binary_sensor.home_alarm_just_armed
|
|
|
|
message:
|
|
title: Alarme
|
|
content: "{sensor.ad_number_of_doors_open} porte(s) ouvertes"
|
|
data:
|
|
tag: home_alarm_notification
|
|
push:
|
|
interruption-level: critical
|
|
|
|
intrusion_detected_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 >= 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:
|
|
title: Alarme
|
|
content: Désactivation de l'alarme
|
|
timeout: 600
|
|
|
|
clear_home_alarm_notification:
|
|
recipients:
|
|
all:
|
|
services:
|
|
- notify/mobile_app_iphone_de_pierre
|
|
- notify/mobile_app_mae
|
|
conditions: not binary_sensor.home_alarm_armed
|
|
message:
|
|
content: clear_notification
|
|
data:
|
|
tag: home_alarm_notification
|