Initial automations involving security system
This commit is contained in:
@ -184,3 +184,78 @@ automation:
|
||||
who: parents
|
||||
message: "Kallen has been picked up from school."
|
||||
initial_state: true
|
||||
|
||||
script:
|
||||
family_is_away:
|
||||
alias: Family Is Away
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: not_home
|
||||
- service: light.turn_off
|
||||
target:
|
||||
area_id:
|
||||
- basement_studio
|
||||
- furnace_room
|
||||
- kallen_bedroom
|
||||
- living_room
|
||||
- master_bedroom
|
||||
- mud_room
|
||||
- nursery
|
||||
- upstairs_hallway
|
||||
- dining_room
|
||||
- downstairs_bathroom
|
||||
- upstairs_bathroom
|
||||
data: {}
|
||||
- service: alarm_control_panel.alarm_arm_away
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
||||
target:
|
||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||
mode: single
|
||||
icon: mdi:shield-lock
|
||||
family_is_home:
|
||||
alias: Family Is Home
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.presence_simulation
|
||||
data: {}
|
||||
- service: alarm_control_panel.alarm_disarm
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
||||
target:
|
||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- switch.basement_echo_dot_do_not_disturb_switch
|
||||
- switch.living_room_echo_dot_do_not_disturb_switch
|
||||
- switch.master_bedroom_echo_dot_do_not_disturb_switch
|
||||
data: {}
|
||||
- service: light.turn_off
|
||||
target:
|
||||
area_id:
|
||||
- furnace_room
|
||||
- kallen_bedroom
|
||||
- nursery
|
||||
- master_bedroom
|
||||
- upstairs_hallway
|
||||
- basement_studio
|
||||
- downstairs_bathroom
|
||||
- upstairs_bathroom
|
||||
- dining_room
|
||||
- living_room
|
||||
data: {}
|
||||
- condition: sun
|
||||
after: sunset
|
||||
after_offset: -00:30
|
||||
- service: light.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- light.living_room_lights
|
||||
- light.mud_room_overhead
|
||||
- light.dining_room_lamp
|
||||
mode: single
|
||||
icon: mdi:home-account
|
@ -96,7 +96,7 @@ automation:
|
||||
alias: House Scheduling
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '06:10:00'
|
||||
at: '06:00:00'
|
||||
id: house-morning
|
||||
- platform: time
|
||||
at: '16:05:00'
|
||||
@ -135,6 +135,15 @@ automation:
|
||||
{% else %}
|
||||
{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% endif %}
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.morning_alarm_disarm
|
||||
data_template:
|
||||
time: >
|
||||
{% if is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
||||
{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% else %}
|
||||
08:00
|
||||
{% endif %}
|
||||
- if:
|
||||
- condition: trigger
|
||||
id: house-evening
|
||||
|
61
packages/security.yaml
Normal file
61
packages/security.yaml
Normal file
@ -0,0 +1,61 @@
|
||||
input_boolean:
|
||||
# Main security switch. If this is on, the security is armed.
|
||||
sentry_mode:
|
||||
name: Sentry Mode
|
||||
icon: mdi:security
|
||||
# Vacation mode is automagically set when we are 3 hours from the house, and turns off when we return.
|
||||
# This is used to modify some of the normal automations.
|
||||
vacation_mode:
|
||||
name: Vacation Mode
|
||||
icon: mdi:airplane-takeoff
|
||||
# Guest mode is use to modify automations when we have guests.
|
||||
# In some cases this prevents security from being set to prevent security alarm going off
|
||||
guest_mode:
|
||||
name: Guest Mode
|
||||
icon: mdi:account-multiple
|
||||
# This switch powers the security alarm and gives an easy way to kill the alarm.
|
||||
# When it is on, the alarm is going off
|
||||
security_alarm:
|
||||
name: Security Alarm
|
||||
icon: mdi:speaker-wireless
|
||||
# This switch powers the fire alarm.
|
||||
# When on the fire alarm is going off.
|
||||
fire_alarm:
|
||||
name: Fire Alarm
|
||||
icon: mdi:speaker-wireless
|
||||
# This switch turns on if the security system checks that fire when someone tries to arm the system
|
||||
# finds a door open, or another condition that would prevent the system from being able to monitor properly.
|
||||
lockdown_issue:
|
||||
name: Lockdown Issue
|
||||
icon: mdi:lock-reset
|
||||
# This switch is turned on if there is a security breach. Turning on this switch starts the countdown to the alarm.
|
||||
security_issue:
|
||||
name: Security Issue
|
||||
icon: mdi:alert-circle-outline
|
||||
|
||||
input_datetime:
|
||||
morning_alarm_disarm:
|
||||
name: Morning Alarm Disarm
|
||||
icon: mdi:shield-off
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
automation:
|
||||
- id: 51819f36-2407-496c-afcd-ae160d747f0a
|
||||
alias: Morning Alarm Disarm
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.morning_alarm_disarm
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.people_present
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: alarm_control_panel.alarm_disarm
|
||||
target:
|
||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||
data:
|
||||
code: !secret ring_alarm_code
|
Reference in New Issue
Block a user