Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- #
- # Alarm Related Packages
- #
- #
- homeassistant:
- #----------------CUSTOMIZE---------------------------
- customize:
- group.entry_points:
- friendly_name: Alarm Entry Points
- #----------------GROUP---------------------------
- group:
- entry_points:
- entities:
- - binary_sensor.garage_to_back_door
- - binary_sensor.front_door
- - binary_sensor.wyzesense_77892FDD
- - binary_sensor.garage_to_house_test_door
- - binary_sensor.wyzesense_7784E101
- - binary_sensor.dining_1_state
- - binary_sensor.dining_2_state
- - binary_sensor.wyzesense_778f1252
- - binary_sensor.wyzesense_778f12e9
- - binary_sensor.wyzesense_77892E83
- #----------------AUTOMATIONS---------------------------
- automation:
- - alias: "Trigger alarm if system armed and door or window opened"
- trigger:
- - platform: state
- entity_id: group.entry_points
- to: "on"
- condition:
- condition: or
- conditions:
- - condition: state
- entity_id: alarm_control_panel.home_alarm
- state: "armed_home"
- - condition: state
- entity_id: alarm_control_panel.home_alarm
- state: "armed_away"
- - condition: state
- entity_id: alarm_control_panel.home_alarm
- state: "armed_night"
- action:
- - service: alarm_control_panel.alarm_trigger
- entity_id: alarm_control_panel.home_alarm
- - alias: "Turn on siren if alarm is triggered"
- trigger:
- - platform: state
- entity_id: alarm_control_panel.home_alarm
- to: "triggered"
- action:
- - service: switch.turn_on
- entity_id: switch.upstairs_alarm
- - service: switch.turn_on
- entity_id: switch.deck_light
- - service: notify.all_phones
- data:
- title: "Smart Home Alerts"
- message: "ALARM SYSTEM TRIGGERED"
- data:
- push:
- critical: 1
- - service: light.turn_on
- entity_id: group.hue_bulbs
- - service: script.turn_on
- entity_id: script.alexa_alarm
- - alias: "Update input boolean of arm status"
- trigger:
- - platform: state
- entity_id: alarm_control_panel.home_alarm
- to: "armed_home"
- - platform: state
- entity_id: alarm_control_panel.home_alarm
- to: "armed_away"
- - platform: state
- entity_id: alarm_control_panel.home_alarm
- to: "armed_night"
- action:
- service: input_boolean.turn_on
- entity_id: input_boolean.system_armed
- - alias: "Update input boolean of disarm status"
- trigger:
- - platform: state
- entity_id: alarm_control_panel.home_alarm
- to: "disarmed"
- action:
- service: input_boolean.turn_off
- entity_id: input_boolean.system_armed
- - alias: "Arm system if no one home"
- trigger:
- - platform: state
- entity_id: binary_sensor.aaron_location
- to: "off"
- condition:
- - condition: state
- entity_id: binary_sensor.kendra_location
- state: "off"
- action:
- - service: alarm_control_panel.alarm_arm_away
- data:
- entity_id: alarm_control_panel.home_alarm
- code: !secret alarm_panel_code
- - alias: "Turn off siren and deck and other light if system disarmed"
- trigger:
- - platform: state
- entity_id: alarm_control_panel.home_alarm
- to: "disarmed"
- action:
- - service: switch.turn_off
- entity_id: switch.upstairs_alarm
- - service: switch.turn_off
- entity_id: switch.deck_light
- - service: light.turn_off
- entity_id: group.hue_bulbs
- #----------------SCRIPTS---------------------------
- script:
- alexa_alarm:
- sequence:
- - service: notify.alexa_media
- data:
- target:
- - group.alexa
- data:
- type: tts
- message: >
- "The police have been called."
- - service: script.turn_on
- entity_id: script.alexa_loop
- alexa_loop:
- sequence:
- - delay:
- seconds: 5
- - condition: or
- conditions:
- - condition: state
- entity_id: alarm_control_panel.home_alarm
- state: "armed_home"
- - condition: state
- entity_id: alarm_control_panel.home_alarm
- state: "armed_away"
- - condition: state
- entity_id: alarm_control_panel.home_alarm
- state: "armed_night"
- - condition: state
- entity_id: alarm_control_panel.home_alarm
- state: "triggered"
- - service: script.turn_on
- entity_id: script.alexa_alarm
- disarm_alarm:
- sequence:
- - service: alarm_control_panel.alarm_disarm
- data:
- entity_id: alarm_control_panel.home_alarm
- code: !secret alarm_panel_code
- #----------------TIMERS---------------------------
- #----------------INPUT BOOLEANs---------------------------
- input_boolean:
- system_armed:
- name: Status of alarm system
- initial: off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement