2018-01-02 00:00:45 +00:00
#-------------------------------------------
# ALarm Related Packages
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
homeassistant :
customize_glob :
"device_tracker.nodemcu*" :
icon : mdi:chip
2018-01-09 01:49:59 +00:00
2020-06-09 15:12:11 +00:00
2018-01-02 00:00:45 +00:00
"binary_sensor.mcu?_gpio*" :
icon : mdi:security-home
2018-01-09 01:49:59 +00:00
2020-06-09 15:12:11 +00:00
2018-01-02 00:00:45 +00:00
customize :
binary_sensor.MCU1_GPIO4 :
friendly_name : 'Paige Window'
binary_sensor.MCU1_GPIO5 :
friendly_name : 'Front Door'
binary_sensor.MCU1_GPIO10 :
friendly_name : 'Dining Room Windows'
binary_sensor.MCU1_GPIO12 :
friendly_name : 'Interior Garage Door'
binary_sensor.MCU1_GPIO13 :
friendly_name : 'Front Den Windows'
binary_sensor.MCU1_GPIO14 :
friendly_name : 'Office Window'
binary_sensor.MCU2_GPIO4 :
friendly_name : 'Dinette Windows'
binary_sensor.MCU2_GPIO5 :
friendly_name : 'Back Door'
binary_sensor.MCU2_GPIO9 :
friendly_name : 'Master Slider'
binary_sensor.MCU2_GPIO10 :
friendly_name : 'Master Bathroom Window'
binary_sensor.MCU2_GPIO12 :
friendly_name : 'Main Slider'
binary_sensor.MCU2_GPIO13 :
friendly_name : 'Upstairs Bedroom Window'
binary_sensor.MCU2_GPIO14 :
friendly_name : 'Justin Window'
binary_sensor.MCU3_GPIO4 :
friendly_name : 'Stacey Bedroom Window'
binary_sensor.MCU3_GPIO5 :
friendly_name : 'Carlo Bedroom Window'
binary_sensor.MCU3_GPIO10 :
friendly_name : 'Master Bedroom Window'
binary_sensor.MCU3_GPIO14 :
friendly_name : 'Upstairs Windows'
binary_sensor.MCU3_Light :
friendly_name : 'Panel Door'
group.entry_points :
friendly_name : Alarm Entry Points
2020-06-09 15:12:11 +00:00
2018-01-02 00:00:45 +00:00
group.interior_door :
friendly_name : Interior doors
2020-06-09 15:12:11 +00:00
2018-01-02 00:00:45 +00:00
#-------------------------------------------
binary_sensor :
- platform : mqtt
state_topic : "NodeMCU1/GPIO4/Status"
name : "MCU1_GPIO4"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU1/GPIO5/Status"
name : "MCU1_GPIO5"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU1/GPIO10/Status"
name : "MCU1_GPIO10"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU1/GPIO12/Status"
name : "MCU1_GPIO12"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU1/GPIO13/Status"
name : "MCU1_GPIO13"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU1/GPIO14/Status"
name : "MCU1_GPIO14"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU2/GPIO4/Status"
name : "MCU2_GPIO4"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU2/GPIO5/Status"
name : "MCU2_GPIO5"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU2/GPIO9/Status"
name : "MCU2_GPIO9"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU2/GPIO10/Status"
name : "MCU2_GPIO10"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU2/GPIO12/Status"
name : "MCU2_GPIO12"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU2/GPIO13/Status"
name : "MCU2_GPIO13"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU2/GPIO14/Status"
name : "MCU2_GPIO14"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU3/GPIO4/Status"
name : "MCU3_GPIO4"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU3/GPIO5/Status"
name : "MCU3_GPIO5"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU3/GPIO10/Status"
name : "MCU3_GPIO10"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU3/GPIO14/Status"
name : "MCU3_GPIO14"
payload_on : 1
payload_off : 0
device_class : opening
- platform : mqtt
state_topic : "NodeMCU3/Light/Status"
name : "MCU3_Light"
payload_on : 1
payload_off : 0
device_class : opening
# input_boolean:
# elephant:
# name: Elephant
# initial: off
#-------------------------------------------
group :
entry_points :
entities :
- binary_sensor.MCU1_GPIO4
- binary_sensor.MCU1_GPIO5
- binary_sensor.MCU1_GPIO10
- binary_sensor.MCU1_GPIO12
- binary_sensor.MCU1_GPIO13
- binary_sensor.MCU1_GPIO14
- binary_sensor.MCU2_GPIO4
- binary_sensor.MCU2_GPIO5
- binary_sensor.MCU2_GPIO9
- binary_sensor.MCU2_GPIO10
- binary_sensor.MCU2_GPIO12
- binary_sensor.MCU2_GPIO13
- binary_sensor.MCU2_GPIO14
- binary_sensor.MCU2_GPIO15
- binary_sensor.MCU3_GPIO4
- binary_sensor.MCU3_GPIO5
- binary_sensor.MCU3_GPIO10
- binary_sensor.MCU3_GPIO14
# interior_door: - Moved out to Doors Group.
# entities:
2018-12-04 15:34:41 +00:00
# - binary_sensor.kitchen_door
2018-01-02 00:00:45 +00:00
# - binary_sensor.MCU3_Light
#-------------------------------------------#-------------------------------------------
automation :
- alias : 'Turn off HVAC in window/door is opened'
2020-07-20 18:33:03 +00:00
id : 417961da-b706-4d5f-b155-e3518d24f0bc
2018-01-02 00:00:45 +00:00
trigger :
- platform : state
entity_id :
- binary_sensor.MCU1_GPIO4
- binary_sensor.MCU1_GPIO5
- binary_sensor.MCU1_GPIO10
- binary_sensor.MCU1_GPIO12
- binary_sensor.MCU1_GPIO13
- binary_sensor.MCU1_GPIO14
- binary_sensor.MCU2_GPIO4
- binary_sensor.MCU2_GPIO5
- binary_sensor.MCU2_GPIO9
- binary_sensor.MCU2_GPIO10
- binary_sensor.MCU2_GPIO12
- binary_sensor.MCU2_GPIO13
- binary_sensor.MCU2_GPIO14
- binary_sensor.MCU3_GPIO4
- binary_sensor.MCU3_GPIO5
- binary_sensor.MCU3_GPIO10
- binary_sensor.MCU3_GPIO14
to : 'on'
from : 'off'
for :
minutes : 5
condition :
- condition : template
value_template : "{{ states('climate.downstairs') != 'off' }}"
action :
2019-12-29 20:22:13 +00:00
- service : climate.turn_off
2018-01-02 00:00:45 +00:00
data :
entity_id : climate.downstairs
- service : script.speech_engine
data_template :
2020-08-04 17:58:39 +00:00
value1 : >
{{ [
"The {{ trigger.to_state.attributes.friendly_name }} has been opened for about 5 minutes. I will shut down the Air Conditioner so you can enjoy the fresh air." ,
"Since the {{ trigger.to_state.attributes.friendly_name }} is still open, I will turn off the air conditioners until you close it" ,
2020-09-07 16:13:46 +00:00
"The {{ trigger.to_state.attributes.friendly_name }} has been left open, I will turn off the AC to save some money for you." ,
2020-08-04 17:58:39 +00:00
"We cant have the Air Conditioning running AND have {{ trigger.to_state.attributes.friendly_name }} open so I will turn off the AC." ,
"Since running the AC while {{ trigger.to_state.attributes.friendly_name }} is open, I will turn off the Air Conditioner." ,
"Once the {{ trigger.to_state.attributes.friendly_name }} is closed, I will turn the Air Conditioner back on" ,
"So we dont waste money, I will turn off the AC until {{ trigger.to_state.attributes.friendly_name }} has been closed." ,
2020-08-07 17:12:40 +00:00
"The {{ trigger.to_state.attributes.friendly_name }} is open and we are cooling the outside. I will fix that by turning off the AC for now." ,
2020-08-04 17:58:39 +00:00
"The fresh Air from the {{ trigger.to_state.attributes.friendly_name }} is great so I will turn off the AC until it is closed again." ,
"When Doors and windows are left open like the {{ trigger.to_state.attributes.friendly_name }}, I will remember to turn off the AC."
] | random }}
2018-01-02 00:00:45 +00:00
call_outside_weather : 1
call_inside_weather : 1
#-------------------------------------------#-------------------------------------------
- alias : 'Turn HVAC back on when all doors/windows are closed.'
2020-07-20 18:33:03 +00:00
id : 66833291 -c504-4651-aac9-3cdbf98d20ea
2018-01-02 00:00:45 +00:00
trigger :
- platform : state
entity_id :
- group.entry_points
to : 'off'
from : 'on'
for :
minutes : 5
condition :
- condition : template
value_template : "{{ states('climate.downstairs') == 'off' }}"
action :
2019-12-29 20:22:13 +00:00
- service : climate.set_hvac_mode
2018-01-02 00:00:45 +00:00
data :
entity_id : climate.downstairs
2019-12-29 20:22:13 +00:00
hvac_mode : 'auto'
2018-01-02 00:00:45 +00:00
2018-01-09 01:49:59 +00:00
#-------------------------------------------#-------------------------------------------
- alias : 'Alarm lights in Living room'
2020-07-20 18:33:03 +00:00
id : fd0a2b68-ce3c-4f14-849d-8a312a79335e
2018-01-09 01:49:59 +00:00
trigger :
- platform : state
entity_id :
- group.entry_points
- platform : state
2020-02-25 00:52:57 +00:00
entity_id : group.garage_doors
2018-01-09 01:49:59 +00:00
condition :
condition : and
conditions :
- condition : state
entity_id : sun.sun
state : 'below_horizon'
- condition : state
entity_id : group.bed
state : 'off'
action :
2020-06-09 17:58:58 +00:00
- service_template : >-
{% if states.group.entry_points.state == 'on' or states.group.garage_doors.state != 'closed' -%}
light.turn_on
entity_id :
- light.living_room_accents
2020-06-27 14:04:14 +00:00
color_name : 'red'
2020-06-09 17:58:58 +00:00
{% else %}
light.turn_on
entity_id :
- light.living_room_accents
2020-06-27 14:04:14 +00:00
color_name : 'gold'
2020-06-09 17:58:58 +00:00
{% endif %}
2018-01-09 01:49:59 +00:00
2018-01-02 00:00:45 +00:00
#-------------------------------------------#---
- alias : "Panel Door opened"
2020-07-20 18:33:03 +00:00
id : 62d10d70-8092-4daa-9dcb-ed2bec6c6194
2020-06-05 18:24:37 +00:00
2018-01-02 00:00:45 +00:00
trigger :
- platform : state
entity_id :
- binary_sensor.MCU3_Light
to : 'off'
from : 'on'
action :
- service : script.notify_engine
data_template :
value1 : 'Someone has opened up the Alarm Panel Door!'
2020-06-27 14:04:14 +00:00
who : 'carlo'
apns_id : 'information'