2019-04-17 22:46:06 +00:00
###############################################################################
# @author : Mahasri Kalavala
# @date : 04/15/2017
2019-08-19 00:21:05 +00:00
# @package : Home Security
2019-04-17 22:46:06 +00:00
# @description : Home Security System Sensors and Automations
###############################################################################
homeassistant :
customize :
group.home_security_system :
order : 7
2020-02-05 23:28:38 +00:00
alarm_control_panel.home :
2019-04-17 22:46:06 +00:00
friendly_name : Home Security System
icon : mdi:security
sensor.my_alarm_control_panel :
friendly_name : Home Security System
icon : mdi:security
simplisafe :
accounts :
- username : !secret simplisafe_username
password : !secret simplisafe_password
###############################################################################
2019-08-19 00:21:05 +00:00
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
2019-04-17 22:46:06 +00:00
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
2019-08-19 00:21:05 +00:00
#
2019-04-17 22:46:06 +00:00
###############################################################################
automation :
2019-08-19 00:21:05 +00:00
###############################################################################
# Leeo light - color indication of Home Security System
# BLUE for Secured (Home and Away), and RED for OFF or Trigerred
###############################################################################
2019-04-17 22:46:06 +00:00
- alias : Home Security Status Leeo Color
initial_state : true
trigger :
platform : state
2020-02-05 23:28:38 +00:00
entity_id : alarm_control_panel.home
2019-04-17 22:46:06 +00:00
condition :
- condition : template
value_template : "{% if trigger.from_state %} True {% else %} False {% endif %}"
- condition : template
2020-02-05 23:28:38 +00:00
value_template : "{{ states('alarm_control_panel.home') != 'unknown' }}"
2019-04-17 22:46:06 +00:00
- condition : template
2020-02-05 23:28:38 +00:00
value_template : "{{ states('alarm_control_panel.home') | trim != '' }}"
2019-04-17 22:46:06 +00:00
action :
- service_template : >
2020-02-05 23:28:38 +00:00
{% if states('alarm_control_panel.home') == "armed_home" %}
2019-04-17 22:46:06 +00:00
script.xiaomi_blue
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "armed_away" %}
2019-04-17 22:46:06 +00:00
script.xiaomi_green
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "triggered" %}
2019-04-17 22:46:06 +00:00
script.xiaomi_red
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "disarmed" %}
2019-04-17 22:46:06 +00:00
script.xiaomi_red
{% endif %}
- service : script.ifttt_leeo_color_change
data_template :
value1 : >
2020-02-05 23:28:38 +00:00
{% if states('alarm_control_panel.home') == "armed_home" %}
2019-04-17 22:46:06 +00:00
"#0000FF"
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "armed_away" %}
2019-04-17 22:46:06 +00:00
"#00FF00"
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "triggered" %}
2019-04-17 22:46:06 +00:00
"#FF0000"
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "disarmed" %}
2019-04-17 22:46:06 +00:00
"#FF0000"
{% endif %}
2019-08-19 00:21:05 +00:00
###############################################################################
# Notify Security System State Change
###############################################################################
2019-04-17 22:46:06 +00:00
- alias : Notify Home Security Status Change
initial_state : true
trigger :
platform : state
2020-02-05 23:28:38 +00:00
entity_id : alarm_control_panel.home
2019-04-17 22:46:06 +00:00
condition :
- condition : template
value_template : "{{ states('input_boolean.security_system_alerts') == 'on' }}"
- condition : template
value_template : >
2019-05-25 17:28:07 +00:00
{%- if state_attr('automation.notify_home_security_status_change', 'last_triggered') -%}
{{ (as_timestamp(now()) - as_timestamp(state_attr('automation.notify_home_security_status_change', 'last_triggered'))) > 90 }}
2019-04-17 22:46:06 +00:00
{%- else -%}
true
{%- endif -%}
action :
- service : script.notify_me
data_template :
message : >
2020-02-05 23:28:38 +00:00
{% if states('alarm_control_panel.home') == "armed_home" %}
2019-04-17 22:46:06 +00:00
Your home is now secured!
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "armed_away" %}
2019-04-17 22:46:06 +00:00
Your Home Security System is now set to Away mode!
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "triggered" %}
2019-04-17 22:46:06 +00:00
Attention! : Your Home Security System is triggered! It has been notified to the authorities.
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "disarmed" %}
2019-04-17 22:46:06 +00:00
Attention! : Your Home Security System is turned OFF.
{% endif %}
- service : script.voice_notify
data_template :
message : >
2020-02-05 23:28:38 +00:00
{% if states('alarm_control_panel.home') == "armed_home" %}
2019-04-17 22:46:06 +00:00
Your home is now secured!
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "armed_away" %}
2019-04-17 22:46:06 +00:00
Your Home Security System is now set to Away mode!
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "triggered" %}
2019-04-17 22:46:06 +00:00
Attention! : Your Home Security System is triggered! It has been notified to the authorities.
2020-02-05 23:28:38 +00:00
{% elif states('alarm_control_panel.home') == "disarmed" %}
2019-12-20 15:32:28 +00:00
Attention! : Your Home Security System is turned OFF.
2019-04-17 22:46:06 +00:00
{% endif %}
- condition : template
2020-02-05 23:28:38 +00:00
value_template : "{{ states('alarm_control_panel.home') != 'disarmed' }}"
2019-04-17 22:46:06 +00:00
- service : input_boolean.turn_on
2020-03-21 01:25:56 +00:00
entity_id : input_boolean.notify_camera_alerts
2019-04-17 22:46:06 +00:00
2019-08-19 00:21:05 +00:00
###############################################################################
# A gentle 10 minute reminder that the Home Security system is OFF
###############################################################################
2019-04-17 22:46:06 +00:00
- alias : Home Security System WatchDog 10 minutes
initial_state : true
trigger :
- platform : state
entity_id :
2020-02-05 23:28:38 +00:00
- alarm_control_panel.home
2019-08-19 00:21:05 +00:00
to : "disarmed"
for :
2019-04-17 22:46:06 +00:00
minutes : 10
action :
- service : script.notify_me
data :
message : "Home Security System is OFF for more than 10 minutes!"
2019-08-19 00:21:05 +00:00
###############################################################################
# A gentle reminder that the home security is OFF for more than 30 minutes
###############################################################################
2019-04-17 22:46:06 +00:00
- alias : Home Security System WatchDog 30 minutes
initial_state : true
trigger :
- platform : state
entity_id :
2020-02-05 23:28:38 +00:00
- alarm_control_panel.home
2019-08-19 00:21:05 +00:00
to : "disarmed"
for :
2019-04-17 22:46:06 +00:00
minutes : 30
condition :
- condition : template
value_template : "{{ states('input_boolean.security_system_alerts') == 'on' }}"
action :
- service : script.notify_me
2019-08-19 00:21:05 +00:00
data :
2019-04-17 22:46:06 +00:00
message : "Home Security System is OFF for more than 30 minutes!"
2019-08-19 00:21:05 +00:00
###############################################################################
# When home security system is turned OFF or turned to Home mode from "away"
# means, someone reached home from outside
###############################################################################
2019-04-17 22:46:06 +00:00
- alias : Turn ON Thermostat upon reaching home
initial_state : true
trigger :
platform : state
2020-02-05 23:28:38 +00:00
entity_id : alarm_control_panel.home
2019-04-17 22:46:06 +00:00
condition :
- condition : template
value_template : >
2019-12-20 15:32:28 +00:00
{% if trigger.from_state.state == 'armed_away' and
2019-04-17 22:46:06 +00:00
(trigger.to_state.state == 'armed_home' or trigger.to_state.state == 'disarmed') %}
true
{% else %}
false
{% endif %}
action :
- service : climate.set_away_mode
data_template :
entity_id : climate.dining_room
2019-08-19 00:21:05 +00:00
away_mode : "false"
2019-04-17 22:46:06 +00:00
2019-08-19 00:21:05 +00:00
###############################################################################
# TURN HOME SECURITY SYSTEM ON AT BED TIME
###############################################################################
2019-04-17 22:46:06 +00:00
- alias : Night HomeSecurity On
initial_state : true
trigger :
platform : time_pattern
2019-08-19 00:21:05 +00:00
minutes : "/5"
2019-04-17 22:46:06 +00:00
seconds : 00
condition :
- condition : template
2019-12-20 15:32:28 +00:00
value_template : "{{ states('sensor.bedtime_hour')|int == now().hour|int }}"
2019-04-17 22:46:06 +00:00
- condition : template
2019-12-20 15:32:28 +00:00
value_template : "{{ states('sensor.bedtime_minute')|int == now().minute|int }}"
2019-04-17 22:46:06 +00:00
- condition : template
2020-02-05 23:28:38 +00:00
value_template : "{{ states('alarm_control_panel.home') != 'away' }}"
2019-04-17 22:46:06 +00:00
- condition : template
2020-02-05 23:28:38 +00:00
value_template : "{{ states('alarm_control_panel.home') == 'disarmed' }}"
2019-04-17 22:46:06 +00:00
- condition : template
value_template : "{{ states('input_boolean.security_system_alerts') == 'on' }}"
action :
- service : alarm_control_panel.alarm_arm_home
data :
2020-02-05 23:28:38 +00:00
entity_id : alarm_control_panel.home
2019-04-17 22:46:06 +00:00
- service : script.notify_me
2019-08-19 00:21:05 +00:00
data :
2019-04-17 22:46:06 +00:00
message : "It's bedtime, you forgot to turn ON Home Security System. Turned it ON for you."
###############################################################################
# Check for Garage Door Status when Home Security System State changes
###############################################################################
2019-08-19 00:21:05 +00:00
# - alias: Home Security System And Garage Door Check
# initial_state: true
# trigger:
# - platform: time_pattern
# minutes: '/15'
# seconds: 00
# condition:
# condition: and
# conditions:
# - condition: template
2020-02-05 23:28:38 +00:00
# value_template: '{{ states('alarm_control_panel.home') == "armed_home" or states('alarm_control_panel.home') == "armed_away" }}'
2019-08-19 00:21:05 +00:00
# - condition: or
# conditions:
# - condition: template
2019-12-20 15:32:28 +00:00
# value_template: '{{ states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" }}'
2019-08-19 00:21:05 +00:00
# - condition: template
2019-12-20 15:32:28 +00:00
# value_template: '{{ states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" }}'
2019-08-19 00:21:05 +00:00
# action:
# - service: switch.turn_on
# entity_id: switch.garage
# - service: script.notify_me
# data_template:
# message: >
2020-02-05 23:28:38 +00:00
# Attention! Your home Security system is set to {{ states('alarm_control_panel.home').split('_')[1] | upper }} mode.
2019-12-20 15:32:28 +00:00
# BUT THE {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
2019-08-19 00:21:05 +00:00
# - service: camera.snapshot
# data_template:
# entity_id: "camera.garage_camera"
2019-12-20 15:32:28 +00:00
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
2019-08-19 00:21:05 +00:00
# - service: camera.snapshot
# data_template:
# entity_id: "camera.driveway_camera"
2019-12-20 15:32:28 +00:00
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
2019-08-19 00:21:05 +00:00
# - service: camera.snapshot
# data_template:
# entity_id: "camera.frontdoor_camera"
2019-12-20 15:32:28 +00:00
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
2019-08-19 00:21:05 +00:00
# - service: notify.notify_smtp
# data_template:
# title: 'Garage Picture {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
# message: >-
# {%- macro get_date(dt) %}
# {%- set date_suffix = ["th", "st", "nd", "rd"] -%}
# {{ dt.day }}
# {%- if dt.day % 10 in [1, 2, 3] and dt.day not in [11, 12, 13] -%}
# {{ date_suffix[dt.day%10] }}
# {%- else -%}
# {{ date_suffix[0] }}
# {%- endif %} {{ dt.strftime("%B %Y")}}
# {%- endmacro -%}
# {% set doors = "" %}
2019-12-20 15:32:28 +00:00
# {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
2019-08-19 00:21:05 +00:00
# {% set doors = "Both garage doors" %}
2019-12-20 15:32:28 +00:00
# {% elif states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on"%}
# {% set doors = states('binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" %}
# {% set doors = states('binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
2019-08-19 00:21:05 +00:00
# {% endif %}
2020-02-05 23:28:38 +00:00
# Your {{ doors }} seem to be open while your home security system is set to "{{ states('alarm_control_panel.home').split('_')[1]| title }}" mode. Today is {{ get_date(now()) }}, and time is {{ now().strftime("%I:%M:%S %p") }}. Please see the attached pictures and make sure everything is okay.
2019-08-19 00:21:05 +00:00
# data:
# images:
2019-12-20 15:32:28 +00:00
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
2019-08-19 00:21:05 +00:00
# - condition: template
2020-02-05 23:28:38 +00:00
# value_template: '{{ states('alarm_control_panel.home') == "armed_home" }}'
2019-08-19 00:21:05 +00:00
# - service: script.voice_notify
# data_template:
# message: >
# {% set doors = "" %}
2019-12-20 15:32:28 +00:00
# {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
2019-08-19 00:21:05 +00:00
# {% set doors = "Both garage doors" %}
2019-12-20 15:32:28 +00:00
# {% elif states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on"%}
# {% set doors = states('binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
# {% set doors = states('binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
2019-08-19 00:21:05 +00:00
# {% endif %}
2020-02-05 23:28:38 +00:00
# Attention! Your home Security system is set to {{ states('alarm_control_panel.home').split('_')[1] | upper }} mode.
2019-08-19 00:21:05 +00:00
# BUT the {{ doors }} {{ 'are' if doors.endswith('s') else 'is' }} open.
2019-04-17 22:46:06 +00:00
###############################################################################
# Turn Home Security System ON at sunset time
###############################################################################
2019-08-19 00:21:05 +00:00
# - alias: Turn On Home Security System At Sunset
# initial_state: true
# trigger:
# platform: sun
# event: sunset
# offset: '+00:00:00'
# condition:
# - condition: state
2020-02-05 23:28:38 +00:00
# entity_id: alarm_control_panel.home
2019-08-19 00:21:05 +00:00
# state: 'disarmed'
# action:
# - service_template: >-
2019-12-20 15:32:28 +00:00
# {% if states('binary_sensor.back_door_sensor_sensor') == "off" and
# states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "off" and
# states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
# states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
2019-08-19 00:21:05 +00:00
# alarm_control_panel.alarm_arm_home
# {% else %}
# alarm_control_panel.disarm
# {% endif %}
# data:
2020-02-05 23:28:38 +00:00
# entity_id: alarm_control_panel.home
2019-08-19 00:21:05 +00:00
# - service: script.voice_notify
# data_template:
# message: >
2019-12-20 15:32:28 +00:00
# {% if states('binary_sensor.back_door_sensor_sensor') == "off" and
# states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "off" and
# states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
# states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
2019-08-19 00:21:05 +00:00
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.back_door_sensor_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Single Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# Your{{ doors }} {%- if 'and' in doors -%}s are {%- else %} is {%- endif %} open. Home Security System could not be turned on.
# {% endif %}
# - service: script.notify_me
# data_template:
# message: >
2019-12-20 15:32:28 +00:00
# {% if states('binary_sensor.back_door_sensor_sensor') == "off" and
# states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "off" and
# states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
# states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
2019-08-19 00:21:05 +00:00
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.back_door_sensor_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
2019-12-20 15:32:28 +00:00
# {%- if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" -%}
2019-08-19 00:21:05 +00:00
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Single Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# Your {{ doors}} {%- if 'and' in doors -%}s are {%- else %} is {%- endif %} open. Home Security System could not be turned on.
# {% endif %}
2019-04-17 22:46:06 +00:00
##############################################################################
# Ask me if I want to turn off Home Security System upon reaching front door
# Ask me only when the security system is ON or AWAY mode
##############################################################################
2019-08-19 00:21:05 +00:00
# - alias: Turn Off Security Upon Reaching Home
# initial_state: true
# trigger:
# - platform: state
# entity_id: device_tracker.life360_suresh
# from: 'not_home'
# to: 'home'
# condition:
# condition: or
# conditions:
# - condition: template
2020-02-05 23:28:38 +00:00
# value_template: '{{ states('alarm_control_panel.home') | lower == "armed_away" }}'
2019-08-19 00:21:05 +00:00
# - condition: template
2020-02-05 23:28:38 +00:00
# value_template: '{{ states('alarm_control_panel.home') | lower == "armed_home" }}'
2019-08-19 00:21:05 +00:00
# action:
# - service: notify.ios_suresh
# data_template:
# title: 'Welcome Home, Suresh!'
# message: 'Turn Off Home Security System?'
# data:
# push:
# badge: 0
# category: 'welcome_home'
2019-04-17 22:46:06 +00:00
##############################################################################
# Ask me if I want to turn off Home Security System when garage door is opened
# Ask me only when the security system is ON or AWAY mode
##############################################################################
2019-08-19 00:21:05 +00:00
# - alias: Notify Garage Status And Home Security System
# initial_state: true
# trigger:
# platform: state
# entity_id:
# - binary_sensor.two_car_garage_door_tilt_sensor_sensor
# - binary_sensor.single_car_garage_door_tilt_sensor_sensor
# to: 'on'
# condition:
# - condition: template
2020-02-05 23:28:38 +00:00
# value_template: '{{ states('alarm_control_panel.home') == "armed_home" or states('alarm_control_panel.home') == "armed_away" }}'
2019-08-19 00:21:05 +00:00
# action:
# - service: notify.ios_suresh
# data_template:
# title: >
# Your Home is armed, and {{ trigger.entity_id.split('.')[1].split('_')[0] |title }} Car Garage is just opened!
# message: 'Turn Off Home Security System?'
# data:
# push:
# badge: 0
# category: 'welcome_home'
2019-04-17 22:46:06 +00:00
##############################################################################
# iOS Actionable Notification that disables Home Security System
##############################################################################
2019-08-19 00:21:05 +00:00
# - alias: Disable Home Security iOS Action
# initial_state: true
# trigger:
# platform: event
# event_type: ios.notification_action_fired
# event_data:
# actionName: 'DISABLE_SECURITY'
# action:
# - service: alarm_control_panel.alarm_disarm
2020-02-05 23:28:38 +00:00
# entity_id: alarm_control_panel.home
2019-08-19 00:21:05 +00:00
# - service: notify.ios_suresh
# data:
# message: "Unlocked your home!"