105 lines
3.0 KiB
YAML
105 lines
3.0 KiB
YAML
# Security Package
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Security Device Customization
|
|
homeassistant:
|
|
customize_glob:
|
|
"binary_sensor.*_door":
|
|
device_class: door
|
|
"binary_sensor.*_window":
|
|
device_class: window
|
|
binary_sensor.all_doors:
|
|
device_class: door
|
|
binary_sensor.all_windows:
|
|
device_class: window
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Manual Alarm Control Panel
|
|
alarm_control_panel:
|
|
- platform: manual
|
|
code: !secret alarm_code
|
|
arming_time: 30
|
|
delay_time: 20
|
|
trigger_time: 600
|
|
disarm_after_trigger: false
|
|
disarmed:
|
|
trigger_time: 0
|
|
armed_home:
|
|
arming_time: 0
|
|
delay_time: 0
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Alarm Settings
|
|
input_boolean:
|
|
auto_arm_alarm:
|
|
name: Automatically Arm Alarm on Presence Change
|
|
auto_disarm_alarm:
|
|
name: Automatically Disarm Alarm on Presence Change
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Door and Window Groups
|
|
binary_sensor:
|
|
- platform: group
|
|
name: All Doors
|
|
entities:
|
|
- binary_sensor.front_door
|
|
- binary_sensor.laundry_door
|
|
- binary_sensor.living_room_door
|
|
|
|
# - platform: group
|
|
# name: Living Room Window
|
|
# entities:
|
|
# - binary_sensor.living_room_window_left
|
|
# - binary_sensor.living_room_window_right
|
|
|
|
- platform: group
|
|
name: All Windows
|
|
entities:
|
|
- binary_sensor.dining_room_front_window
|
|
# - binary_sensor.dining_room_side_window
|
|
# - binary_sensor.kitchen_left_window
|
|
# - binary_sensor.kitchen_right_window
|
|
# - binary_sensor.laundry_window
|
|
- binary_sensor.office_window
|
|
# - binary_sensor.living_room_window
|
|
# - binary_sensor.guest_room_front_window
|
|
# - binary_sensor.guest_room_side_window
|
|
# - binary_sensor.bathroom_window
|
|
# - binary_sensor.bedroom_side_window
|
|
# - binary_sensor.bedroom_back_window
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Security Automations
|
|
automation:
|
|
- alias: Auto-Arm Alarm
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.house_presence_state
|
|
to: Away
|
|
condition: "{{ is_state('input_boolean.auto_arm_alarm', True) }}"
|
|
action:
|
|
- service: alarm_control_panel.alarm_arm_away
|
|
target:
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
data:
|
|
code: !secret alarm_code
|
|
- service: notify.telegram_home
|
|
data:
|
|
message: Home Armed
|
|
|
|
- alias: Auto-Disarm Alarm
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.house_presence_state
|
|
to: Away
|
|
condition: "{{ is_state('input_boolean.auto_disarm_alarm', True) }}"
|
|
action:
|
|
- service: alarm_control_panel.alarm_disarm
|
|
target:
|
|
entity_id: alarm_control_panel.ha_alarm
|
|
data:
|
|
code: !secret alarm_code
|
|
- service: notify.telegram_home
|
|
data:
|
|
message: Home Disarmed
|