97 lines
3.8 KiB
YAML
Executable File
97 lines
3.8 KiB
YAML
Executable File
######################################################################################################
|
|
# Nest Protect Package
|
|
# @CCOSTAN
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
# - Write up- https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html
|
|
######################################################################################################
|
|
#-----------------------------------
|
|
#
|
|
group:
|
|
protects:
|
|
name: Nest Protects
|
|
entities:
|
|
- binary_sensor.upstairs_living_room_nest_protect_online
|
|
- binary_sensor.hallway_nest_protect_kids_hallway_online
|
|
- binary_sensor.justins_room_nest_protect_online
|
|
- binary_sensor.kitchen_nest_protect_online
|
|
- binary_sensor.master_bedroom_nest_protect_online
|
|
- binary_sensor.master_hallway_nest_protect_online
|
|
- binary_sensor.paiges_room_nest_protect_paiges_room_online
|
|
- binary_sensor.upstairs_bedroom_nest_protect_online
|
|
- binary_sensor.office_nest_protect_online
|
|
|
|
automation:
|
|
- alias: Nest protect emergency
|
|
id: 95856443-6da8-4bef-80b2-f11c725b4dad
|
|
mode: parallel
|
|
|
|
trigger:
|
|
platform: state
|
|
entity_id:
|
|
- sensor.hallway_nest_protect_kids_hallway_smoke_status
|
|
- sensor.hallway_nest_protect_kids_hallway_co_status
|
|
- sensor.justins_room_nest_protect_smoke_status
|
|
- sensor.justins_room_nest_protect_co_status
|
|
- sensor.kitchen_nest_protect_smoke_status
|
|
- sensor.kitchen_nest_protect_co_status
|
|
- sensor.master_bedroom_nest_protect_smoke_status
|
|
- sensor.master_bedroom_nest_protect_co_status
|
|
- sensor.master_hallway_nest_protect_smoke_status
|
|
- sensor.master_hallway_nest_protect_co_status
|
|
- sensor.office_nest_protect_smoke_status
|
|
- sensor.office_nest_protect_co_status
|
|
- sensor.paiges_room_nest_protect_paiges_room_smoke_status
|
|
- sensor.paiges_room_nest_protect_paiges_room_co_status
|
|
- sensor.upstairs_bedroom_nest_protect_smoke_status
|
|
- sensor.upstairs_bedroom_nest_protect_co_status
|
|
- sensor.upstairs_living_room_nest_protect_smoke_status
|
|
- sensor.upstairs_living_room_nest_protect_co_status
|
|
to: 'Emergency'
|
|
|
|
action:
|
|
|
|
- service: input_boolean.turn_on
|
|
entity_id: input_boolean.alert_mode
|
|
|
|
- service: script.speech_engine
|
|
data:
|
|
value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately."
|
|
|
|
- service: script.notify_engine
|
|
data:
|
|
value1: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} Please investigate IMMEDIATELY."
|
|
who: "family"
|
|
apns_id: '{{ trigger.to_state.attributes.friendly_name }}'
|
|
|
|
- service: script.emergency
|
|
data:
|
|
call_garage_open: 1
|
|
|
|
|
|
- alias: Nest Protect Offline Notify
|
|
id: 43983144-a54f-4966-ae03-755e62cd35ec
|
|
mode: parallel
|
|
|
|
trigger:
|
|
platform: state
|
|
entity_id:
|
|
- binary_sensor.upstairs_living_room_nest_protect_online
|
|
- binary_sensor.hallway_nest_protect_kids_hallway_online
|
|
- binary_sensor.justins_room_nest_protect_online
|
|
- binary_sensor.kitchen_nest_protect_online
|
|
- binary_sensor.master_bedroom_nest_protect_online
|
|
- binary_sensor.master_hallway_nest_protect_online
|
|
- binary_sensor.paiges_room_nest_protect_paiges_room_online
|
|
- binary_sensor.upstairs_bedroom_nest_protect_online
|
|
- binary_sensor.office_nest_protect_online
|
|
from: 'on'
|
|
|
|
action:
|
|
|
|
- service: script.notify_engine
|
|
data:
|
|
value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately."
|
|
who: "family"
|
|
apns_id: '{{ trigger.to_state.attributes.friendly_name }}'
|
|
|