Home-AssistantConfig/config/packages/nest_protects.yaml

90 lines
3.9 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
######################################################################################################
# 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
2018-01-02 00:00:45 +00:00
######################################################################################################
#-----------------------------------
2018-01-02 00:00:45 +00:00
automation:
- alias: Nest protect emergency
2020-07-20 18:33:03 +00:00
id: 95856443-6da8-4bef-80b2-f11c725b4dad
mode: parallel
2018-01-02 00:00:45 +00:00
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_template:
value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately."
2018-01-02 00:00:45 +00:00
- service: script.notify_engine
data_template:
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 }}'
2018-01-02 00:00:45 +00:00
- service: script.tweet_engine_no_image
2018-01-02 00:00:45 +00:00
data_template:
tweet: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} @CCostan (https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html)"
2018-01-02 00:00:45 +00:00
- service: script.emergency
data_template:
call_garage_open: 1
2018-01-02 00:00:45 +00:00
- alias: Nest Protect Offline Notify
2020-07-20 18:33:03 +00:00
id: 43983144-a54f-4966-ae03-755e62cd35ec
mode: parallel
2018-01-02 00:00:45 +00:00
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_template:
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 }}'
2018-01-02 00:00:45 +00:00
- service: script.tweet_engine_no_image
2018-01-02 00:00:45 +00:00
data:
tweet: "Oh NO! {{ trigger.to_state.attributes.friendly_name }} is now in {{ (trigger.to_state.state)|replace('_', ' ') }} mode. @Nest. (https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html) @ccostan #Safety"