Skip to content

Instantly share code, notes, and snippets.

@Snipercaine
Created November 10, 2018 19:07
Show Gist options
  • Save Snipercaine/17b2c1fdb7d7ff744a62b1296ed8b27a to your computer and use it in GitHub Desktop.
Save Snipercaine/17b2c1fdb7d7ff744a62b1296ed8b27a to your computer and use it in GitHub Desktop.
############## Configuration.yaml ###################
konnected:
access_token: !secret konnected_token
api_host: http://192.168.1.71:8123
devices:
- id: dc4ggggb4c4
binary_sensors:
- zone: 1
type: door
name: Front Door
- zone: 2
type: door
name: Garage Entry
- zone: 3
type: door
name: Kitchen Door
- zone: 4
type: window
name: Kitchen Windows
- zone: 5
type: window
name: Front Windows
- zone: 6
type: window
name: Master Bath
- id: dc4gggfb350
binary_sensors:
- zone: 1
type: window
name: Master Bedroom
- zone: 2
type: window
name: Theater Windows
- zone: 3
type: door
name: Basement Doors
- zone: 4
type: window
name: Hafens Room
- zone: 5
type: window
name: Grandmas Room
- zone: 6
type: window
name: Gym Window
alarm_control_panel:
- platform: manual
name: Alarm
code: !secret alarm_code
trigger_time: 300
disarmed:
trigger_time: 0
armed_home:
delay_time: 0
pending_time: 0
armed_away:
delay_time: 60
pending_time: 30
triggered:
pending_time: 0
################### automations.yaml ###################
########## ALARM ###########
- alias: Trigger alarm while armed home or away
trigger:
- platform: state
entity_id: binary_sensor.shop_door
to: 'on'
- platform: state
entity_id: binary_sensor.garage_motion
to: 'on'
- platform: state
entity_id: binary_sensor.basement_door
to: 'on'
- platform: state
entity_id: binary_sensor.garage_entry
to: 'on'
- platform: state
entity_id: binary_sensor.front_door
to: 'on'
- platform: state
entity_id: binary_sensor.kitchen_door
to: 'on'
- platform: state
entity_id: binary_sensor.kitchen_windows
to: 'on'
- platform: state
entity_id: binary_sensor.front_windows
to: 'on'
- platform: state
entity_id: binary_sensor.master_bedroom
to: 'on'
- platform: state
entity_id: binary_sensor.theater_windows
to: 'on'
- platform: state
entity_id: binary_sensor.hafens_room
to: 'on'
- platform: state
entity_id: binary_sensor.grandmas_room
to: 'on'
- platform: state
entity_id: binary_sensor.gym_window
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.alarm
state: armed_away
- condition: state
entity_id: alarm_control_panel.alarm
state: armed_home
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.alarm
- alias: Alarm Triggered
trigger:
- platform: state
entity_id: alarm_control_panel.alarm
to: 'triggered'
action:
- service: notify.notify
data:
message: "!Alarm Triggered!"
- service: media_player.alexa_tts
data:
entity_id: media_player.theater_room_dot, media_player.kitchen_dot, media_player.amazon_office, media_player.mom_and_dads_room
message: "The Alarm has been triggered. Input the disarm code or an automated message will be sent to the police in 30 seconds."
- service: media_player.select_source
data:
entity_id: media_player.volumio_volumioboxlocal
source: Sneak Caught
- service: media_player.select_source
data:
entity_id: media_player.volumio_volumiohomelocal
source: Home Alarm
- service: input_select.select_option
data:
entity_id: input_select.all_leds
option: Police All
- service: notify.ios_justin_iphone7
data:
title: ALARM TRIGGERED
message: "Maybe check the cameras"
- service: notify.ios_janis7
data:
title: ALARM TRIGGERED
message: "Scream! Run! Hide!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment