update to 97 version.

This commit is contained in:
Mahasri Kalavala 2019-08-18 20:21:05 -04:00
parent c9a658171f
commit 0f8de89732
20 changed files with 1248 additions and 1326 deletions

View File

@ -3,26 +3,26 @@
# @Author : Mahasri Kalavala
###############################################################################
homeassistant:
name: Home
name: Home
temperature_unit: F
latitude: !secret home_latitude
longitude: !secret home_longitude
elevation: !secret home_elevation
unit_system: imperial
time_zone: !secret time_zone
customize_glob: !include customize_glob.yaml
customize_domain: !include customize_domain.yaml
packages: !include_dir_named packages
whitelist_external_dirs:
- '/home/homeassistant/.homeassistant/www/downloads/camera/patio/'
- '/home/homeassistant/.homeassistant/www/downloads/camera/garage/'
- '/home/homeassistant/.homeassistant/www/downloads/camera/playarea/'
- '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/'
- '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/'
- '/home/homeassistant/.homeassistant/www/downloads/camera/kitchen/'
- '/home/homeassistant/.homeassistant/www/downloads/camera/frontroom/'
- "/home/homeassistant/.homeassistant/www/downloads/camera/patio/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/garage/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/playarea/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/driveway/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/kitchen/"
- "/home/homeassistant/.homeassistant/www/downloads/camera/frontroom/"
sun:
alexa:
@ -72,13 +72,20 @@ history:
websocket_api:
python_script:
recorder:
db_url: !secret my_sql_url
db_url: !secret my_sql_url
logger: !include logging.yaml
zeroconf:
owntracks:
system_health:
life360:
accounts:
- username: !secret life360_username
password: !secret life360_password
circles:
include: [Family]
mqtt:
broker: !secret mqtt_server
port: !secret mqtt_port
@ -96,26 +103,26 @@ person:
id: suresh
device_trackers:
- device_tracker.suresh
- device_tracker.suresh_suresh
- device_tracker.suresh_kalavala
- device_tracker.tesla_model_3_5yj3e1ea8jf010610_location_tracker
- name: Mallika
id: mallika
device_trackers:
- device_tracker.mallika
- device_tracker.mallika_mallika
- device_tracker.life360_mallika
- name: Srinika
id: srinika
device_trackers:
- device_tracker.srinika
- device_tracker.srinika_srinika
- device_tracker.life360_srinika
- name: Hasika
id: hasika
device_trackers:
- device_tracker.hasika
- device_tracker.hasika_hasika
- device_tracker.life360_hasika
lovelace:
mode: yaml
@ -147,54 +154,53 @@ ios:
push:
categories:
- name: Single Car Garage Door
identifier: '1CAR_GARAGE'
identifier: "1CAR_GARAGE"
actions:
- identifier: '1CAR_GARAGE_CLOSE'
title: 'Close Garage Door'
activationMode: 'background'
- identifier: "1CAR_GARAGE_CLOSE"
title: "Close Garage Door"
activationMode: "background"
authenticationRequired: yes
destructive: yes
behavior: 'default'
behavior: "default"
- name: Two Car Garage Door
identifier: '2CAR_GARAGE'
identifier: "2CAR_GARAGE"
actions:
- identifier: '2CAR_GARAGE_CLOSE'
title: 'Close Garage Door'
activationMode: 'background'
- identifier: "2CAR_GARAGE_CLOSE"
title: "Close Garage Door"
activationMode: "background"
authenticationRequired: yes
destructive: yes
behavior: 'default'
behavior: "default"
- name: Trash Recycle
identifier: 'trash_recycle'
identifier: "trash_recycle"
actions:
- identifier: 'TRASH_LEFT'
title: 'Done'
activationMode: 'background'
- identifier: "TRASH_LEFT"
title: "Done"
activationMode: "background"
authenticationRequired: yes
destructive: yes
behavior: 'default'
- identifier: 'TRASH_REMIND_LATER'
title: 'Remind Later'
activationMode: 'background'
behavior: "default"
- identifier: "TRASH_REMIND_LATER"
title: "Remind Later"
activationMode: "background"
authenticationRequired: yes
destructive: yes
behavior: 'default'
behavior: "default"
- name: Welcome Home
identifier: 'welcome_home'
identifier: "welcome_home"
actions:
- identifier: 'DISABLE_SECURITY'
title: 'Yes'
activationMode: 'background'
- identifier: "DISABLE_SECURITY"
title: "Yes"
activationMode: "background"
authenticationRequired: yes
destructive: yes
behavior: 'default'
behavior: "default"
telegram_bot:
- platform: broadcast
api_key: !secret telegram_apikey
allowed_chat_ids:
- !secret telegram_chatid
# influxdb:
# host: 192.168.1.125
# include:
@ -203,4 +209,4 @@ telegram_bot:
# - sensor.downstairs_multi_sensor_temperature
# - sensor.front_room_multi_sensor_temperature
# - sensor.guest_bedroom_multi_sensor_temperature
# - sensor.tv_multi_sensor_temperature
# - sensor.tv_multi_sensor_temperature

View File

@ -12,11 +12,11 @@ cards:
- font-weight: bold
- color: rgb(255, 255, 255)
state:
- value: 'disarmed'
- value: "disarmed"
color: rgb(255,0,0)
- value: 'armed_home'
- value: "armed_home"
color: rgb(0, 128, 0)
- value: 'armed_away'
- value: "armed_away"
color: rgb(0, 0, 255)
action: more_info
@ -29,11 +29,11 @@ cards:
- font-weight: bold
- color: rgb(255, 255, 255)
state:
- value: 'heat'
- value: "heat"
color: rgb(255,0,0)
- value: 'eco'
- value: "eco"
color: rgb(0, 128, 0)
- value: 'cool'
- value: "cool"
color: rgb(0, 0, 255)
action: service
service:
@ -44,36 +44,34 @@ cards:
title: Device Trackers
show_header_toggle: false
entities:
- device_tracker.hasika_hasika
- device_tracker.mallika_mallika
- device_tracker.srinika_srinika
- device_tracker.suresh_suresh
- entity: device_tracker.life360_suresh
name: Suresh
- entity: device_tracker.life360_mallika
name: Mallika
- entity: device_tracker.life360_srinika
name: Srinika
- entity: device_tracker.life360_hasika
name: Hasika
- entity: device_tracker.tesla_model_3_5yj3e1ea8jf010610_location_tracker
name: Tesla
state_filter:
- 'home'
- "home"
card:
type: glance
title: Kalavala Family
- type: entities
title: Master Bedroom Occupancy Value
show_header_toggle: false
entities:
- sensor.master_bed_sensor
- type: entity-filter
title: For Your Information
show_empty: false
show_header_toggle: false
entities:
- entity: sensor.hasika_iphone_battery_state
- entity: sensor.hasika_battery_state
name: Hasika
- entity: sensor.mallika_iphone_battery_state
- entity: sensor.mallika_battery_state
name: Mallika
- entity: sensor.srinika_iphone_battery_state
- entity: sensor.srinika_battery_state
name: Srinika
- entity: sensor.srinika_iphone_battery_state
- entity: sensor.srinika_battery_state
name: Suresh
- entity: sensor.hasika_iphone_wifi_state
name: Hasika
@ -86,26 +84,17 @@ cards:
- sensor.recycle_day
- sensor.trash_day
state_filter:
- 'Charging'
- 'yes'
- 'Not Connected'
- "Charging"
- "yes"
- "Not Connected"
card:
type: glance
title: FYI
- type: entities
title: Where Is Everyone
show_header_toggle: false
entities:
- sensor.hasika_location
- sensor.mallika_location
- sensor.srinika_location
- sensor.suresh_location
- type: conditional
conditions:
- entity: input_boolean.emergency_mode
state: 'on'
state: "on"
card:
type: entities
title: Emergency Scripts
@ -146,9 +135,9 @@ cards:
- entity: binary_sensor.two_car_garage_door_tilt_sensor_sensor
name: Double Car Garage Door
state_filter:
- 'on'
- 'opened'
- 'Open'
- "on"
- "opened"
- "Open"
card:
type: glance
title: Doors
@ -159,7 +148,7 @@ cards:
cards:
- type: gauge
name: Suresh Phone
unit: '%'
unit: "%"
entity: input_label.suresh_battery
severity:
green: 75
@ -167,7 +156,7 @@ cards:
red: 30
- type: gauge
name: Mallika Phone
unit: '%'
unit: "%"
entity: input_label.mallika_battery
severity:
green: 75
@ -177,7 +166,7 @@ cards:
cards:
- type: gauge
name: Srinika Phone
unit: '%'
unit: "%"
entity: input_label.srinika_battery
severity:
green: 75
@ -185,7 +174,7 @@ cards:
red: 30
- type: gauge
name: Hasika Phone
unit: '%'
unit: "%"
entity: input_label.hasika_battery
severity:
green: 75
@ -203,7 +192,7 @@ cards:
show_info: true
tap_action:
action: more-info
- type: conditional
conditions:
- entity: sensor.usps_mail
@ -230,7 +219,7 @@ cards:
- type: conditional
conditions:
- entity: sensor.season
state: 'spring'
state: "spring"
card:
type: vertical-stack
cards:
@ -238,7 +227,7 @@ cards:
cards:
- type: gauge
name: Pollen Today
unit: '%'
unit: "%"
entity: sensor.allergy_index_today
max: 12.0
severity:
@ -247,7 +236,7 @@ cards:
red: 7
- type: gauge
name: Pollen Tomorrow
unit: '%'
unit: "%"
entity: sensor.allergy_index_tomorrow
max: 12.0
severity:
@ -258,7 +247,7 @@ cards:
cards:
- type: gauge
name: Asthma Today
unit: '%'
unit: "%"
entity: sensor.asthma_index_forecasted_average
severity:
green: 0
@ -266,7 +255,7 @@ cards:
red: 7
- type: gauge
name: Asthma Tomorrow
unit: '%'
unit: "%"
entity: sensor.asthma_index_tomorrow
severity:
green: 0
@ -301,10 +290,10 @@ cards:
- binary_sensor.two_car_garage_door_tilt_sensor_sensor
- binary_sensor.upstairs_multi_sensor_sensor
state_filter:
- 'on'
- 'detected'
- 'opened'
- 'Open'
- "on"
- "detected"
- "opened"
- "Open"
card:
type: entities
title: Motion Sensors

View File

@ -5,7 +5,7 @@ cards:
title: Upstairs
show_header_toggle: true
entities:
- light.master_bedroom
- light.master_bedroom
- entity: light.master_bedroom_1
name: Suresh's Bedside Light
- entity: light.master_bedroom_2
@ -46,9 +46,9 @@ cards:
show_header_toggle: false
entities:
- switch.garage
- entity: switch.tesla_model_3_5yj3e1ea8jf010610_charger_switch
- entity: switch.tesla_model_3_charger_switch
name: Tesla Charger Switch
- entity: switch.tesla_model_3_5yj3e1ea8jf010610_maxrange_switch
- entity: switch.tesla_model_3_maxrange_switch
name: Tesla Max Range Switch
- type: entities

View File

@ -13,7 +13,7 @@ cards:
hours_to_show: 12
- type: gauge
entity: sensor.dining_room_thermostat_humidity
unit: '%'
unit: "%"
name: Home Humidity
severity:
green: 40
@ -25,7 +25,7 @@ cards:
show_header_toggle: false
entities:
- climate.dining_room
- climate.tesla_model_3_5yj3e1ea8jf010610_hvac_climate_system
- climate.tesla_model_3_hvac_climate_system
- binary_sensor.dining_room_thermostat_fan
- binary_sensor.dining_room_thermostat_has_leaf
- binary_sensor.dining_room_thermostat_is_locked
@ -38,7 +38,7 @@ cards:
- sensor.dining_room_thermostat_temperature
- type: history-graph
title: 'Temperature'
title: "Temperature"
entities:
- entity: sensor.dark_sky_apparent_temperature
name: Outside

View File

@ -7,16 +7,16 @@ cards:
cards:
- type: gauge
name: Tesla Battery
unit: '%'
entity: sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor
unit: "%"
entity: sensor.tesla_model_3_battery_sensor
severity:
green: 75
yellow: 40
red: 25
- type: gauge
name: Battery Range
unit: 'miles'
entity: sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor
unit: "miles"
entity: sensor.tesla_model_3_range_sensor
max: 320
min: 0
severity:
@ -24,15 +24,15 @@ cards:
yellow: 100
red: 75
- type: thermostat
entity: climate.tesla_model_3_5yj3e1ea8jf010610_hvac_climate_system
entity: climate.tesla_model_3_hvac_climate_system
- type: horizontal-stack
cards:
- type: sensor
entity: sensor.tesla_model_3_5yj3e1ea8jf010610_temperature_sensor_inside
entity: sensor.tesla_model_3_temperature_sensor_inside
name: Temperature Inside
graph: line
- type: sensor
entity: sensor.tesla_model_3_5yj3e1ea8jf010610_temperature_sensor_outside
entity: sensor.tesla_model_3_temperature_sensor_outside
name: Temperature outside
graph: line
@ -41,14 +41,14 @@ cards:
show_header_toggle: false
entities:
- device_tracker.tesla_model_3_5yj3e1ea8jf010610_location_tracker
- binary_sensor.tesla_model_3_5yj3e1ea8jf010610_parking_brake_sensor
- lock.tesla_model_3_5yj3e1ea8jf010610_door_lock
- sensor.tesla_model_3_5yj3e1ea8jf010610_mileage_sensor
- binary_sensor.tesla_model_3_parking_brake_sensor
- lock.tesla_model_3_door_lock
- sensor.tesla_model_3_mileage_sensor
- type: entities
title: Charging
show_header_toggle: false
entities:
- binary_sensor.tesla_model_3_5yj3e1ea8jf010610_charger_sensor
- switch.tesla_model_3_5yj3e1ea8jf010610_charger_switch
- switch.tesla_model_3_5yj3e1ea8jf010610_maxrange_switch
- binary_sensor.tesla_model_3_charger_sensor
- switch.tesla_model_3_charger_switch
- switch.tesla_model_3_maxrange_switch

View File

@ -61,6 +61,9 @@ cards:
- type: media-control
entity: media_player.attic_tv
- type: media-control
entity: media_player.chromecastultra7021
# - type: media-control
# entity: media_player.my_denon_receiver

View File

@ -29,7 +29,7 @@ cards:
- type: conditional
conditions:
- entity: input_boolean.alarm_clock
state: 'on'
state: "on"
card:
type: entities
title: Alarm Clock
@ -46,7 +46,6 @@ cards:
title: Zone Based Alerts
show_header_toggle: false
entities:
- automation.alert_life365_error
- automation.alert_private_zone_enter
- automation.alert_private_zone_leaves
- automation.alert_when_everyone_is_away
@ -138,8 +137,6 @@ cards:
title: Home Security Automations
show_header_toggle: false
entities:
- automation.disable_emergency_mode_upon_disabling_home_security
- automation.home_security_away_motion_deteted_inside
- automation.home_security_status_leeo_color
- automation.home_security_system_watchdog_10_minutes
- automation.home_security_system_watchdog_30_minutes
@ -150,7 +147,7 @@ cards:
- type: conditional
conditions:
- entity: input_boolean.light_automations
state: 'on'
state: "on"
card:
type: entities
title: Light Automations
@ -233,7 +230,6 @@ cards:
- automation.weather_input_boolean_updates
- automation.rain_alerts
- automation.snow_and_sleet_alerts
- automation.update_openuv_every_30_minutes_during_the_daytime
- automation.alert_super_heavy_winds
- type: entities
@ -252,7 +248,6 @@ cards:
show_header_toggle: false
entities:
- automation.notify_home_status_when_away
- automation.emergency_mode_disabled
- automation.home_mode_away_on
- automation.hourly_report_during_day_time
- automation.check_wi_fi_status_of_iphones_at_home
@ -288,7 +283,6 @@ cards:
- automation.update_available_notification
- automation.update_zwave_battery_levels
- automation.ups_state_change
- automation.water_leak_detected
- type: entities
title: Misc Automations

View File

@ -6,7 +6,6 @@
###############################################################################
homeassistant:
customize:
group.batteries:
order: 2
@ -38,25 +37,24 @@ homeassistant:
friendly_name: Suresh Phone Wi-Fi Status
sensor:
- platform: mqtt
state_topic: "owntracks/mallika/mallika"
name: "Mallika iPhone Battery (OT)"
unit_of_measurement: "%"
value_template: "{{ value_json.batt }}"
- platform: mqtt
state_topic: "owntracks/suresh/suresh"
name: "Suresh iPhone Battery (OT)"
unit_of_measurement: "%"
value_template: "{{ value_json.batt }}"
- platform: mqtt
state_topic: "owntracks/srinika/srinika"
name: "Srinika iPhone Battery (OT)"
unit_of_measurement: "%"
value_template: "{{ value_json.batt }}"
- platform: mqtt
state_topic: "owntracks/hasika/hasika"
name: "Hasika iPhone Battery (OT)"
@ -84,7 +82,7 @@ sensor:
Not Charging
{% endif %}
icon: "mdi:battery-charging"
- platform: mqtt
state_topic: "owntracks/srinika/srinika"
name: "Srinika iPhone Battery State"
@ -154,31 +152,31 @@ sensor:
- platform: mqtt
state_topic: "owntracks/mallika/mallika"
name: "Mallika Driving Speed"
value_template: '{{ value_json.vel |int|round}}'
value_template: "{{ value_json.vel |int|round}}"
unit_of_measurement: miles
- platform: mqtt
state_topic: "owntracks/suresh/suresh"
name: "Suresh Driving Speed"
value_template: '{{ value_json.vel |int|round}}'
value_template: "{{ value_json.vel |int|round}}"
unit_of_measurement: miles
- platform: mqtt
state_topic: "owntracks/srinika/srinika"
name: "Srinika Driving Speed"
value_template: '{{ value_json.vel |int|round}}'
value_template: "{{ value_json.vel |int|round}}"
unit_of_measurement: miles
- platform: mqtt
state_topic: "owntracks/hasika/hasika"
name: "Hasika Driving Speed"
value_template: '{{ value_json.vel |int|round}}'
value_template: "{{ value_json.vel |int|round}}"
unit_of_measurement: miles
- platform: template
sensors:
suresh_iphone_battery_ot:
unit_of_measurement: '%'
unit_of_measurement: "%"
value_template: >
{% if states('sensor.suresh_iphone_battery_ot') != "unknown" %}
{{ states('sensor.suresh_iphone_battery_ot')| int }}
@ -221,7 +219,7 @@ sensor:
- platform: template
sensors:
mallika_iphone_battery_ot:
unit_of_measurement: '%'
unit_of_measurement: "%"
value_template: "{{ states('sensor.mallika_iphone_battery_ot')|int(-1) }}"
icon_template: >-
{% if states('sensor.mallika_iphone_battery_ot') != "unknown" %}
@ -255,11 +253,11 @@ sensor:
{% else %}
mdi:battery-alert
{% endif %}
- platform: template
sensors:
srinika_iphone_battery_ot:
unit_of_measurement: '%'
unit_of_measurement: "%"
value_template: "{{ states('sensor.srinika_iphone_battery_ot')|int(-1) }}"
icon_template: >-
{% if states('sensor.srinika_iphone_battery_ot') != "unknown" %}
@ -293,11 +291,11 @@ sensor:
{% else %}
mdi:battery-alert
{% endif %}
- platform: template
sensors:
hasika_iphone_battery_ot:
unit_of_measurement: '%'
unit_of_measurement: "%"
value_template: "{{ states('sensor.hasika_iphone_battery_ot')|int(-1) }}"
icon_template: >-
{% if states('sensor.hasika_iphone_battery_ot') != "unknown" %}
@ -333,30 +331,29 @@ sensor:
{% endif %}
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
#
# This automation alerts family members when they are "moving" - meaning either in driving from work,
# kids got on the school bus, and bus is moving...etc
# This will only announces/ alert when someone is at home.
#
#
# This automation alerts family members when they are "moving" - meaning either in driving from work,
# kids got on the school bus, and bus is moving...etc
# This will only announces/ alert when someone is at home.
#
- alias: Alert When Moving
trigger:
trigger:
platform: numeric_state
entity_id:
- sensor.suresh_driving_speed
- sensor.mallika_driving_speed
- sensor.srinika_driving_speed
- sensor.hasika_driving_speed
- sensor.suresh_driving_speed
- sensor.mallika_driving_speed
- sensor.srinika_driving_speed
- sensor.hasika_driving_speed
above: 8
condition:
- condition: template
@ -382,19 +379,19 @@ automation:
{% set apostrophe = "\'" %}
{{ trigger.entity_id.split('.')[1].split('_')[0] |title ~ apostrophe ~ 's' }} vehicle is going at {{ trigger.to_state.state |round *2 }} mph.
###############################################################################
# Automation: Notify of iPhone Low Battery
###############################################################################
###############################################################################
# Automation: Notify of iPhone Low Battery
###############################################################################
- alias: Notify Low battery
initial_state: true
trigger:
platform: numeric_state
entity_id:
- device_tracker.suresh_suresh
- device_tracker.mallika_mallika
- device_tracker.srinika_srinika
- device_tracker.hasika_hasika
value_template: '{{ state.attributes.battery }}'
- device_tracker.life360_suresh
- device_tracker.life360_mallika
- device_tracker.life360_srinika
- device_tracker.life360_hasika
value_template: "{{ state.attributes.battery }}"
below: 25
condition:
- condition: template
@ -402,11 +399,10 @@ automation:
action:
- service: script.notify_me
data_template:
message: "{{ trigger.to_state.attributes.friendly_name | title }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
message: "{{ trigger.to_state.attributes.friendly_name.split(' ')[1] | title }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
- service: script.voice_notify
data_template:
message: "{{ trigger.to_state.attributes.friendly_name }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
message: "{{ trigger.to_state.attributes.friendly_name.split(' ')[1] }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
- alias: Alert Low Battery
trigger:
@ -430,9 +426,9 @@ automation:
{{ ns.lowBattery -}}
{{- ' battery is ' if ns.lowBattery.split(',')|count == 1 else ' batteries are ' -}} less than 25 percent.
# ###############################################################################
# # Automation: Notify of Sensor's Low Battery
# ###############################################################################
# ###############################################################################
# # Automation: Notify of Sensor's Low Battery
# ###############################################################################
# - alias: Alert Low Battery Level of Sensors
# initial_state: true
# trigger:
@ -451,7 +447,7 @@ automation:
# - zwave.back_door_sensor
# - zwave.basement_door_sensor
# - zwave.downstairs_multi_sensor
# - zwave.front_room_multi_sensor
# - zwave.front_room_multi_sensor
# - zwave.front_room_window_sensor
# - zwave.garage_door_sensor
# - zwave.guest_bedroom_multi_sensor
@ -477,28 +473,28 @@ automation:
trigger:
- platform: state
entity_id:
- device_tracker.mallika_mallika
- device_tracker.suresh_suresh
- device_tracker.srinika_srinika
- device_tracker.hasika_hasika
from: 'not_home'
to: 'home'
for: '00:05:00'
- device_tracker.life360_mallika
- device_tracker.life360_suresh
- device_tracker.life360_srinika
- device_tracker.life360_hasika
from: "not_home"
to: "home"
for: "00:05:00"
condition:
condition: or
conditions:
- condition: state
entity_id: sensor.hasika_iphone_wifi_state
state: 'Not Connected'
state: "Not Connected"
- condition: state
entity_id: sensor.mallika_iphone_wifi_state
state: 'Not Connected'
state: "Not Connected"
- condition: state
entity_id: sensor.srinika_iphone_wifi_state
state: 'Not Connected'
state: "Not Connected"
- condition: state
entity_id: sensor.suresh_iphone_wifi_state
state: 'Not Connected'
state: "Not Connected"
action:
- service: script.notify_me
data_template:

View File

@ -9,7 +9,7 @@
homeassistant:
#
# The camera url format in secrets.yaml would look like this:
# The camera url format in secrets.yaml would look like this:
# frontdoor_camera_url: http://username:password@192.168.xxx.xxx/ISAPI/Streaming/channels/101/picture
#
camera:
@ -74,14 +74,13 @@ camera:
file_path: "/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_latest.jpg"
binary_sensor:
- platform: hikvision
name: Frontdoor Camera
ssl: false
host: !secret frontdoor_camera_ip
username: !secret camera_username
password: !secret camera_password
- platform: hikvision
name: Driveway Camera
ssl: false
@ -134,7 +133,7 @@ rest_command:
username: !secret camera_username
password: !secret camera_password
method: PUT
content_type: 'text/xml'
content_type: "text/xml"
payload: >-
<?xml version="1.0" encoding="UTF-8"?>
<TextOverlay version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
@ -148,7 +147,7 @@ rest_command:
username: !secret camera_username
password: !secret camera_password
method: PUT
content_type: 'text/xml'
content_type: "text/xml"
payload: >-
<?xml version="1.0" encoding="UTF-8"?>
<TextOverlay version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
@ -162,7 +161,7 @@ rest_command:
username: !secret camera_username
password: !secret camera_password
method: PUT
content_type: 'text/xml'
content_type: "text/xml"
payload: >-
<?xml version="1.0" encoding="UTF-8"?>
<TextOverlay version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
@ -176,7 +175,7 @@ rest_command:
username: !secret camera_username
password: !secret camera_password
method: PUT
content_type: 'text/xml'
content_type: "text/xml"
payload: >-
<?xml version="1.0" encoding="UTF-8"?>
<TextOverlay version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
@ -186,20 +185,19 @@ rest_command:
</TextOverlay>
###############################################################################
# _____ _ _
# / ____| (_) | |
# | (___ ___ _ __ _ _ __ | |_ ___
# _____ _ _
# / ____| (_) | |
# | (___ ___ _ __ _ _ __ | |_ ___
# \___ \ / __| '__| | '_ \| __/ __|
# ____) | (__| | | | |_) | |_\__ \
# |_____/ \___|_| |_| .__/ \__|___/
# | |
# |_|
# | |
# |_|
#
script:
###############################################################################
# Camera Text Overlay Script - sets a given text as an overlay on camera feed
#
###############################################################################
# Camera Text Overlay Script - sets a given text as an overlay on camera feed
#
frontdoor_camera_text_overlay:
sequence:
- service: rest_command.set_frontdoor_camera_text_left_bottom
@ -224,9 +222,9 @@ script:
data_template:
message: "{{text}}"
###############################################################################
# On-Demand camera stream to chromecast scripts
#
###############################################################################
# On-Demand camera stream to chromecast scripts
#
stream_frontdoor_camera_to_chromecast:
sequence:
- condition: template
@ -234,7 +232,7 @@ script:
- service: script.stream2chromecast
data_template:
url: !secret frontdoor_camera_stream_url
name: 'frontyard'
name: "frontyard"
stream_driveway_camera_to_chromecast:
sequence:
@ -243,7 +241,7 @@ script:
- service: script.stream2chromecast
data_template:
url: !secret driveway_camera_stream_url
name: 'driveway'
name: "driveway"
stream_patio_camera_to_chromecast:
sequence:
@ -252,7 +250,7 @@ script:
- service: script.stream2chromecast
data_template:
url: !secret patio_camera_stream_url
name: 'patio'
name: "patio"
stream_playarea_camera_to_chromecast:
sequence:
@ -261,14 +259,14 @@ script:
- service: script.stream2chromecast
data_template:
url: !secret playarea_camera_stream_url
name: 'playarea'
name: "playarea"
###############################################################################
# Stream2Chromecast script streams a given URL to Chromecast
# But before it streams, it turns ON the media player if it is OFF, and after
# streaming the URL, it saves the current stream name
# BY calling media_player.turn_off, it forces Chromecast stream onto be active
# on TV as soon as it turns ON TV
###############################################################################
# Stream2Chromecast script streams a given URL to Chromecast
# But before it streams, it turns ON the media player if it is OFF, and after
# streaming the URL, it saves the current stream name
# BY calling media_player.turn_off, it forces Chromecast stream onto be active
# on TV as soon as it turns ON TV
stream2chromecast:
sequence:
- condition: template
@ -284,36 +282,35 @@ script:
value: "{{ name }}"
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
#
# Scan front door and driveway cameras when motion detected
# if the garage doors are open, scan garage cameras as well
#
#
# Scan front door and driveway cameras when motion detected
# if the garage doors are open, scan garage cameras as well
#
- alias: Scan Frontdoor Camera On Motion
initial_state: true
hide_entity: false
trigger:
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d00024ee084
to: 'on'
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d00024ee084
to: "on"
action:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
- service: script.stream2chromecast
data_template:
url: !secret frontdoor_camera_stream_url
name: 'frontyard'
name: "frontyard"
- condition: template
value_template: "{{ states('alarm_control_panel.simplisafe') == 'armed_home' or states('alarm_control_panel.simplisafe') == 'armed_away' }}"
- service: image_processing.scan
@ -345,7 +342,7 @@ automation:
{%- endfor -%}
{{ " detected in the front yard." }}
{%- endif -%}
greeting: 'no'
greeting: "no"
- service: notify.notify_smtp
data_template:
title: 'Front door motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
@ -375,25 +372,25 @@ automation:
- service: image_processing.scan
data_template:
entity_id: image_processing.tensorflow_garage_camera
#
# Scan driveway and frontdoor cameras when motion detected
# if the garage doors are open, scan garage cameras as well
#
#
# Scan driveway and frontdoor cameras when motion detected
# if the garage doors are open, scan garage cameras as well
#
- alias: Scan Driveway Camera When Motion
initial_state: true
hide_entity: false
trigger:
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d00024e57fb
to: 'on'
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d00024e57fb
to: "on"
action:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
- service: script.stream2chromecast
data_template:
url: !secret driveway_camera_stream_url
name: 'driveway'
name: "driveway"
- condition: template
value_template: "{{ states('alarm_control_panel.simplisafe') == 'armed_home' or states('alarm_control_panel.simplisafe') == 'armed_away' }}"
- service: image_processing.scan
@ -455,18 +452,18 @@ automation:
data_template:
entity_id: image_processing.tensorflow_garage_camera
#
# When motion detected in garage, scan garage camera
# If any of the garage doors are open, scan front door, driveway as well!
#
#
# When motion detected in garage, scan garage camera
# If any of the garage doors are open, scan front door, driveway as well!
#
- alias: Scan Garage Camera When Motion
initial_state: true
hide_entity: false
trigger:
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d000272bf48
to: 'on'
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d000272bf48
to: "on"
condition:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
@ -500,7 +497,7 @@ automation:
{% endif %}
{% else %}
false
{% endif %}
{% endif %}
- service: script.voice_notify
data_template:
message: >-
@ -531,24 +528,24 @@ automation:
data:
images:
- "/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_latest.jpg"
#
# When motion detected in the backyard, scan both cameras
#
#
# When motion detected in the backyard, scan both cameras
#
- alias: Scan Backyard Camera When Motion
initial_state: true
hide_entity: false
trigger:
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d00024e842c
to: 'on'
- platform: state
entity_id:
- binary_sensor.motion_sensor_158d00024e842c
to: "on"
action:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
- service: script.stream2chromecast
data_template:
url: !secret playarea_camera_stream_url
name: 'backyard'
name: "backyard"
- condition: template
value_template: "{{ states('alarm_control_panel.simplisafe') == 'armed_home' or states('alarm_control_panel.simplisafe') == 'armed_away' }}"
- service: image_processing.scan
@ -600,46 +597,46 @@ automation:
- "/home/homeassistant/.homeassistant/www/downloads/camera/patio/patio_latest.jpg"
- "/home/homeassistant/.homeassistant/www/downloads/camera/playarea/playarea_latest.jpg"
# Before you think this code is crazy, here is an explanation.
#
# I have a xiaomi aqara PIR motion sensor near the front door, and
# when it triggers, I capture photo from the camera, save it locally
# using last_triggered date and time as filename... then send that
# image to my email as an attacment.
#
# In the action, I have multiple services I am calling, and one service
# creates file, and I needed that file name in the second service.
# Since passing variables/info between the services within an action,
# is not possible, I generate the file name based on the automation's
# last_triggered date. Since that info is same across all the services
# within the automation, I now can access/use the same file name everywhere!
#
# I only send iOS notifications when I am home, as my HA is not exposed to
# Internet, & I can't see my camera unless I login to my vpn on my device.
# That's why you see the condition right above iOS notification service.
#
# Make sure you add the path to white_list in the configuration.yaml file.
# If front door is open, wait for a couple of seconds, before taking pic!
#
# Before you think this code is crazy, here is an explanation.
#
# I have a xiaomi aqara PIR motion sensor near the front door, and
# when it triggers, I capture photo from the camera, save it locally
# using last_triggered date and time as filename... then send that
# image to my email as an attacment.
#
# In the action, I have multiple services I am calling, and one service
# creates file, and I needed that file name in the second service.
# Since passing variables/info between the services within an action,
# is not possible, I generate the file name based on the automation's
# last_triggered date. Since that info is same across all the services
# within the automation, I now can access/use the same file name everywhere!
#
# I only send iOS notifications when I am home, as my HA is not exposed to
# Internet, & I can't see my camera unless I login to my vpn on my device.
# That's why you see the condition right above iOS notification service.
#
# Make sure you add the path to white_list in the configuration.yaml file.
# If front door is open, wait for a couple of seconds, before taking pic!
#
# I could have combined all the 3 automations into one, but if all the motion
# sensors are triggered at the same time, the automation would only fire once,
# and the code gets ugly big and unmanageable. 3 simple automations is better!
# I could have combined all the 3 automations into one, but if all the motion
# sensors are triggered at the same time, the automation would only fire once,
# and the code gets ugly big and unmanageable. 3 simple automations is better!
###############################################################################
# ______ _ _
# | ____| | | | |
# | |__ _ __ ___ _ __ | |_ __| | ___ ___ _ __
# | __| '__/ _ \| '_ \| __/ _` |/ _ \ / _ \| '__|
# | | | | | (_) | | | | || (_| | (_) | (_) | |
# |_| |_| \___/|_| |_|\__\__,_|\___/ \___/|_|
###############################################################################
# ______ _ _
# | ____| | | | |
# | |__ _ __ ___ _ __ | |_ __| | ___ ___ _ __
# | __| '__/ _ \| '_ \| __/ _` |/ _ \ / _ \| '__|
# | | | | | (_) | | | | || (_| | (_) | (_) | |
# |_| |_| \___/|_| |_|\__\__,_|\___/ \___/|_|
- alias: Notify Frontdoor Camera Snapshots
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d00024ee084
to: 'on'
to: "on"
condition:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
@ -650,38 +647,41 @@ automation:
- service: camera.snapshot
data_template:
entity_id: "camera.frontdoor_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
entity_id: "camera.driveway_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
entity_id: "camera.garage_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.notify_smtp
data_template:
title: 'Front door motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: 'Motion detected at the front door on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") -}}. Please see the images below.'
data:
images:
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states.device_tracker.suresh_suresh.state == 'home' }}"
value_template: "{{ states.device_tracker.life360_suresh.state == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Front Door camera!"
@ -693,21 +693,21 @@ automation:
url: "{{ states.camera.frontdoor_camera.attributes.entity_picture }}"
content-type: jpg
# ###############################################################################
# # _____ _
# # | __ \ (_)
# # | | | |_ __ ___ _______ ____ _ _ _
# # | | | | '__| \ \ / / _ \ \ /\ / / _` | | | |
# # | |__| | | | |\ V / __/\ V V / (_| | |_| |
# # |_____/|_| |_| \_/ \___| \_/\_/ \__,_|\__, |
# # __/ |
# # |___/
# ###############################################################################
# # _____ _
# # | __ \ (_)
# # | | | |_ __ ___ _______ ____ _ _ _
# # | | | | '__| \ \ / / _ \ \ /\ / / _` | | | |
# # | |__| | | | |\ V / __/\ V V / (_| | |_| |
# # |_____/|_| |_| \_/ \___| \_/\_/ \__,_|\__, |
# # __/ |
# # |___/
- alias: Notify Driveway Camera Snapshots
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d00024e57fb
to: 'on'
to: "on"
condition:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
@ -717,38 +717,41 @@ automation:
- service: camera.snapshot
data_template:
entity_id: "camera.frontdoor_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
entity_id: "camera.driveway_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
entity_id: "camera.garage_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.notify_smtp
data_template:
title: 'Driveway motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: 'Motion detected at the Driveway on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") }}. Please see the images below.'
data:
images:
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states.device_tracker.suresh_suresh.state == 'home' }}"
value_template: "{{ states.device_tracker.life360_suresh.state == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Driveway camera!"
@ -760,21 +763,21 @@ automation:
url: "{{ states.camera.driveway_camera.attributes.entity_picture }}"
content-type: jpg
# ###############################################################################
# # ____ _ _
# # | _ \ | | | |
# # | |_) | __ _ ___| | ___ _ __ _ _ __ __| |
# # | _ < / _` |/ __| |/ / | | |/ _` | '__/ _` |
# # | |_) | (_| | (__| <| |_| | (_| | | | (_| |
# # |____/ \__,_|\___|_|\_\\__, |\__,_|_| \__,_|
# # __/ |
# # |___/
# ###############################################################################
# # ____ _ _
# # | _ \ | | | |
# # | |_) | __ _ ___| | ___ _ __ _ _ __ __| |
# # | _ < / _` |/ __| |/ / | | |/ _` | '__/ _` |
# # | |_) | (_| | (__| <| |_| | (_| | | | (_| |
# # |____/ \__,_|\___|_|\_\\__, |\__,_|_| \__,_|
# # __/ |
# # |___/
- alias: Notify Backyard Camera Snapshots
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d00024e842c
to: 'on'
to: "on"
condition:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
@ -795,29 +798,31 @@ automation:
- service: camera.snapshot
data_template:
entity_id: "camera.patio_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/patio/patio_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/patio/patio_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
entity_id: "camera.playarea_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/playarea/playarea_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/playarea/playarea_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.notify_smtp
data_template:
title: 'Backyard motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: 'Motion detected in the Backyard on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") }}. Please see the images below.'
data:
images:
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/patio/patio_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/playarea/playarea_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/patio/patio_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/playarea/playarea_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states.device_tracker.suresh_suresh.state == 'home' }}"
value_template: "{{ states.device_tracker.life360_suresh.state == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Patio camera!"
@ -829,26 +834,25 @@ automation:
url: "{{ states.camera.patio_camera.attributes.entity_picture }}"
content-type: jpg
###############################################################################
# _______ _ ____ _
# |__ __| | | / __ \ | |
# | | _____ _| |_ | | | |_ _____ _ __| | __ _ _ _
# | |/ _ \ \/ / __| | | | \ \ / / _ \ '__| |/ _` | | | |
# | | __/> <| |_ | |__| |\ V / __/ | | | (_| | |_| |
# |_|\___/_/\_\\__| \____/ \_/ \___|_| |_|\__,_|\__, |
# __/ |
# |___/
#
# Show latest weather information on camera (refresh every 2 minutes), but only
# do it if the last updated is more than 2 minutes; In case some other automation
# sets a new text overlay, make sure it stays for at least 2 minutes before
# replacing with the weather information
#
###############################################################################
# _______ _ ____ _
# |__ __| | | / __ \ | |
# | | _____ _| |_ | | | |_ _____ _ __| | __ _ _ _
# | |/ _ \ \/ / __| | | | \ \ / / _ \ '__| |/ _` | | | |
# | | __/> <| |_ | |__| |\ V / __/ | | | (_| | |_| |
# |_|\___/_/\_\\__| \____/ \_/ \___|_| |_|\__,_|\__, |
# __/ |
# |___/
#
# Show latest weather information on camera (refresh every 2 minutes), but only
# do it if the last updated is more than 2 minutes; In case some other automation
# sets a new text overlay, make sure it stays for at least 2 minutes before
# replacing with the weather information
#
- alias: Show Outdoor Temperature on Camera
trigger:
- platform: time_pattern
minutes: '/2'
minutes: "/2"
condition:
- condition: template
value_template: >
@ -859,57 +863,57 @@ automation:
true
{% endif %}
action:
- service: script.frontdoor_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.driveway_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.playarea_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.patio_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.frontdoor_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.driveway_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.playarea_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.patio_camera_text_overlay
data_template:
text: >
{{ '* ' if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
###############################################################################
# _____ _ _
# / ____| | | |
# | | | |__ _ __ ___ _ __ ___ ___ ___ __ _ ___| |_
# | | | '_ \| '__/ _ \| '_ ` _ \ / _ \/ __/ _` / __| __|
# | |____| | | | | | (_) | | | | | | __/ (_| (_| \__ \ |_
# \_____|_| |_|_| \___/|_| |_| |_|\___|\___\__,_|___/\__|
#
#
# Automation to keep Chromecast ON always
# When chromecase goes into screen saver mode, the status becomes OFF
# This automation will turn it back on if it is OFF for more than 30 seconds
###############################################################################
# _____ _ _
# / ____| | | |
# | | | |__ _ __ ___ _ __ ___ ___ ___ __ _ ___| |_
# | | | '_ \| '__/ _ \| '_ ` _ \ / _ \/ __/ _` / __| __|
# | |____| | | | | | (_) | | | | | | __/ (_| (_| \__ \ |_
# \_____|_| |_|_| \___/|_| |_| |_|\___|\___\__,_|___/\__|
#
#
# Automation to keep Chromecast ON always
# When chromecase goes into screen saver mode, the status becomes OFF
# This automation will turn it back on if it is OFF for more than 30 seconds
- alias: Keep Chromecast On
trigger:
- platform: state
entity_id: media_player.attic_tv
to: 'off'
to: "off"
for:
seconds: 30
- platform: state
entity_id: media_player.attic_tv
to: 'idle'
to: "idle"
for:
seconds: 30
action:
@ -925,24 +929,24 @@ automation:
entity_id: input_label.current_stream
value: "frontyard"
# Motion can be detected anywhere around the house, but the main focus is "Frontyard".
# By default, the "frontyard" camera stream is played on Chromecast, but when motion
# detected anywhere else, it changes the stream to that corresponding camera.
# This automation restores back to "default" (frontyard) after 15 seconds!
#
# Motion can be detected anywhere around the house, but the main focus is "Frontyard".
# By default, the "frontyard" camera stream is played on Chromecast, but when motion
# detected anywhere else, it changes the stream to that corresponding camera.
# This automation restores back to "default" (frontyard) after 15 seconds!
#
- alias: Restore Frontyard Stream
trigger:
- platform: time_pattern
seconds: '/5'
seconds: "/5"
condition:
- condition: template
value_template: "{{ states('input_label.current_stream') != 'frontyard' }}"
- condition: template
value_template: "{{ (as_timestamp(now()) -
as_timestamp(states.input_label.current_stream.last_updated))
| int > 15 }}"
value_template: "{{ (as_timestamp(now()) -
as_timestamp(states.input_label.current_stream.last_updated))
| int > 15 }}"
action:
- service: script.stream2chromecast
data_template:
url: !secret frontdoor_camera_stream_url
name: 'frontyard'
name: "frontyard"

View File

@ -1,312 +1,312 @@
###############################################################################
# @author : Mahasri Kalavala
# @date : 11/22/2017
# @package : Emergency Stuff
# @description : When $hit hapens, this package gets called!
#
# In case of emergency - turn on the emergency_mode (input boolean)
# lights, crazy sounds and alarms repeatedly until someone turns off
# input boolean and/or Home Security System is turned OFF.
#
# All automations that alert during emerency situations, will turn on
# input boolean emergency_mode and notify using standard notification
#
# My Home TTS/voice notifications will not work when music is being played
# The automations will stop MPD media player ( just to makesure), so that
# the TTS notifications will be played in case if someone plays music and
# forgot to turn if off.
###############################################################################
homeassistant:
customize:
script.emergency_script:
friendly_name: Emergency Script
hidden: true
script.emergency_script_loop:
friendly_name: Emergency Script Loop
hidden: true
script.emergency_all_lights_switches_on:
friendly_name: All Lights & Switches ON
script.all_indoor_lights_off:
friendly_name: All Indoor Lights OFF
input_boolean:
emergency_mode:
name: Emergency Mode
initial: 'off'
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
###############################################################################
automation:
###############################################################################
# When emergency mode is OFF, Keep the lights ON
###############################################################################
- alias: Emergency Mode Disabled
initial_state: true
trigger:
platform: state
entity_id: input_boolean.emergency_mode
from: 'on'
to: 'off'
action:
- delay: '00:00:05'
- service: script.voice_notify
data_template:
message: "Attention! Emergency mode is now deactivated!"
- service: script.notify_me
data_template:
message: "Emergency mode is now deactivated!"
# Water Leak detected - initiate the emergency process
###############################################################################
- alias: Water Leak Detected
initial_state: true
trigger:
- platform: state
entity_id: sensor.aeotec_water_sensor_flood
from: '0'
to: '2'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.emergency_mode
- service: script.emergency_all_lights_switches_on
- service: script.notify_me
data_template:
message: "EMERGENCY! Water Leak Detected in the Basement!"
- service: script.emergency_script
data:
volume_level: 25
alarm_code: 2
message: "ALERT! Water Leak Detected in the Basement!"
# # Carbon Monoxide Detected in the house
# ###############################################################################
# - alias: CO Detected
# # @author : Mahasri Kalavala
# # @date : 11/22/2017
# # @package : Emergency Stuff
# # @description : When $hit hapens, this package gets called!
# #
# # In case of emergency - turn on the emergency_mode (input boolean)
# # lights, crazy sounds and alarms repeatedly until someone turns off
# # input boolean and/or Home Security System is turned OFF.
# #
# # All automations that alert during emerency situations, will turn on
# # input boolean emergency_mode and notify using standard notification
# #
# # My Home TTS/voice notifications will not work when music is being played
# # The automations will stop MPD media player ( just to makesure), so that
# # the TTS notifications will be played in case if someone plays music and
# # forgot to turn if off.
# ###############################################################################
# homeassistant:
# customize:
# script.emergency_script:
# friendly_name: Emergency Script
# hidden: true
# script.emergency_script_loop:
# friendly_name: Emergency Script Loop
# hidden: true
# script.emergency_all_lights_switches_on:
# friendly_name: All Lights & Switches ON
# script.all_indoor_lights_off:
# friendly_name: All Indoor Lights OFF
# input_boolean:
# emergency_mode:
# name: Emergency Mode
# initial: 'off'
# ###############################################################################
# # _ _ _
# # /\ | | | | (_)
# # / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# # / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# # / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# # /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
# #
# ###############################################################################
# automation:
# ###############################################################################
# # When emergency mode is OFF, Keep the lights ON
# ###############################################################################
# - alias: Emergency Mode Disabled
# initial_state: true
# trigger:
# platform: state
# entity_id: input_boolean.emergency_mode
# from: 'on'
# to: 'off'
# action:
# - delay: '00:00:05'
# - service: script.voice_notify
# data_template:
# message: "Attention! Emergency mode is now deactivated!"
# - service: script.notify_me
# data_template:
# message: "Emergency mode is now deactivated!"
# # Water Leak detected - initiate the emergency process
# ###############################################################################
# - alias: Water Leak Detected
# initial_state: true
# trigger:
# - platform: state
# entity_id: sensor.audio_detector_carbon_monoxide
# entity_id: sensor.aeotec_water_sensor_flood
# from: '0'
# condition:
# - condition: template
# value_template: "{{ trigger.to_state.state != '0' }}"
# to: '2'
# action:
# - service: script.voice_notify
# data_template:
# message: "Attention!: CARBON MONOXIDE DETECTED! GET THE HELL OUT OF THE HOUSE!"
# - service: script.notify_me
# data_template:
# message: "Attention!: CARBON MONOXIDE DETECTED!. GET THE HELL OUT OF THE HOUSE!"
# - service: input_boolean.turn_on
# entity_id: input_boolean.emergency_mode
# - service: media_player.media_stop
# entity_id: media_player.mpd
# - service: script.emergency_all_lights_switches_on
# - service: script.notify_me
# data_template:
# message: "EMERGENCY! Water Leak Detected in the Basement!"
# - service: script.emergency_script
# data:
# volume_level: 99
# volume_level: 25
# alarm_code: 2
# message: "Attention! Cabon Monoxide detected. Leave the house immediately!"
# message: "ALERT! Water Leak Detected in the Basement!"
# # Smoke Detected in the house
# # # Carbon Monoxide Detected in the house
# # ###############################################################################
# # - alias: CO Detected
# # initial_state: true
# # trigger:
# # - platform: state
# # entity_id: sensor.audio_detector_carbon_monoxide
# # from: '0'
# # condition:
# # - condition: template
# # value_template: "{{ trigger.to_state.state != '0' }}"
# # action:
# # - service: script.voice_notify
# # data_template:
# # message: "Attention!: CARBON MONOXIDE DETECTED! GET THE HELL OUT OF THE HOUSE!"
# # - service: script.notify_me
# # data_template:
# # message: "Attention!: CARBON MONOXIDE DETECTED!. GET THE HELL OUT OF THE HOUSE!"
# # - service: input_boolean.turn_on
# # entity_id: input_boolean.emergency_mode
# # - service: media_player.media_stop
# # entity_id: media_player.mpd
# # - service: script.emergency_script
# # data:
# # volume_level: 99
# # alarm_code: 2
# # message: "Attention! Cabon Monoxide detected. Leave the house immediately!"
# # # Smoke Detected in the house
# # ###############################################################################
# # - alias: Smoke Detected
# # initial_state: true
# # trigger:
# # - platform: state
# # entity_id: sensor.audio_detector_smoke
# # from: '0'
# # condition:
# # - condition: template
# # value_template: "{{ trigger.to_state.state != '0' }}"
# # action:
# # - service: script.voice_notify
# # data_template:
# # message: "Attention!: SMOKE DETECTED! CALL 911!"
# # - service: script.notify_me
# # data_template:
# # message: "Attention!: SMOKE DETECTED!. CALL 911!"
# # - service: input_boolean.turn_on
# # entity_id: input_boolean.emergency_mode
# # - service: media_player.media_stop
# # entity_id: media_player.mpd
# # - service: script.emergency_script
# # data:
# # volume_level: 99
# # alarm_code: 2
# # message: "Smoke Detected. Please get out of the home and call 911 immediately!"
# # Disable Emergency Mode upon Disabling Home Security System
# ###############################################################################
# - alias: Smoke Detected
# - alias: Disable Emergency Mode Upon Disabling Home Security
# initial_state: true
# trigger:
# - platform: state
# entity_id: sensor.audio_detector_smoke
# from: '0'
# platform: state
# entity_id: alarm_control_panel.simplisafe
# to: 'disarmed'
# condition:
# - condition: template
# value_template: "{{ trigger.to_state.state != '0' }}"
# value_template: '{{ states.input_boolean.emergency_mode.state == "on" }}'
# action:
# - service: input_boolean.turn_off
# entity_id: input_boolean.emergency_mode
# - alias: Home Security Away Motion Deteted Inside
# initial_state: true
# trigger:
# platform: state
# entity_id:
# - binary_sensor.back_door_sensor_sensor
# - binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor
# - binary_sensor.basement_door_sensor_sensor
# - binary_sensor.garage_door_sensor_sensor
# - binary_sensor.front_room_multi_sensor_sensor
# - binary_sensor.tv_multi_sensor_sensor
# - binary_sensor.kitchen_motion_sensor_sensor
# - binary_sensor.stairs_motion_sensor_sensor
# - binary_sensor.upstairs_multi_sensor_sensor
# - binary_sensor.two_car_garage_door_tilt_sensor_sensor
# - binary_sensor.single_car_garage_door_tilt_sensor_sensor
# - binary_sensor.motion_sensor_158d0001a662fe
# - binary_sensor.motion_sensor_158d0001a25041
# - binary_sensor.motion_sensor_158d00016db6d2
# - binary_sensor.motion_sensor_158d00016c2d0e
# from: 'off'
# to: 'on'
# condition:
# - condition: template
# value_template: "{{ trigger.from_state }}"
# - condition: template
# value_template: >
# {% set state = states.alarm_control_panel.simplisafe.state %}
# {% if state != "" and state != "unknown" and state == "armed_away" %}
# true
# {% else %}
# false
# {% endif %}
# - condition: template
# value_template: >
# {% set suresh = states.device_tracker.suresh_suresh.state %}
# {% set mallika = states.device_tracker.mallika_mallika.state %}
# {% set srinika = states.device_tracker.srinika_srinika.state %}
# {% set hasika = states.device_tracker.hasika_hasika.state %}
# {% if suresh != "home" and mallika != "home" and srinika != "home" and hasika != "home" %}
# True
# {% else %}
# False
# {% endif %}
# action:
# - service: script.voice_notify
# data_template:
# message: "Attention!: SMOKE DETECTED! CALL 911!"
# - service: script.notify_me
# data_template:
# message: "Attention!: SMOKE DETECTED!. CALL 911!"
# - service: input_boolean.turn_on
# entity_id: input_boolean.emergency_mode
# - service: media_player.media_stop
# entity_id: media_player.mpd
# - service: script.emergency_all_lights_switches_on
# - service: script.notify_me
# data_template:
# message: "MOTION DETECTED '{{ trigger.to_state.attributes.friendly_name | upper }}',
# BUT NO ONE IS HOME. CALL FOR EMERGENCY!"
# - service: notify.ios_devices
# data_template:
# title: >
# {{ trigger.to_state.attributes.friendly_name }}
# message: >
# Attention: "MOTION DETECTED '{{ trigger.to_state.attributes.friendly_name | upper }}',
# BUT NO ONE IS HOME. CALL FOR EMERGENCY!"
# - service: script.emergency_script
# data:
# volume_level: 99
# alarm_code: 2
# message: "Smoke Detected. Please get out of the home and call 911 immediately!"
# alarm_code: 1
# message: "Police are on the way!...Police are on the way!...Police are on the way!...Police are on the way!...Police are on the way!"
# Disable Emergency Mode upon Disabling Home Security System
###############################################################################
- alias: Disable Emergency Mode Upon Disabling Home Security
initial_state: true
trigger:
platform: state
entity_id: alarm_control_panel.simplisafe
to: 'disarmed'
condition:
- condition: template
value_template: '{{ states.input_boolean.emergency_mode.state == "on" }}'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.emergency_mode
# script:
- alias: Home Security Away Motion Deteted Inside
initial_state: true
trigger:
platform: state
entity_id:
- binary_sensor.back_door_sensor_sensor
- binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor
- binary_sensor.basement_door_sensor_sensor
- binary_sensor.garage_door_sensor_sensor
- binary_sensor.front_room_multi_sensor_sensor
- binary_sensor.tv_multi_sensor_sensor
- binary_sensor.kitchen_motion_sensor_sensor
- binary_sensor.stairs_motion_sensor_sensor
- binary_sensor.upstairs_multi_sensor_sensor
- binary_sensor.two_car_garage_door_tilt_sensor_sensor
- binary_sensor.single_car_garage_door_tilt_sensor_sensor
- binary_sensor.motion_sensor_158d0001a662fe
- binary_sensor.motion_sensor_158d0001a25041
- binary_sensor.motion_sensor_158d00016db6d2
- binary_sensor.motion_sensor_158d00016c2d0e
from: 'off'
to: 'on'
condition:
- condition: template
value_template: "{{ trigger.from_state }}"
- condition: template
value_template: >
{% set state = states.alarm_control_panel.simplisafe.state %}
{% if state != "" and state != "unknown" and state == "armed_away" %}
true
{% else %}
false
{% endif %}
- condition: template
value_template: >
{% set suresh = states.device_tracker.suresh_suresh.state %}
{% set mallika = states.device_tracker.mallika_mallika.state %}
{% set srinika = states.device_tracker.srinika_srinika.state %}
{% set hasika = states.device_tracker.hasika_hasika.state %}
{% if suresh != "home" and mallika != "home" and srinika != "home" and hasika != "home" %}
True
{% else %}
False
{% endif %}
action:
- service: input_boolean.turn_on
entity_id: input_boolean.emergency_mode
- service: script.emergency_all_lights_switches_on
- service: script.notify_me
data_template:
message: "MOTION DETECTED '{{ trigger.to_state.attributes.friendly_name | upper }}',
BUT NO ONE IS HOME. CALL FOR EMERGENCY!"
- service: notify.ios_devices
data_template:
title: >
{{ trigger.to_state.attributes.friendly_name }}
message: >
Attention: "MOTION DETECTED '{{ trigger.to_state.attributes.friendly_name | upper }}',
BUT NO ONE IS HOME. CALL FOR EMERGENCY!"
- service: script.emergency_script
data:
volume_level: 99
alarm_code: 1
message: "Police are on the way!...Police are on the way!...Police are on the way!...Police are on the way!...Police are on the way!"
# # Main Emergency Script
# ###############################################################################
# emergency_script:
# sequence:
# - condition: template
# value_template: '{{ states.input_boolean.emergency_mode.state | lower == "on" }}'
# - service: script.voice_notify
# data_template:
# message: '{{ message }}'
# greeting: 'no'
# - service: xiaomi_aqara.play_ringtone
# data_template:
# ringtone_id: '{{ alarm_code }}'
# ringtone_vol: '{{ volume_level }}'
# - delay: '00:00:01'
# - service: script.emergency_script_loop
# data_template:
# message: '{{ message }}'
# alarm_code: '{{ alarm_code }}'
# volume_level: '{{ volume_level }}'
script:
# # This script checks for the emergency_mode input_boolean and continue to
# # stay in emergency mode based on the input_boolean value
# ###############################################################################
# emergency_script_loop:
# sequence:
# - condition: template
# value_template: '{{ states.input_boolean.emergency_mode.state == "on" }}'
# - delay: '00:00:02'
# - service: script.emergency_script
# data_template:
# message: '{{ message }}'
# alarm_code: '{{ alarm_code }}'
# volume_level: '{{ volume_level }}'
# Main Emergency Script
###############################################################################
emergency_script:
sequence:
- condition: template
value_template: '{{ states.input_boolean.emergency_mode.state | lower == "on" }}'
- service: script.voice_notify
data_template:
message: '{{ message }}'
greeting: 'no'
- service: xiaomi_aqara.play_ringtone
data_template:
ringtone_id: '{{ alarm_code }}'
ringtone_vol: '{{ volume_level }}'
- delay: '00:00:01'
- service: script.emergency_script_loop
data_template:
message: '{{ message }}'
alarm_code: '{{ alarm_code }}'
volume_level: '{{ volume_level }}'
# This script checks for the emergency_mode input_boolean and continue to
# stay in emergency mode based on the input_boolean value
###############################################################################
emergency_script_loop:
sequence:
- condition: template
value_template: '{{ states.input_boolean.emergency_mode.state == "on" }}'
- delay: '00:00:02'
- service: script.emergency_script
data_template:
message: '{{ message }}'
alarm_code: '{{ alarm_code }}'
volume_level: '{{ volume_level }}'
# Turns ALL lights & Switches ON (Lights in RED where possible)
###############################################################################
emergency_all_lights_switches_on:
sequence:
- service: script.xiaomi_red
- service: script.ifttt_leeo_color_change
data_template:
value1: "#FF0000"
- service: light.turn_on
entity_id: light.family_room
data:
transition: 0
brightness: 255
rgb_color: [255,0,0]
- service: light.turn_on
entity_id: light.master_bedroom
data:
transition: 0
brightness: 255
rgb_color: [255,0,0]
- service: switch.turn_on
entity_id:
- switch.basement_left
- switch.basement_right
- switch.garage
- switch.guest_bedroom
- switch.prayer_room
- switch.kids_bed_accent
- switch.kids_bedroom
- switch.office_room
- switch.smart_outlet_1
- switch.kitchen
- switch.zwave_smart_switch_switch
- switch.rf_switch_five
- switch.rf_switch_four
- switch.rf_switch_one
- switch.rf_switch_three
- switch.rf_switch_two
- switch.wemobackyardlightswitch
- switch.frontyard_light
- switch.downstairs_bathroom_fragrance_outlet
- switch.downstairs_fragrance
- switch.upstairs_fragrance
- switch.kitchen_siren_switch
- switch.kitchen_siren_switch_2
- switch.kitchen_siren_switch_3
- switch.kitchen_siren_switch_4
- switch.kitchen_siren_switch_5
- switch.wemoswitch1
# # Turns ALL lights & Switches ON (Lights in RED where possible)
# ###############################################################################
# emergency_all_lights_switches_on:
# sequence:
# - service: script.xiaomi_red
# - service: script.ifttt_leeo_color_change
# data_template:
# value1: "#FF0000"
# - service: light.turn_on
# entity_id: light.family_room
# data:
# transition: 0
# brightness: 255
# rgb_color: [255,0,0]
# - service: light.turn_on
# entity_id: light.master_bedroom
# data:
# transition: 0
# brightness: 255
# rgb_color: [255,0,0]
# - service: switch.turn_on
# entity_id:
# - switch.basement_left
# - switch.basement_right
# - switch.garage
# - switch.guest_bedroom
# - switch.prayer_room
# - switch.kids_bed_accent
# - switch.kids_bedroom
# - switch.office_room
# - switch.smart_outlet_1
# - switch.kitchen
# - switch.zwave_smart_switch_switch
# - switch.rf_switch_five
# - switch.rf_switch_four
# - switch.rf_switch_one
# - switch.rf_switch_three
# - switch.rf_switch_two
# - switch.wemobackyardlightswitch
# - switch.frontyard_light
# - switch.downstairs_bathroom_fragrance_outlet
# - switch.downstairs_fragrance
# - switch.upstairs_fragrance
# - switch.kitchen_siren_switch
# - switch.kitchen_siren_switch_2
# - switch.kitchen_siren_switch_3
# - switch.kitchen_siren_switch_4
# - switch.kitchen_siren_switch_5
# - switch.wemoswitch1

View File

@ -1,52 +1,51 @@
homeassistant:
customize:
# homeassistant:
# customize:
# # Locations
# sensor.suresh_location:
# friendly_name: Suresh
# icon: mdi:map-marker
# sensor.mallika_location:
# friendly_name: Mallika
# icon: mdi:map-marker
# sensor.srinika_location:
# friendly_name: Srinika
# icon: mdi:map-marker
# sensor.hasika_location:
# friendly_name: Hasika
# icon: mdi:map-marker
# Locations
sensor.suresh_location:
friendly_name: Suresh
icon: mdi:map-marker
sensor.mallika_location:
friendly_name: Mallika
icon: mdi:map-marker
sensor.srinika_location:
friendly_name: Srinika
icon: mdi:map-marker
sensor.hasika_location:
friendly_name: Hasika
icon: mdi:map-marker
# # Google Calendar
# google:
# client_id: !secret google_client_id
# client_secret: !secret google_client_secret
# Google Calendar
google:
client_id: !secret google_client_id
client_secret: !secret google_client_secret
# # Google Travel Times and Geo Code/Location
# sensor:
# # Address/Location Details
# - platform: google_geocode
# name: Suresh Location
# api_key: !secret google_maps_geocoding_api
# origin: device_tracker.life360_suresh
# options: formatted_address
# display_zone: hide
# Google Travel Times and Geo Code/Location
sensor:
# Address/Location Details
- platform: google_geocode
name: Suresh Location
api_key: !secret google_maps_geocoding_api
origin: device_tracker.suresh_suresh
options: formatted_address
display_zone: hide
# - platform: google_geocode
# name: Mallika Location
# api_key: !secret google_maps_geocoding_api
# origin: device_tracker.life360_mallika
# options: formatted_address
# display_zone: hide
- platform: google_geocode
name: Mallika Location
api_key: !secret google_maps_geocoding_api
origin: device_tracker.mallika_mallika
options: formatted_address
display_zone: hide
# - platform: google_geocode
# name: Srinika Location
# api_key: !secret google_maps_geocoding_api
# origin: device_tracker.life360_srinika
# options: formatted_address
# display_zone: hide
- platform: google_geocode
name: Srinika Location
api_key: !secret google_maps_geocoding_api
origin: device_tracker.srinika_srinika
options: formatted_address
display_zone: hide
- platform: google_geocode
name: Hasika Location
api_key: !secret google_maps_geocoding_api
origin: device_tracker.hasika_hasika
options: formatted_address
display_zone: hide
# - platform: google_geocode
# name: Hasika Location
# api_key: !secret google_maps_geocoding_api
# origin: device_tracker.life360_hasika
# options: formatted_address
# display_zone: hide

View File

@ -1,12 +1,11 @@
###############################################################################
# @author : Mahasri Kalavala
# @date : 04/15/2017
# @package : Home Security
# @package : Home Security
# @description : Home Security System Sensors and Automations
###############################################################################
homeassistant:
customize:
group.home_security_system:
order: 7
@ -23,20 +22,20 @@ simplisafe:
password: !secret simplisafe_password
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
###############################################################################
# Leeo light - color indication of Home Security System
# BLUE for Secured (Home and Away), and RED for OFF or Trigerred
###############################################################################
###############################################################################
# Leeo light - color indication of Home Security System
# BLUE for Secured (Home and Away), and RED for OFF or Trigerred
###############################################################################
- alias: Home Security Status Leeo Color
initial_state: true
trigger:
@ -73,9 +72,9 @@ automation:
"#FF0000"
{% endif %}
###############################################################################
# Notify Security System State Change
###############################################################################
###############################################################################
# Notify Security System State Change
###############################################################################
- alias: Notify Home Security Status Change
initial_state: true
trigger:
@ -121,54 +120,54 @@ automation:
- service: input_boolean.turn_on
entity_id: input_boolean.notify_camera_motion
###############################################################################
# A gentle 10 minute reminder that the Home Security system is OFF
###############################################################################
###############################################################################
# A gentle 10 minute reminder that the Home Security system is OFF
###############################################################################
- alias: Home Security System WatchDog 10 minutes
initial_state: true
trigger:
- platform: state
entity_id:
- alarm_control_panel.simplisafe
to: 'disarmed'
for:
to: "disarmed"
for:
minutes: 10
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
action:
- service: script.notify_me
data:
message: "Home Security System is OFF for more than 10 minutes!"
###############################################################################
# A gentle reminder that the home security is OFF for more than 30 minutes
###############################################################################
###############################################################################
# A gentle reminder that the home security is OFF for more than 30 minutes
###############################################################################
- alias: Home Security System WatchDog 30 minutes
initial_state: true
trigger:
- platform: state
entity_id:
- alarm_control_panel.simplisafe
to: 'disarmed'
for:
to: "disarmed"
for:
minutes: 30
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: template
value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
action:
- service: script.notify_me
data:
data:
message: "Home Security System is OFF for more than 30 minutes!"
###############################################################################
# When home security system is turned OFF or turned to Home mode from "away"
# means, someone reached home from outside
###############################################################################
###############################################################################
# When home security system is turned OFF or turned to Home mode from "away"
# means, someone reached home from outside
###############################################################################
- alias: Turn ON Thermostat upon reaching home
initial_state: true
trigger:
@ -187,27 +186,27 @@ automation:
- service: climate.set_away_mode
data_template:
entity_id: climate.dining_room
away_mode: 'false'
away_mode: "false"
###############################################################################
# TURN HOME SECURITY SYSTEM ON AT BED TIME
###############################################################################
###############################################################################
# TURN HOME SECURITY SYSTEM ON AT BED TIME
###############################################################################
- alias: Night HomeSecurity On
initial_state: true
trigger:
platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: template
value_template: '{{ states.sensor.bedtime_hour.state|int == now().hour|int }}'
value_template: "{{ states.sensor.bedtime_hour.state|int == now().hour|int }}"
- condition: template
value_template: '{{ states.sensor.bedtime_minute.state|int == now().minute|int }}'
value_template: "{{ states.sensor.bedtime_minute.state|int == now().minute|int }}"
- condition: template
value_template: "{{ states('alarm_control_panel.simplisafe') != 'away' }}"
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: template
value_template: "{{ states('alarm_control_panel.simplisafe') == 'disarmed' }}"
- condition: template
@ -217,260 +216,259 @@ automation:
data:
entity_id: alarm_control_panel.simplisafe
- service: script.notify_me
data:
data:
message: "It's bedtime, you forgot to turn ON Home Security System. Turned it ON for you."
###############################################################################
# Check for Garage Door Status when Home Security System State changes
###############################################################################
# - alias: Home Security System And Garage Door Check
# initial_state: true
# trigger:
# - platform: time_pattern
# minutes: '/15'
# seconds: 00
# condition:
# condition: and
# conditions:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" or states.alarm_control_panel.simplisafe.state == "armed_away" }}'
# - condition: or
# conditions:
# - condition: template
# value_template: '{{ states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" }}'
# - condition: template
# value_template: '{{ states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" }}'
# action:
# - service: switch.turn_on
# entity_id: switch.garage
# - service: script.notify_me
# data_template:
# message: >
# Attention! Your home Security system is set to {{ states.alarm_control_panel.simplisafe.state.split('_')[1] | upper }} mode.
# BUT THE {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
# - service: camera.snapshot
# data_template:
# entity_id: "camera.garage_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: camera.snapshot
# data_template:
# entity_id: "camera.driveway_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: camera.snapshot
# data_template:
# entity_id: "camera.frontdoor_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: notify.notify_smtp
# data_template:
# title: 'Garage Picture {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
# message: >-
# {%- macro get_date(dt) %}
# {%- set date_suffix = ["th", "st", "nd", "rd"] -%}
# {{ dt.day }}
# {%- if dt.day % 10 in [1, 2, 3] and dt.day not in [11, 12, 13] -%}
# {{ date_suffix[dt.day%10] }}
# {%- else -%}
# {{ date_suffix[0] }}
# {%- endif %} {{ dt.strftime("%B %Y")}}
# {%- endmacro -%}
# {% set doors = "" %}
# {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = "Both garage doors" %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on"%}
# {% set doors = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% endif %}
# Your {{ doors }} seem to be open while your home security system is set to "{{ states.alarm_control_panel.simplisafe.state.split('_')[1]| title }}" mode. Today is {{ get_date(now()) }}, and time is {{ now().strftime("%I:%M:%S %p") }}. Please see the attached pictures and make sure everything is okay.
# data:
# images:
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" }}'
# - service: script.voice_notify
# data_template:
# message: >
# {% set doors = "" %}
# {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = "Both garage doors" %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on"%}
# {% set doors = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% endif %}
# Attention! Your home Security system is set to {{ states.alarm_control_panel.simplisafe.state.split('_')[1] | upper }} mode.
# BUT the {{ doors }} {{ 'are' if doors.endswith('s') else 'is' }} open.
# - alias: Home Security System And Garage Door Check
# initial_state: true
# trigger:
# - platform: time_pattern
# minutes: '/15'
# seconds: 00
# condition:
# condition: and
# conditions:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" or states.alarm_control_panel.simplisafe.state == "armed_away" }}'
# - condition: or
# conditions:
# - condition: template
# value_template: '{{ states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" }}'
# - condition: template
# value_template: '{{ states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" }}'
# action:
# - service: switch.turn_on
# entity_id: switch.garage
# - service: script.notify_me
# data_template:
# message: >
# Attention! Your home Security system is set to {{ states.alarm_control_panel.simplisafe.state.split('_')[1] | upper }} mode.
# BUT THE {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
# - service: camera.snapshot
# data_template:
# entity_id: "camera.garage_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: camera.snapshot
# data_template:
# entity_id: "camera.driveway_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: camera.snapshot
# data_template:
# entity_id: "camera.frontdoor_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: notify.notify_smtp
# data_template:
# title: 'Garage Picture {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
# message: >-
# {%- macro get_date(dt) %}
# {%- set date_suffix = ["th", "st", "nd", "rd"] -%}
# {{ dt.day }}
# {%- if dt.day % 10 in [1, 2, 3] and dt.day not in [11, 12, 13] -%}
# {{ date_suffix[dt.day%10] }}
# {%- else -%}
# {{ date_suffix[0] }}
# {%- endif %} {{ dt.strftime("%B %Y")}}
# {%- endmacro -%}
# {% set doors = "" %}
# {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = "Both garage doors" %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on"%}
# {% set doors = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% endif %}
# Your {{ doors }} seem to be open while your home security system is set to "{{ states.alarm_control_panel.simplisafe.state.split('_')[1]| title }}" mode. Today is {{ get_date(now()) }}, and time is {{ now().strftime("%I:%M:%S %p") }}. Please see the attached pictures and make sure everything is okay.
# data:
# images:
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" }}'
# - service: script.voice_notify
# data_template:
# message: >
# {% set doors = "" %}
# {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = "Both garage doors" %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on"%}
# {% set doors = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% endif %}
# Attention! Your home Security system is set to {{ states.alarm_control_panel.simplisafe.state.split('_')[1] | upper }} mode.
# BUT the {{ doors }} {{ 'are' if doors.endswith('s') else 'is' }} open.
###############################################################################
# Turn Home Security System ON at sunset time
###############################################################################
# - alias: Turn On Home Security System At Sunset
# initial_state: true
# trigger:
# platform: sun
# event: sunset
# offset: '+00:00:00'
# condition:
# - condition: state
# entity_id: group.all_devices
# state: 'home'
# - condition: state
# entity_id: alarm_control_panel.simplisafe
# state: 'disarmed'
# action:
# - service_template: >-
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# alarm_control_panel.alarm_arm_home
# {% else %}
# alarm_control_panel.disarm
# {% endif %}
# data:
# entity_id: alarm_control_panel.simplisafe
# - service: script.voice_notify
# data_template:
# message: >
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
# {%- if states.binary_sensor.back_door_sensor_sensor.state == "on" -%}
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
# {%- if states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Single Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# Your{{ doors }} {%- if 'and' in doors -%}s are {%- else %} is {%- endif %} open. Home Security System could not be turned on.
# {% endif %}
# - service: script.notify_me
# data_template:
# message: >
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
# {%- if states.binary_sensor.back_door_sensor_sensor.state == "on" -%}
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
# {%- if states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Single Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# Your {{ doors}} {%- if 'and' in doors -%}s are {%- else %} is {%- endif %} open. Home Security System could not be turned on.
# {% endif %}
# - alias: Turn On Home Security System At Sunset
# initial_state: true
# trigger:
# platform: sun
# event: sunset
# offset: '+00:00:00'
# condition:
# - condition: state
# entity_id: group.all_devices
# state: 'home'
# - condition: state
# entity_id: alarm_control_panel.simplisafe
# state: 'disarmed'
# action:
# - service_template: >-
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# alarm_control_panel.alarm_arm_home
# {% else %}
# alarm_control_panel.disarm
# {% endif %}
# data:
# entity_id: alarm_control_panel.simplisafe
# - service: script.voice_notify
# data_template:
# message: >
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
# {%- if states.binary_sensor.back_door_sensor_sensor.state == "on" -%}
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
# {%- if states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Single Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# Your{{ doors }} {%- if 'and' in doors -%}s are {%- else %} is {%- endif %} open. Home Security System could not be turned on.
# {% endif %}
# - service: script.notify_me
# data_template:
# message: >
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
# {%- if states.binary_sensor.back_door_sensor_sensor.state == "on" -%}
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
# {%- if states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Single Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# Your {{ doors}} {%- if 'and' in doors -%}s are {%- else %} is {%- endif %} open. Home Security System could not be turned on.
# {% endif %}
##############################################################################
# Ask me if I want to turn off Home Security System upon reaching front door
# Ask me only when the security system is ON or AWAY mode
##############################################################################
# - alias: Turn Off Security Upon Reaching Home
# initial_state: true
# trigger:
# - platform: state
# entity_id: device_tracker.suresh_suresh
# from: 'not_home'
# to: 'home'
# condition:
# condition: or
# conditions:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state | lower == "armed_away" }}'
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state | lower == "armed_home" }}'
# action:
# - service: notify.ios_suresh
# data_template:
# title: 'Welcome Home, Suresh!'
# message: 'Turn Off Home Security System?'
# data:
# push:
# badge: 0
# category: 'welcome_home'
# - alias: Turn Off Security Upon Reaching Home
# initial_state: true
# trigger:
# - platform: state
# entity_id: device_tracker.life360_suresh
# from: 'not_home'
# to: 'home'
# condition:
# condition: or
# conditions:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state | lower == "armed_away" }}'
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state | lower == "armed_home" }}'
# action:
# - service: notify.ios_suresh
# data_template:
# title: 'Welcome Home, Suresh!'
# message: 'Turn Off Home Security System?'
# data:
# push:
# badge: 0
# category: 'welcome_home'
##############################################################################
# Ask me if I want to turn off Home Security System when garage door is opened
# Ask me only when the security system is ON or AWAY mode
##############################################################################
# - alias: Notify Garage Status And Home Security System
# initial_state: true
# trigger:
# platform: state
# entity_id:
# - binary_sensor.two_car_garage_door_tilt_sensor_sensor
# - binary_sensor.single_car_garage_door_tilt_sensor_sensor
# to: 'on'
# condition:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" or states.alarm_control_panel.simplisafe.state == "armed_away" }}'
# action:
# - service: notify.ios_suresh
# data_template:
# title: >
# Your Home is armed, and {{ trigger.entity_id.split('.')[1].split('_')[0] |title }} Car Garage is just opened!
# message: 'Turn Off Home Security System?'
# data:
# push:
# badge: 0
# category: 'welcome_home'
# - alias: Notify Garage Status And Home Security System
# initial_state: true
# trigger:
# platform: state
# entity_id:
# - binary_sensor.two_car_garage_door_tilt_sensor_sensor
# - binary_sensor.single_car_garage_door_tilt_sensor_sensor
# to: 'on'
# condition:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" or states.alarm_control_panel.simplisafe.state == "armed_away" }}'
# action:
# - service: notify.ios_suresh
# data_template:
# title: >
# Your Home is armed, and {{ trigger.entity_id.split('.')[1].split('_')[0] |title }} Car Garage is just opened!
# message: 'Turn Off Home Security System?'
# data:
# push:
# badge: 0
# category: 'welcome_home'
##############################################################################
# iOS Actionable Notification that disables Home Security System
##############################################################################
# - alias: Disable Home Security iOS Action
# initial_state: true
# trigger:
# platform: event
# event_type: ios.notification_action_fired
# event_data:
# actionName: 'DISABLE_SECURITY'
# action:
# - service: alarm_control_panel.alarm_disarm
# entity_id: alarm_control_panel.simplisafe
# - service: notify.ios_suresh
# data:
# message: "Unlocked your home!"
# - alias: Disable Home Security iOS Action
# initial_state: true
# trigger:
# platform: event
# event_type: ios.notification_action_fired
# event_data:
# actionName: 'DISABLE_SECURITY'
# action:
# - service: alarm_control_panel.alarm_disarm
# entity_id: alarm_control_panel.simplisafe
# - service: notify.ios_suresh
# data:
# message: "Unlocked your home!"

View File

@ -1,51 +0,0 @@
###############################################################################
# PACKAGE: LIFE365 SENSOR
# Description: The Life365 sensor requires username, password and mqtt topic.
# Whatever the topic you specify, the data will be dumped there.
# Use the exact topic name in the Parse Life365 Data automation.
#
# What is Life365?
# It is Life360 sensor, much simpler and a lot better ;)
# this component used to be life360, until it has a conflict with official
# component..., so I simply changed to Life365!
###############################################################################
homeassistant:
customize:
sensor.life365_sensor:
friendly_name: Life 365
hidden: true
sensor:
- platform: life365
username: !secret life360_username
password: !secret life360_password
mqtt_topic: "/life360/data"
scan_interval: 15
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
###############################################################################
automation:
###############################################################################
# Alert me When the sensor fails
###############################################################################
- alias: Alert Life365 Error
initial_state: true
trigger:
platform: state
entity_id: sensor.life365_sensor
to: 'error'
for: '00:05:00'
action:
- service: script.notify_me
data_template:
message: "Life365 Sensor state changed to: {{ trigger.to_state.state| upper }}."

View File

@ -7,8 +7,7 @@
homeassistant:
customize:
# Media Players
# Media Players
media_player.snapcast_client_b827eb8604f5:
friendly_name: Front Room Music
media_player.snapcast_client_b827ebaa08f7:
@ -63,32 +62,32 @@ media_player:
# show_all_sources: true
# timeout: 5
# If you get errors about GI not found, run the command below to link gsp/gi path to HA for Gstreamer to function properly
# If you get errors about GI not found, run the command below to link gsp/gi path to HA for Gstreamer to function properly
# For python 3.4:
# sudo ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/lib/python3.6/site-packages
# For python 3.4:
# sudo ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/lib/python3.6/site-packages
# If you get GST not found error, run the following command
# sudo apt-get install python-gst-1.0 \
# gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 \
# gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
# gstreamer1.0-tools
# If you get GST not found error, run the following command
# sudo apt-get install python-gst-1.0 \
# gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 \
# gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \
# gstreamer1.0-tools
# Steps to set it up:
#
# 1. Setup venv using correct version of python - in this case, it is python3.6
# 2. As homeassistant user, inside the venv, run python3.6 command
# $ sudo -u homeassistant -H -s
# $ source /srv/homeassistant/bin/activate
# $ python3.6
# Inside the python CLI, run
# >>> import gi
# >>> print (gi)
# 3. That should print something like
# <module 'gi' from '/srv/homeassistant/lib/python3.6/site-packages/gi/__init__.py'>
# 4. Map that path to the GI location
# $ sudo ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/lib/python3.6/site-packages
# restart machine
# Steps to set it up:
#
# 1. Setup venv using correct version of python - in this case, it is python3.6
# 2. As homeassistant user, inside the venv, run python3.6 command
# $ sudo -u homeassistant -H -s
# $ source /srv/homeassistant/bin/activate
# $ python3.6
# Inside the python CLI, run
# >>> import gi
# >>> print (gi)
# 3. That should print something like
# <module 'gi' from '/srv/homeassistant/lib/python3.6/site-packages/gi/__init__.py'>
# 4. Map that path to the GI location
# $ sudo ln -s /usr/lib/python3/dist-packages/gi /srv/homeassistant/lib/python3.6/site-packages
# restart machine
- platform: gstreamer
pipeline: "audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapfifo"
@ -96,17 +95,17 @@ media_player:
binary_sensor:
- platform: mqtt
name: Sharp TV
state_topic: '/home/sharptv'
payload_on: 'on'
payload_off: 'off'
value_template: '{{ value }}'
state_topic: "/home/sharptv"
payload_on: "on"
payload_off: "off"
value_template: "{{ value }}"
- platform: mqtt
name: Sharp TV Command State
state_topic: '/home/sharp_tv_cmd'
payload_on: 'on'
payload_off: 'off'
value_template: '{{ value }}'
state_topic: "/home/sharp_tv_cmd"
payload_on: "on"
payload_off: "off"
value_template: "{{ value }}"
input_select:
snapcast_server:
@ -139,28 +138,27 @@ script:
- service: shell_command.restart_snapserver
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
###############################################################################
# Snapcast Server Management
###############################################################################
###############################################################################
# Snapcast Server Management
###############################################################################
- alias: Snapcast Action
initial_state: true
initial_state: true
trigger:
platform: state
entity_id: input_select.snapcast_server
condition:
- condition: template
value_template: '{{ states.input_select.snapcast_server.state | lower != "select one" }}'
value_template: '{{ states.input_select.snapcast_server.state | lower != "select one" }}'
action:
- service_template: >-
{% if states.input_select.snapcast_server.state | lower == "stop" %}
@ -169,4 +167,4 @@ automation:
shell_command.start_snapserver
{% else %}
shell_command.restart_snapserver
{% endif %}
{% endif %}

View File

@ -2,7 +2,7 @@ homeassistant:
# Input DateTime Options:
# I set the minutes to something that is divisible by 5, so that the automations
# can check once every 5 minutes without any performance penalty
# can check once every 5 minutes without any performance penalty
###############################################################################
input_datetime:
@ -10,45 +10,45 @@ input_datetime:
name: Summer Bed Time
has_date: false
has_time: true
initial: '23:00:00'
initial: "23:00:00"
summer_wakeup_time:
name: Summer Wakeup Time
has_date: false
has_time: true
initial: '06:00:00'
initial: "06:00:00"
autumn_bed_time:
name: Autumn Bed Time
has_date: false
has_time: true
initial: '22:00:00'
initial: "22:00:00"
autumn_wakeup_time:
name: Autumn Wakeup Time
has_date: false
has_time: true
initial: '05:30:00'
initial: "05:30:00"
winter_bed_time:
name: Winter Bed Time
has_date: false
has_time: true
initial: '22:00:00'
initial: "22:00:00"
winter_wakeup_time:
name: Winter Wakeup Time
has_date: false
has_time: true
initial: '05:30:00'
initial: "05:30:00"
spring_bed_time:
name: Spring Bed Time
has_date: false
has_time: true
initial: '22:00:00'
initial: "22:00:00"
spring_wakeup_time:
name: Spring Wakeup Time
has_date: false
has_time: true
initial: '05:30:00'
initial: "05:30:00"
input_number:
calendar_remind_before_days:
@ -141,7 +141,7 @@ input_boolean:
icon: mdi:do-not-disturb
movie_time:
name: 'Movie Time'
name: "Movie Time"
initial: off
icon: mdi:movie-roll
@ -241,28 +241,27 @@ input_boolean:
icon: mdi:garage
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
# Do not disturb for 2 hours
# Simply turns ON the Do Not Disturb Flag ad resets
# after 2 hours. The Do Not Disturb flag is used in
# voice_notify script
######################################################
# Do not disturb for 2 hours
# Simply turns ON the Do Not Disturb Flag ad resets
# after 2 hours. The Do Not Disturb flag is used in
# voice_notify script
######################################################
- alias: Do Not Disturb For 2 hours
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.do_not_disturb
to: 'on'
to: "on"
for:
hours: 2
minutes: 0
@ -270,22 +269,22 @@ automation:
- service: input_boolean.turn_off
entity_id: input_boolean.do_not_disturb
######################################################
# Reset Movie time after 3 hours
######################################################
# Reset Movie time after 3 hours
- alias: Reset Movie Time After 3 Hours
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.movie_time
to: 'on'
to: "on"
for:
hours: 3
action:
- service: input_boolean.turn_off
entity_id: input_boolean.movie_time
# Notify me when DO NOT DISTURB mode is changed
######################################################
# Notify me when DO NOT DISTURB mode is changed
######################################################
- alias: Do Not Disturb State Change
initial_state: true
trigger:
@ -296,13 +295,13 @@ automation:
data_template:
message: "The Do Not Disturb Mode is {{ trigger.to_state.state |upper }}."
# Hourly Reports
######################################################
# Hourly Reports
######################################################
- alias: Hourly Report During Day Time
initial_state: true
trigger:
platform: time_pattern
hours: '/01'
hours: "/01"
minutes: 05
seconds: 00
condition:
@ -310,7 +309,7 @@ automation:
value_template: '{{ states.input_boolean.hourly_report.state == "on" }}'
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: template
value_template: >
{% set hour = now().hour | int %}

View File

@ -6,10 +6,9 @@
###############################################################################
homeassistant:
customize:
sun.sun:
friendly_name: Sun
friendly_name: Sun
sensor.cold_flu:
friendly_name: Cold and Flu
hidden: true
@ -25,7 +24,7 @@ homeassistant:
friendly_name: Pollen Level
homebridge_hidden: true
sensor.air_quality:
friendly_name: Air Quality
friendly_name: Air Quality
homebridge_hidden: true
input_boolean.rain_alert:
@ -92,8 +91,8 @@ input_boolean:
#
# Good Weather To Fly Drone?
# Criteria:
# - Wind Speed must be less than 12 mph
# Criteria:
# - Wind Speed must be less than 12 mph
# - No Rain, or Snow
# - No Thunderstorms, lightning
# - Visiblity must be more than 2 miles
@ -124,18 +123,18 @@ weather:
openuv:
api_key: !secret openuv_apikey
iqvia:
zip_code: !secret zip_code
monitored_conditions:
- allergy_average_forecasted
- allergy_index_today
- allergy_index_tomorrow
- asthma_average_forecasted
- asthma_index_today
- asthma_index_tomorrow
- disease_average_forecasted
- disease_index_today
# iqvia:
# zip_code: !secret zip_code
# monitored_conditions:
# - allergy_average_forecasted
# - allergy_index_today
# - allergy_index_tomorrow
# - asthma_average_forecasted
# - asthma_index_today
# - asthma_index_tomorrow
# - disease_average_forecasted
# - disease_index_today
sensor:
- platform: darksky
@ -177,22 +176,21 @@ sensor:
value_template: "{{value_json.Location.periods[0].Index}}"
scan_interval: 21600
headers:
Referer: "https://www.pollen.com"
Referer: "https://www.pollen.com"
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
automation:
# Script to alert when enjoyable weather is outside
# For me, enjoyable is:
# For me, enjoyable is:
# 1. Must be above 70 Degrees F
# 2. Alert me only during day time
#
@ -207,11 +205,11 @@ automation:
value_template: '{{ states.input_boolean.enjoyable_weather_reminders.state == "on" }}'
- condition: state
entity_id: sun.sun
state: 'above_horizon'
state: "above_horizon"
- condition: template
value_template: '{% if states.sensor.dark_sky_apparent_temperature.state | round > 70 %} true {% else %} false {% endif %}'
value_template: "{% if states.sensor.dark_sky_apparent_temperature.state | round > 70 %} true {% else %} false {% endif %}"
- condition: template
value_template: '{% if states.sensor.dark_sky_wind_speed.state | round < 8 %} false {% else %} true {% endif %}'
value_template: "{% if states.sensor.dark_sky_wind_speed.state | round < 8 %} false {% else %} true {% endif %}"
action:
- service: script.notify_me
data_template:
@ -250,15 +248,15 @@ automation:
trigger:
- platform: state
entity_id:
- input_boolean.nice_breeze_alert
- input_boolean.moderate_wind_alert
- input_boolean.heavy_wind_alert
- input_boolean.super_heavy_wind_alert
- input_boolean.hurricane_wind_alert
- input_boolean.rain_alert
- input_boolean.snow_alert
- input_boolean.sleet_alert
to: 'on'
- input_boolean.nice_breeze_alert
- input_boolean.moderate_wind_alert
- input_boolean.heavy_wind_alert
- input_boolean.super_heavy_wind_alert
- input_boolean.hurricane_wind_alert
- input_boolean.rain_alert
- input_boolean.snow_alert
- input_boolean.sleet_alert
to: "on"
for:
minutes: 15
action:
@ -300,14 +298,14 @@ automation:
value_template: '{{ trigger.to_state.state | lower == "rain" }}'
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: state
entity_id: sun.sun
state: 'above_horizon'
state: "above_horizon"
- condition: template
value_template: '{% if trigger.to_state.state == "unknown" or trigger.to_state.state == "" %} false {% else %} true {% endif %}'
- condition: template
value_template: '{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}'
value_template: "{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}"
action:
- service: script.notify_me
data_template:
@ -333,14 +331,14 @@ automation:
value_template: '{{ states.sensor.season.state | lower == "winter" }}'
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: state
entity_id: sun.sun
state: 'above_horizon'
state: "above_horizon"
- condition: template
value_template: '{% if trigger.to_state.state == "unknown" or trigger.to_state.state == "" %} false {% else %} true {% endif %}'
- condition: template
value_template: '{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}'
value_template: "{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}"
action:
- service: script.notify_me
data_template:
@ -358,21 +356,12 @@ automation:
input_boolean.sleet_alert
{%- endif %}
- alias: Update OpenUV every 30 minutes during the daytime
- alias: Update OpenUV every hour (24 of 50 calls per day)
trigger:
platform: time_pattern
minutes: "/30"
seconds: 00
condition:
condition: and
conditions:
- condition: sun
after: sunrise
- condition: sun
before: sunset
minutes: "/60"
action:
service: openuv.update_data
# Weather sensors - TBD, too lazy to create them
#
# {{ states.sun.sun.state }}

View File

@ -2,7 +2,7 @@
# @author : Mahasri Kalavala
# @date : 11/07/2017
# @package : Work From Home (wfh)
# @description : Reminds me to Get Up and Walk around the house once
# @description : Reminds me to Get Up and Walk around the house once
# every 30 minutes during Work From Home days
###############################################################################
homeassistant:
@ -12,50 +12,49 @@ homeassistant:
timer:
wfh_timer:
duration: '00:30:00'
duration: "00:30:00"
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
# Start WFH timer if Suresh is HOME during weekdays between 10 AM and 5 PM
###############################################################################
# Start WFH timer if Suresh is HOME during weekdays between 10 AM and 5 PM
###############################################################################
- alias: WFH Timer Start
initial_state: false
trigger:
- platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: template
value_template: '{{ states.binary_sensor.workday_sensor.state == "on" }}'
- condition: template
value_template: '{{ now().hour|int >= 10 and now().hour|int < 17 }}'
value_template: "{{ now().hour|int >= 10 and now().hour|int < 17 }}"
- condition: template
value_template: '{{ states.timer.wfh_timer.state == "idle" }}'
- condition: template
value_template: '{{ states.device_tracker.suresh_suresh.state == "home" }}'
value_template: '{{ states.device_tracker.life360_suresh.state == "home" }}'
action:
- service: timer.start
entity_id: timer.wfh_timer
# Timer elapsed... Remind Suresh to take a quick walk
# Restart the timer ONLY if the time is betwen office hours (10 AM and 5 PM)
###############################################################################
# Timer elapsed... Remind Suresh to take a quick walk
# Restart the timer ONLY if the time is betwen office hours (10 AM and 5 PM)
###############################################################################
- alias: Timer Elapsed - Take a walk
initial_state: false
trigger:
- platform: event
event_type: timer.finished
event_data:
event_data:
entity_id: timer.wfh_timer
action:
- service_template: >
@ -66,23 +65,23 @@ automation:
{% endif %}
entity_id: timer.wfh_timer
- condition: template
value_template: '{{ now().hour|int >= 10 and now().hour|int < 17 }}'
value_template: "{{ now().hour|int >= 10 and now().hour|int < 17 }}"
- service: script.voice_notify
data_template:
message: "It is time to stand up and walk around!"
# Cancel timer (if active) When Suresh left home
###############################################################################
# Cancel timer (if active) When Suresh left home
###############################################################################
- alias: Cancel WFH Timer When Suresh Leaves Home
initial_state: false
trigger:
- platform: zone
entity_id: device_tracker.suresh_suresh
entity_id: device_tracker.life360_suresh
zone: zone.home
event: leave
condition:
- condition: template
value_template: '{{ states.timer.wfh_timer.state == "active" }}'
value_template: '{{ states.timer.wfh_timer.state == "active" }}'
action:
- service: timer.cancel
entity_id: timer.wfh_timer

View File

@ -6,7 +6,6 @@
###############################################################################
homeassistant:
customize:
input_boolean.home_mode_away:
friendly_name: Away Mode
zone.home:
@ -26,45 +25,45 @@ zone:
input_boolean:
home_mode_away:
name: Away
initial: 'off'
initial: "off"
proximity:
home:
devices: device_tracker.suresh_suresh
devices: device_tracker.life360_suresh
tolerance: 50
unit_of_measurement: mi
work:
devices: device_tracker.suresh_suresh
work:
devices: device_tracker.life360_suresh
tolerance: 50
unit_of_measurement: mi
###############################################################################
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# _ _ _
# /\ | | | | (_)
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
#
#
###############################################################################
automation:
###############################################################################
# Zone based alerting
###############################################################################
###############################################################################
# Zone based alerting
###############################################################################
- alias: Alert When Someone Enters a Zone
initial_state: true
trigger:
- platform: zone
entity_id:
- device_tracker.hasika_hasika
- device_tracker.mallika_mallika
- device_tracker.srinika_srinika
- device_tracker.suresh_suresh
- device_tracker.life360_hasika
- device_tracker.life360_mallika
- device_tracker.life360_srinika
- device_tracker.life360_suresh
zone: zone.home
event: enter
- platform: zone
entity_id: device_tracker.suresh_suresh
entity_id: device_tracker.life360_suresh
zone: zone.work
event: enter
condition:
@ -74,26 +73,26 @@ automation:
- service: script.notify_me
data_template:
message: >
{{ trigger.entity_id.split('.')[1].split('_')[0] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
- service: script.voice_notify
data_template:
message: >
{{ trigger.entity_id.split('.')[1].split('_')[0] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
greeting: 'no'
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
greeting: "no"
- alias: Alert When Someone Leaves a Zone
initial_state: true
trigger:
- platform: zone
entity_id:
- device_tracker.hasika_hasika
- device_tracker.mallika_mallika
- device_tracker.srinika_srinika
- device_tracker.suresh_suresh
- device_tracker.life360_hasika
- device_tracker.life360_mallika
- device_tracker.life360_srinika
- device_tracker.life360_suresh
zone: zone.home
event: leave
- platform: zone
entity_id: device_tracker.suresh_suresh
entity_id: device_tracker.life360_suresh
zone: zone.work
event: leave
condition:
@ -102,66 +101,66 @@ automation:
action:
- service: script.notify_me
data_template:
message: "{{ trigger.entity_id.split('.')[1].split('_')[0] | title}} just left {{ trigger.zone.attributes.friendly_name }}."
message: "{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just left {{ trigger.zone.attributes.friendly_name }}."
- service: script.voice_notify
data_template:
message: >-
{{ trigger.entity_id.split('.')[1].split('_')[0] | title }} just left {{ trigger.zone.attributes.friendly_name }}.
{% if trigger.entity_id.split('.')[1].split('_')[0] == "suresh" and trigger.zone.attributes.friendly_name | lower == "office" %}
{{ trigger.entity_id.split('.')[1].split('_')[1] | title }} just left {{ trigger.zone.attributes.friendly_name }}.
{% if trigger.entity_id.split('.')[1].split('_')[1] == "suresh" and trigger.zone.attributes.friendly_name | lower == "office" %}
and will be home in {{ (states.sensor.suresh2home.state | int) + 5 }} minutes.
{% endif %}
greeting: 'no'
greeting: "no"
###############################################################################
# Welcome family members when they come home
###############################################################################
###############################################################################
# Welcome family members when they come home
###############################################################################
- alias: Welcome Family
initial_state: true
trigger:
- platform: state
entity_id:
- device_tracker.mallika_mallika
- device_tracker.suresh_suresh
- device_tracker.srinika_srinika
- device_tracker.hasika_hasika
from: 'not_home'
to: 'home'
for: '00:02:00'
- device_tracker.life360_mallika
- device_tracker.life360_suresh
- device_tracker.life360_srinika
- device_tracker.life360_hasika
from: "not_home"
to: "home"
for: "00:02:00"
condition:
- condition: state
entity_id: input_boolean.zone_alerts
state: 'on'
state: "on"
action:
- service: script.notify_me
data_template:
message: >
Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[0] | title }}!
Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[1] | title }}!
- service: script.voice_notify
data_template:
message: >
"Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[0] | lower }}!"
greeting: 'no'
"Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[1] | lower }}!"
greeting: "no"
- service: input_boolean.turn_off
entity_id: input_boolean.home_mode_away
##############################################################################
# Alert when every one is away
##############################################################################
##############################################################################
# Alert when every one is away
##############################################################################
- alias: Alert when everyone is AWAY
initial_state: true
trigger:
platform: time_pattern
minutes: 00
seconds: '/30'
seconds: "/30"
condition:
- condition: template
value_template: '{{ states.input_boolean.home_mode_away.state == "off" }}'
- condition: template
value_template: >
{% set suresh = states.device_tracker.suresh_suresh.state %}
{% set mallika = states.device_tracker.mallika_mallika.state %}
{% set srinika = states.device_tracker.srinika_srinika.state %}
{% set hasika = states.device_tracker.hasika_hasika.state %}
{% set suresh = states.device_tracker.life360_suresh.state %}
{% set mallika = states.device_tracker.life360_mallika.state %}
{% set srinika = states.device_tracker.life360_srinika.state %}
{% set hasika = states.device_tracker.life360_hasika.state %}
{% if suresh != "home" and mallika != "home" and srinika != "home" and hasika != "home" %}
True
{% else %}
@ -176,13 +175,13 @@ automation:
trigger:
platform: state
entity_id: input_boolean.home_mode_away
to: 'on'
to: "on"
action:
- service: script.home_mode_away
###############################################################################
# Proximity - Send an alert when someone is on their way home
###############################################################################
###############################################################################
# Proximity - Send an alert when someone is on their way home
###############################################################################
- alias: Send a message as I get closer to home
initial_state: true
trigger:
@ -199,10 +198,10 @@ automation:
message: "Suresh is on his way home, he is within the 5 miles range. Should be home soon!"
- condition: template
value_template: >
{% set suresh = states.device_tracker.suresh_suresh.state %}
{% set mallika = states.device_tracker.mallika_mallika.state %}
{% set srinika = states.device_tracker.srinika_srinika.state %}
{% set hasika = states.device_tracker.hasika_hasika.state %}
{% set suresh = states.device_tracker.life360_suresh.state %}
{% set mallika = states.device_tracker.life360_mallika.state %}
{% set srinika = states.device_tracker.life360_srinika.state %}
{% set hasika = states.device_tracker.life360_hasika.state %}
{% if suresh != "home" and mallika != "home" and srinika != "home" and hasika != "home" %}
True
{% else %}
@ -211,7 +210,7 @@ automation:
- service: climate.set_away_mode
data:
entity_id: climate.dining_room
away_mode: 'false'
away_mode: "false"
- service: script.notify_me
data_template:
message: "Your Nest thermostat is set to HOME mode. Thank you!"

View File

@ -1,4 +1,4 @@
>
>
{%- macro alert_battery_levels() -%}
{%- for item in states if 'battery_level' in item.attributes and item.attributes.battery_level | int > 0 and item.attributes.battery_level | float <= 10.0 %}
{{- item.attributes.friendly_name}} battery is less than 10 percent.
@ -162,7 +162,7 @@
{# Drone Flying Weather #}
{%- macro drone_weather() -%}
{% if states.binary_sensor.good_weather_to_fly_drones.state| lower == "on" and
states.device_tracker.suresh_suresh.state == "home" and
states.device_tracker.life360_suresh.state == "home" and
states.sun.sun.state == "above_horizon" %}
It is now a great weather to fly drone outside.
{% endif %}
@ -206,6 +206,6 @@
{{ birthday_countdown("Srinika", states.input_label.srinika_birthday_days2go.state | int ) }}
{{ birthday_countdown("Hasika", states.input_label.hasika_birthday_days2go.state | int ) }}
{%- endmacro -%}
{# Call the macro #}
{{- cleanup(mother_of_all_macros()) -}}
{{- cleanup(mother_of_all_macros()) -}}

View File

@ -22,7 +22,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<SensorMap index="0" type="47" />
<SensorMap index="0" type="55" />
<SensorMap index="0" type="63" />
@ -34,10 +34,10 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="72.3" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="72.1" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="4" label="Power" units="W" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="46" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="39" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="40" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -168,7 +168,7 @@
</CommandClass>
<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="100" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="64" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -208,7 +208,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<SensorMap index="0" type="46" />
<SensorMap index="0" type="62" />
<SensorMap index="0" type="193" />
@ -216,9 +216,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="73.4" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="58" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="33" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="73.0" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="39" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="36" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" after_mark="true" innif="true">
@ -350,7 +350,7 @@
</CommandClass>
<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="100" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="82" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -379,7 +379,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="4" name="Two Car Garage Door Tilt Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="4" name="Two Car Garage Door Tilt Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="3" name="Garage Door Tilt Sensor" />
</Manufacturer>
@ -490,7 +490,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="5" name="Single Car Garage Door Tilt Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="5" name="Single Car Garage Door Tilt Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="3" name="Garage Door Tilt Sensor" />
</Manufacturer>
@ -601,7 +601,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="6" name="Back Door Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="6" name="Back Door Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="2" name="Door Sensor" />
</Manufacturer>
@ -612,7 +612,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<SensorMap index="0" type="127" />
<SensorMap index="0" type="191" />
<SensorMap index="0" type="223" />
@ -635,7 +635,7 @@
<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="1" label="Alarm Level" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="2" label="SourceNodeId" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="9" label="Access Control" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="22" />
<Value type="byte" genre="user" instance="1" index="9" label="Access Control" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="23" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="11" label="Power Management" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
</CommandClass>
@ -728,9 +728,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="70.3" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="87" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="46" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="76.5" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="137" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="44" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" innif="true">
@ -1006,11 +1006,11 @@
</CommandClass>
<CommandClass id="50" name="COMMAND_CLASS_METER" version="3" request_flags="2" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="0" label="Energy" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="48.280" />
<Value type="decimal" genre="user" instance="1" index="1" label="Previous Reading" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="48.280" />
<Value type="int" genre="user" instance="1" index="2" label="Interval" units="seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="2522" />
<Value type="decimal" genre="user" instance="1" index="0" label="Energy" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="50.014" />
<Value type="decimal" genre="user" instance="1" index="1" label="Previous Reading" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="50.014" />
<Value type="int" genre="user" instance="1" index="2" label="Interval" units="seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="365" />
<Value type="decimal" genre="user" instance="1" index="8" label="Power" units="W" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.000" />
<Value type="decimal" genre="user" instance="1" index="16" label="Voltage" units="V" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="117.357" />
<Value type="decimal" genre="user" instance="1" index="16" label="Voltage" units="V" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="116.082" />
<Value type="decimal" genre="user" instance="1" index="20" label="Current" units="A" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.000" />
<Value type="bool" genre="user" instance="1" index="32" label="Exporting" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<Value type="button" genre="system" instance="1" index="33" label="Reset" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
@ -1181,7 +1181,7 @@
</CommandClass>
<CommandClass id="129" name="COMMAND_CLASS_CLOCK" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="list" genre="user" instance="1" index="0" label="Day" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="4" size="1">
<Value type="list" genre="user" instance="1" index="0" label="Day" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="3" size="1">
<Item label="Monday" value="1" />
<Item label="Tuesday" value="2" />
<Item label="Wednesday" value="3" />
@ -1190,8 +1190,8 @@
<Item label="Saturday" value="6" />
<Item label="Sunday" value="7" />
</Value>
<Value type="byte" genre="user" instance="1" index="1" label="Hour" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="13" />
<Value type="byte" genre="user" instance="1" index="2" label="Minute" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="19" />
<Value type="byte" genre="user" instance="1" index="1" label="Hour" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="15" />
<Value type="byte" genre="user" instance="1" index="2" label="Minute" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="9" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -1328,7 +1328,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="17" name="Stairs Motion Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="17" name="Stairs Motion Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="1" name="Motion Detector" />
</Manufacturer>
@ -1339,7 +1339,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<SensorMap index="0" type="255" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1">
@ -1369,7 +1369,7 @@
<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="1" label="Alarm Level" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="2" label="SourceNodeId" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="8" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="11" label="Power Management" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
</CommandClass>
<CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="4" innif="true">
@ -1703,7 +1703,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="25" name="Basement Door Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="25" name="Basement Door Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="2" name="Unknown: type=0004, id=0002" />
</Manufacturer>
@ -1965,7 +1965,7 @@
</CommandClass>
<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="5" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="37" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="100" />
</CommandClass>
<CommandClass id="132" name="COMMAND_CLASS_WAKE_UP" version="2" request_flags="1" innif="true">
<Instance index="1" />
@ -2023,7 +2023,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="28" name="Audio Detector" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3073" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="28" name="Audio Detector" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3073" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="5" id="f" name="FireFighter" />
</Manufacturer>
@ -2038,7 +2038,7 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="7" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="74.66" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="73.94" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" innif="true">
<Instance index="1" />
@ -2132,7 +2132,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="29" name="Garage Door Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="29" name="Garage Door Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3072" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="14a" name="Ecolink">
<Product type="4" id="2" name="Unknown: type=0004, id=0002" />
</Manufacturer>
@ -2238,7 +2238,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="31" name="Aeotec Water Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3079" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="31" name="Aeotec Water Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3079" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Dynamic">
<Manufacturer id="86" name="Aeotec">
<Product type="102" id="7a" name="Unknown: type=0102, id=007a" />
</Manufacturer>
@ -2341,7 +2341,7 @@
</CommandClass>
<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="5" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="29" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="14" />
</CommandClass>
<CommandClass id="132" name="COMMAND_CLASS_WAKE_UP" version="2" request_flags="1" innif="true">
<Instance index="1" />
@ -2405,9 +2405,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="76.6" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="76.7" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="40" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="42" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="37" label="Radon Concentration" units="bq/m3" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="60" />
</CommandClass>
@ -2653,7 +2653,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="36" name="" location="" basic="4" generic="33" specific="1" type="Routing Multilevel Sensor" listening="true" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="36" name="" location="" basic="4" generic="33" specific="1" type="Routing Multilevel Sensor" listening="true" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="0" name="">
<Product type="0" id="0" name="" />
</Manufacturer>