reorganized code
This commit is contained in:
parent
20bdf8ed76
commit
bb0cf6db6b
|
@ -292,7 +292,7 @@
|
||||||
"369": "sensor.suresh_battery_level",
|
"369": "sensor.suresh_battery_level",
|
||||||
"37": "sensor.queries_forwarded",
|
"37": "sensor.queries_forwarded",
|
||||||
"370": "group.light_levels",
|
"370": "group.light_levels",
|
||||||
"371": "input_boolean.battery_notifications",
|
"371": "input_boolean.battery_alerts",
|
||||||
"372": "calendar.holidays_in_india",
|
"372": "calendar.holidays_in_india",
|
||||||
"373": "sensor.kalavalanas_network_up_eth0",
|
"373": "sensor.kalavalanas_network_up_eth0",
|
||||||
"374": "sensor.ups_nominal_input_voltage",
|
"374": "sensor.ups_nominal_input_voltage",
|
||||||
|
@ -405,7 +405,7 @@
|
||||||
"472": "sensor.dark_sky_precip",
|
"472": "sensor.dark_sky_precip",
|
||||||
"473": "group.upstairs_multi_sensor",
|
"473": "group.upstairs_multi_sensor",
|
||||||
"474": "group.always_on",
|
"474": "group.always_on",
|
||||||
"475": "input_boolean.trash_reminders",
|
"475": "input_boolean.trash_alerts",
|
||||||
"476": "sensor.pws_uv",
|
"476": "sensor.pws_uv",
|
||||||
"477": "sensor.garage_pi_available_disk",
|
"477": "sensor.garage_pi_available_disk",
|
||||||
"478": "binary_sensor.patio_camera_tamper_detection",
|
"478": "binary_sensor.patio_camera_tamper_detection",
|
||||||
|
@ -621,4 +621,4 @@
|
||||||
"97": "sensor.wallmote_alarm_type",
|
"97": "sensor.wallmote_alarm_type",
|
||||||
"98": "binary_sensor.sharp_tv",
|
"98": "binary_sensor.sharp_tv",
|
||||||
"99": "sensor.domains_being_blocked"
|
"99": "sensor.domains_being_blocked"
|
||||||
}
|
}
|
|
@ -87,19 +87,19 @@ cards:
|
||||||
- type: attribute
|
- type: attribute
|
||||||
entity: device_tracker.life360_suresh
|
entity: device_tracker.life360_suresh
|
||||||
name: Suresh
|
name: Suresh
|
||||||
attribute: address
|
attribute: address
|
||||||
- type: attribute
|
- type: attribute
|
||||||
entity: device_tracker.life360_mallika
|
entity: device_tracker.life360_mallika
|
||||||
name: Mallika
|
name: Mallika
|
||||||
attribute: address
|
attribute: address
|
||||||
- type: attribute
|
- type: attribute
|
||||||
entity: device_tracker.life360_srinika
|
entity: device_tracker.life360_srinika
|
||||||
name: Srinika
|
name: Srinika
|
||||||
attribute: address
|
attribute: address
|
||||||
- type: attribute
|
- type: attribute
|
||||||
entity: device_tracker.life360_hasika
|
entity: device_tracker.life360_hasika
|
||||||
name: Hasika
|
name: Hasika
|
||||||
attribute: address
|
attribute: address
|
||||||
- entity: input_boolean.home_mode_away
|
- entity: input_boolean.home_mode_away
|
||||||
name: Home Away Status
|
name: Home Away Status
|
||||||
card:
|
card:
|
||||||
|
@ -229,7 +229,6 @@ cards:
|
||||||
- type: tile
|
- type: tile
|
||||||
entity: weather.dark_sky
|
entity: weather.dark_sky
|
||||||
|
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Xiaomi Motion Sensors
|
title: Xiaomi Motion Sensors
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
@ -265,7 +264,7 @@ cards:
|
||||||
name: Two Car Garage Door
|
name: Two Car Garage Door
|
||||||
- entity: binary_sensor.door_window_sensor_158d0004248d5b
|
- entity: binary_sensor.door_window_sensor_158d0004248d5b
|
||||||
name: Single Car Garage Door
|
name: Single Car Garage Door
|
||||||
- entity: binary_sensor.door_window_sensor_158d00044e5cb3
|
- entity: binary_sensor.door_window_sensor_158d00044e5cb3
|
||||||
name: Master Bathroom Toilet Door Sensor
|
name: Master Bathroom Toilet Door Sensor
|
||||||
- entity: binary_sensor.door_window_sensor_158d00045ab168
|
- entity: binary_sensor.door_window_sensor_158d00045ab168
|
||||||
name: Guest Bathroom Door Sensor
|
name: Guest Bathroom Door Sensor
|
||||||
|
@ -275,7 +274,7 @@ cards:
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- sensor.plex_mahasri_nas
|
- sensor.plex_mahasri_nas
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Luminance
|
title: Luminance
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
@ -358,26 +357,3 @@ cards:
|
||||||
type: entities
|
type: entities
|
||||||
title: Motion Sensors
|
title: Motion Sensors
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
|
||||||
- type: entities
|
|
||||||
title: Motion Counters
|
|
||||||
show_header_toggle: false
|
|
||||||
entities:
|
|
||||||
- input_label.motion_sensor_158d00016c2d0e
|
|
||||||
- input_label.motion_sensor_158d00016db6d2
|
|
||||||
- input_label.motion_sensor_158d0001a25041
|
|
||||||
- input_label.motion_sensor_158d0001a662fe
|
|
||||||
- input_label.motion_sensor_158d00024e57d3
|
|
||||||
- input_label.motion_sensor_158d00024e57fb
|
|
||||||
- input_label.motion_sensor_158d00024e842c
|
|
||||||
- input_label.motion_sensor_158d00024ee084
|
|
||||||
- input_label.motion_sensor_158d000272bed1
|
|
||||||
- input_label.motion_sensor_158d00047b6f69
|
|
||||||
- input_label.motion_sensor_158d000272bf48
|
|
||||||
- input_label.motion_sensor_158d000272bfd7
|
|
||||||
- input_label.garage_motion
|
|
||||||
- input_label.door_window_sensor_158d0004231f7b
|
|
||||||
- input_label.door_window_sensor_158d0004248d5b
|
|
||||||
- input_label.door_window_sensor_158d00040ad8fc
|
|
||||||
- input_label.door_window_sensor_158d0004880f30 # garage entry door
|
|
||||||
- input_label.door_window_sensor_158d000424a6d6
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
title: Multi Room Audio & TTS
|
title: Multi Room Audio & TTS
|
||||||
icon: mdi:television
|
icon: mdi:television
|
||||||
cards:
|
cards:
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Text To Speech
|
title: Text To Speech
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
@ -14,13 +13,13 @@ cards:
|
||||||
- input_text.tts
|
- input_text.tts
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Media Players
|
title: SONOS Speakers
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- media_player.attic_tv
|
- entity: media_player.living_room # sonos
|
||||||
- media_player.living_room # sonos
|
name: SONOS Speaker 1
|
||||||
- media_player.upstairs # sonos
|
- entity: media_player.upstairs # sonos
|
||||||
- media_player.smart_tv
|
name: SONOS Speaker 2
|
||||||
|
|
||||||
- type: vertical-stack
|
- type: vertical-stack
|
||||||
cards:
|
cards:
|
||||||
|
@ -28,8 +27,6 @@ cards:
|
||||||
entity: media_player.living_room
|
entity: media_player.living_room
|
||||||
- type: media-control
|
- type: media-control
|
||||||
entity: media_player.upstairs
|
entity: media_player.upstairs
|
||||||
- type: media-control
|
|
||||||
entity: media_player.attic_tv
|
|
||||||
|
|
||||||
- type: media-control
|
- type: media-control
|
||||||
entity: media_player.chromecastultra7021
|
entity: media_player.chromecastultra7021
|
||||||
|
name: ChromeCast Ultra
|
||||||
|
|
|
@ -138,7 +138,7 @@ cards:
|
||||||
action: nightly_report
|
action: nightly_report
|
||||||
|
|
||||||
- type: button
|
- type: button
|
||||||
name: Go Outside
|
name: Go Outside
|
||||||
entity: input_boolean.enjoyable_weather_reminders
|
entity: input_boolean.enjoyable_weather_reminders
|
||||||
icon: mdi:weather-windy-variant
|
icon: mdi:weather-windy-variant
|
||||||
color_type: card
|
color_type: card
|
||||||
|
@ -223,7 +223,7 @@ cards:
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Garage Timers
|
title: Garage Timers
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- input_number.garage_lights
|
- input_number.garage_lights
|
||||||
- input_number.garage_shop_lights
|
- input_number.garage_shop_lights
|
||||||
|
|
||||||
|
@ -251,18 +251,26 @@ cards:
|
||||||
- input_number.hasika_bedroom_closet_lights
|
- input_number.hasika_bedroom_closet_lights
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Alerts & Notifications
|
title: Notifications
|
||||||
|
show_header_toggle: false
|
||||||
|
entities:
|
||||||
|
- input_boolean.telegram_notifications
|
||||||
|
- input_boolean.led_notifications
|
||||||
|
- input_boolean.voice_notifications
|
||||||
|
- input_boolean.email_notifications
|
||||||
|
- input_boolean.firetv_notifications
|
||||||
|
|
||||||
|
- type: entities
|
||||||
|
title: Alerts
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- input_boolean.garage_door_notifications
|
- input_boolean.garage_door_notifications
|
||||||
- input_boolean.battery_notifications
|
- input_boolean.battery_alerts
|
||||||
- input_boolean.text_alerts
|
- input_boolean.zone_alerts
|
||||||
- input_boolean.led_alerts
|
|
||||||
- input_boolean.security_system_alerts
|
- input_boolean.security_system_alerts
|
||||||
- input_boolean.notify_camera_alerts
|
- input_boolean.camera_alerts
|
||||||
- input_boolean.trash_reminders
|
- input_boolean.zone_alerts
|
||||||
- automation.family_room_motion_timer
|
- input_boolean.trash_alerts
|
||||||
- automation.family_room_timer_elapsed
|
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Bed & Wakeup Times
|
title: Bed & Wakeup Times
|
||||||
|
|
|
@ -62,43 +62,3 @@ cards:
|
||||||
name: Pill Taken
|
name: Pill Taken
|
||||||
- entity: script.remind_pill
|
- entity: script.remind_pill
|
||||||
name: Remind Me To Take Pill
|
name: Remind Me To Take Pill
|
||||||
|
|
||||||
# - type: entities
|
|
||||||
# title: All Scripts
|
|
||||||
# show_header_toggle: false
|
|
||||||
# entities:
|
|
||||||
# - script.all_indoor_lights_off
|
|
||||||
# - script.driveway_cam
|
|
||||||
# - script.driveway_camera_text_overlay
|
|
||||||
# - script.frontdoor_cam
|
|
||||||
# - script.frontdoor_camera_text_overlay
|
|
||||||
# - script.good_night_tts
|
|
||||||
# - script.home_mode_away
|
|
||||||
# - script.home_status
|
|
||||||
# - script.led_message
|
|
||||||
# - script.patio_cam
|
|
||||||
# - script.patio_camera_text_overlay
|
|
||||||
# - script.pill_taken
|
|
||||||
# - script.play_dog_sounds
|
|
||||||
# - script.play_fav_song
|
|
||||||
# - script.play_ringtone
|
|
||||||
# - script.playarea_cam
|
|
||||||
# - script.playarea_camera_text_overlay
|
|
||||||
# - script.query_disk_info
|
|
||||||
# - script.query_wifi_info
|
|
||||||
# - script.remind_pill
|
|
||||||
# - script.restart_all_raspberrypis
|
|
||||||
# - script.restart_all_snapclients
|
|
||||||
# - script.restart_hass
|
|
||||||
# - script.shutdown_all_raspberrypis
|
|
||||||
# - script.stop_hass
|
|
||||||
# - script.stream2chromecast
|
|
||||||
# - script.stream_driveway_camera_to_chromecast
|
|
||||||
# - script.stream_frontdoor_camera_to_chromecast
|
|
||||||
# - script.stream_patio_camera_to_chromecast
|
|
||||||
# - script.stream_playarea_camera_to_chromecast
|
|
||||||
# - script.toggle_climate
|
|
||||||
# - script.toggle_do_not_disturb
|
|
||||||
# - script.update_hass
|
|
||||||
# - script.voice_greeting
|
|
||||||
# - script.voice_notify
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ cards:
|
||||||
title: Zone Based Alerts
|
title: Zone Based Alerts
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- automation.alert_when_everyone_is_away
|
|
||||||
- automation.alert_when_someone_enters_a_zone
|
- automation.alert_when_someone_enters_a_zone
|
||||||
- automation.alert_when_someone_leaves_a_zone
|
- automation.alert_when_someone_leaves_a_zone
|
||||||
- automation.send_a_message_as_i_get_closer_to_home
|
- automation.send_a_message_as_i_get_closer_to_home
|
||||||
|
@ -84,7 +83,6 @@ cards:
|
||||||
- automation.home_security_system_watchdog_10_minutes
|
- automation.home_security_system_watchdog_10_minutes
|
||||||
- automation.home_security_system_watchdog_30_minutes
|
- automation.home_security_system_watchdog_30_minutes
|
||||||
- automation.notify_home_security_status_change
|
- automation.notify_home_security_status_change
|
||||||
- automation.turn_on_thermostat_upon_reaching_home
|
|
||||||
|
|
||||||
- type: conditional
|
- type: conditional
|
||||||
conditions:
|
conditions:
|
||||||
|
@ -112,7 +110,7 @@ cards:
|
||||||
title: Trash & Recycle Automations
|
title: Trash & Recycle Automations
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- automation.reset_trash_reminders
|
- automation.reset_trash_alerts
|
||||||
- automation.restore_trash_recycle_settings_on_startup
|
- automation.restore_trash_recycle_settings_on_startup
|
||||||
- automation.trash_and_recycle_pickup_reminder
|
- automation.trash_and_recycle_pickup_reminder
|
||||||
- automation.trash_pickup_day_changed
|
- automation.trash_pickup_day_changed
|
||||||
|
@ -183,11 +181,3 @@ cards:
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- automation.season_change_notification
|
- automation.season_change_notification
|
||||||
- automation.turn_off_ac_after_3_hours_of_cooling
|
|
||||||
|
|
||||||
- type: entities
|
|
||||||
title: Misc Automations
|
|
||||||
show_header_toggle: false
|
|
||||||
entities:
|
|
||||||
- automation.count_motions
|
|
||||||
- automation.reset_motion_counters_at_midnight
|
|
||||||
|
|
|
@ -1,473 +1,73 @@
|
||||||
# ###############################################################################
|
###############################################################################
|
||||||
# # @author : Mahasri Kalavala
|
# @author : Mahasri Kalavala
|
||||||
# # @date : 04/15/2017
|
# @date : 04/15/2017
|
||||||
# # @package : Batteries
|
# @package : Batteries
|
||||||
# # @description : Status about various baterries (iphones, sensors...etc)
|
# @description : Status about various baterries (iphones, sensors...etc)
|
||||||
# ###############################################################################
|
###############################################################################
|
||||||
# homeassistant:
|
homeassistant:
|
||||||
# customize:
|
|
||||||
# group.batteries:
|
|
||||||
# order: 2
|
|
||||||
|
|
||||||
# sensor.suresh_iphone_battery_state:
|
###############################################################################
|
||||||
# hidden: true
|
# _ _ _
|
||||||
# sensor.mallika_iphone_battery_state:
|
# /\ | | | | (_)
|
||||||
# hidden: true
|
# / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ ___
|
||||||
# sensor.srinika_iphone_battery_state:
|
# / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \/ __|
|
||||||
# hidden: true
|
# / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | \__ \
|
||||||
# sensor.hasika_iphone_battery_state:
|
# /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/
|
||||||
# hidden: true
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
# sensor.suresh_iphone_battery_ot:
|
automation:
|
||||||
# hidden: true
|
###############################################################################
|
||||||
# sensor.mallika_iphone_battery_ot:
|
# Automation: Notify of iPhone Low Battery
|
||||||
# hidden: true
|
###############################################################################
|
||||||
# sensor.srinika_iphone_battery_ot:
|
- alias: Notify Low battery
|
||||||
# hidden: true
|
initial_state: true
|
||||||
# sensor.hasika_iphone_battery_ot:
|
trigger:
|
||||||
# hidden: true
|
platform: numeric_state
|
||||||
|
entity_id:
|
||||||
|
- device_tracker.life360_suresh
|
||||||
|
- device_tracker.life360_mallika
|
||||||
|
- device_tracker.life360_srinika
|
||||||
|
- device_tracker.life360_hasika
|
||||||
|
value_template: "{{ state.attributes.battery_level }}"
|
||||||
|
below: 25
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}"
|
||||||
|
action:
|
||||||
|
- service: script.notify_family
|
||||||
|
data_template:
|
||||||
|
message: "{{ trigger.to_state.attributes.friendly_name | title }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
|
||||||
|
notify_options:
|
||||||
|
- telegram
|
||||||
|
- led
|
||||||
|
- voice
|
||||||
|
- tv
|
||||||
|
|
||||||
# sensor.hasika_iphone_wifi_state:
|
- alias: Alert Low Battery of Sensors
|
||||||
# friendly_name: Hasika Phone Wi-Fi Status
|
trigger:
|
||||||
# sensor.mallika_iphone_wifi_state:
|
platform: time
|
||||||
# friendly_name: Mallika Phone Wi-Fi Status
|
at: "10:10:10"
|
||||||
# sensor.srinika_iphone_wifi_state:
|
condition:
|
||||||
# friendly_name: Srinika Phone Wi-Fi Status
|
- condition: template
|
||||||
# sensor.suresh_iphone_wifi_state:
|
value_template: >
|
||||||
# friendly_name: Suresh Phone Wi-Fi Status
|
{% set ns = namespace(lowBattery=false) %}
|
||||||
|
{%- for x in states if "battery_level" in x["attributes"] and x.attributes.battery_level |int <= 25 %}
|
||||||
# sensor:
|
{% set ns.lowBattery = true %}{% endfor %}
|
||||||
# - platform: mqtt
|
{{ ns.lowBattery }}
|
||||||
# state_topic: "owntracks/mallika/mallika"
|
- condition: template
|
||||||
# name: "Mallika iPhone Battery (OT)"
|
value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}"
|
||||||
# unit_of_measurement: "%"
|
action:
|
||||||
# value_template: "{{ value_json.batt }}"
|
- service: script.notify_family
|
||||||
|
data_template:
|
||||||
# - platform: mqtt
|
message: >
|
||||||
# state_topic: "owntracks/suresh/suresh"
|
Sensors with low batteries (<25):
|
||||||
# name: "Suresh iPhone Battery (OT)"
|
{% set ns = namespace(lowBattery="") -%}
|
||||||
# unit_of_measurement: "%"
|
{%- for x in states if "battery_level" in x["attributes"] and x.attributes["battery_level"] |int <= 25 -%}
|
||||||
# value_template: "{{ value_json.batt }}"
|
{%- set ns.lowBattery = ns.lowBattery + x.name + "- " + x.attributes["battery_level"]|round|string + "\n" -%}
|
||||||
|
{%- endfor -%}
|
||||||
# - platform: mqtt
|
{{- ns.lowBattery -}}
|
||||||
# state_topic: "owntracks/srinika/srinika"
|
notify_options:
|
||||||
# name: "Srinika iPhone Battery (OT)"
|
- telegram
|
||||||
# unit_of_measurement: "%"
|
- tv
|
||||||
# value_template: "{{ value_json.batt }}"
|
- led
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/hasika/hasika"
|
|
||||||
# name: "Hasika iPhone Battery (OT)"
|
|
||||||
# unit_of_measurement: "%"
|
|
||||||
# value_template: "{{ value_json.batt }}"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/mallika/mallika"
|
|
||||||
# name: "Mallika iPhone Battery State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.charging == 1 %}
|
|
||||||
# Charging
|
|
||||||
# {% else %}
|
|
||||||
# Not Charging
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:battery-charging"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/suresh/suresh"
|
|
||||||
# name: "Suresh iPhone Battery State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.charging == 1 %}
|
|
||||||
# Charging
|
|
||||||
# {% else %}
|
|
||||||
# Not Charging
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:battery-charging"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/srinika/srinika"
|
|
||||||
# name: "Srinika iPhone Battery State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.charging == 1 %}
|
|
||||||
# Charging
|
|
||||||
# {% else %}
|
|
||||||
# Not Charging
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:battery-charging"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/hasika/hasika"
|
|
||||||
# name: "Hasika iPhone Battery State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.charging == 1 %}
|
|
||||||
# Charging
|
|
||||||
# {% else %}
|
|
||||||
# Not Charging
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:battery-charging"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/mallika/mallika"
|
|
||||||
# name: "Mallika iPhone Wifi State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.conn == "w" %}
|
|
||||||
# Connected
|
|
||||||
# {% else %}
|
|
||||||
# Not Connected
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:wifi"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/suresh/suresh"
|
|
||||||
# name: "Suresh iPhone Wifi State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.conn == "w" %}
|
|
||||||
# Connected
|
|
||||||
# {% else %}
|
|
||||||
# Not Connected
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:wifi"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/srinika/srinika"
|
|
||||||
# name: "Srinika iPhone Wifi State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.conn == "w" %}
|
|
||||||
# Connected
|
|
||||||
# {% else %}
|
|
||||||
# Not Connected
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:wifi"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/hasika/hasika"
|
|
||||||
# name: "Hasika iPhone Wifi State"
|
|
||||||
# value_template: >
|
|
||||||
# {% if value_json.conn == "w" %}
|
|
||||||
# Connected
|
|
||||||
# {% else %}
|
|
||||||
# Not Connected
|
|
||||||
# {% endif %}
|
|
||||||
# icon: "mdi:wifi"
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/mallika/mallika"
|
|
||||||
# name: "Mallika Driving Speed"
|
|
||||||
# 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}}"
|
|
||||||
# unit_of_measurement: miles
|
|
||||||
|
|
||||||
# - platform: mqtt
|
|
||||||
# state_topic: "owntracks/srinika/srinika"
|
|
||||||
# name: "Srinika Driving Speed"
|
|
||||||
# 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}}"
|
|
||||||
# unit_of_measurement: miles
|
|
||||||
|
|
||||||
# - platform: template
|
|
||||||
# sensors:
|
|
||||||
# suresh_iphone_battery_ot:
|
|
||||||
# unit_of_measurement: "%"
|
|
||||||
# value_template: >
|
|
||||||
# {% if states('sensor.suresh_iphone_battery_ot') != "unknown" %}
|
|
||||||
# {{ states('sensor.suresh_iphone_battery_ot')| int }}
|
|
||||||
# {% else %}
|
|
||||||
# 0
|
|
||||||
# {% endif %}
|
|
||||||
# icon_template: >-
|
|
||||||
# {% if states('sensor.suresh_iphone_battery_ot') != "unknown" %}
|
|
||||||
# {% set battery_level = states('sensor.suresh_iphone_battery_ot')|int (-1)%}
|
|
||||||
# {% set battery_round = (battery_level|int / 10)|int * 10 %}
|
|
||||||
# {% if states('sensor.suresh_iphone_battery_state') | lower == "charging" %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery-charging-100
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-charging-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
|
|
||||||
# - platform: template
|
|
||||||
# sensors:
|
|
||||||
# mallika_iphone_battery_ot:
|
|
||||||
# unit_of_measurement: "%"
|
|
||||||
# value_template: "{{ states('sensor.mallika_iphone_battery_ot')|int(-1) }}"
|
|
||||||
# icon_template: >-
|
|
||||||
# {% if states('sensor.mallika_iphone_battery_ot') != "unknown" %}
|
|
||||||
# {% set battery_level = states('sensor.mallika_iphone_battery_ot')|int (-1)%}
|
|
||||||
# {% set battery_round = (battery_level|int / 10)|int * 10 %}
|
|
||||||
# {% if states('sensor.mallika_iphone_battery_state') | lower == "charging" %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery-charging-100
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-charging-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
|
|
||||||
# - platform: template
|
|
||||||
# sensors:
|
|
||||||
# srinika_iphone_battery_ot:
|
|
||||||
# unit_of_measurement: "%"
|
|
||||||
# value_template: "{{ states('sensor.srinika_iphone_battery_ot')|int(-1) }}"
|
|
||||||
# icon_template: >-
|
|
||||||
# {% if states('sensor.srinika_iphone_battery_ot') != "unknown" %}
|
|
||||||
# {% set battery_level = states('sensor.srinika_iphone_battery_ot')|int (-1)%}
|
|
||||||
# {% set battery_round = (battery_level|int / 10)|int * 10 %}
|
|
||||||
# {% if states('sensor.srinika_iphone_battery_state') | lower == "charging" %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery-charging-100
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-charging-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
|
|
||||||
# - platform: template
|
|
||||||
# sensors:
|
|
||||||
# hasika_iphone_battery_ot:
|
|
||||||
# unit_of_measurement: "%"
|
|
||||||
# value_template: "{{ states('sensor.hasika_iphone_battery_ot')|int(-1) }}"
|
|
||||||
# icon_template: >-
|
|
||||||
# {% if states('sensor.hasika_iphone_battery_ot') != "unknown" %}
|
|
||||||
# {% set battery_level = states('sensor.hasika_iphone_battery_ot')|int (-1)%}
|
|
||||||
# {% set battery_round = (battery_level|int / 10)|int * 10 %}
|
|
||||||
# {% if states('sensor.hasika_iphone_battery_state') | lower == "charging" %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery-charging-100
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-charging-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_level == -1 %}
|
|
||||||
# mdi:battery-unknown
|
|
||||||
# {% else %}
|
|
||||||
# {% if battery_round >= 100 %}
|
|
||||||
# mdi:battery
|
|
||||||
# {% elif battery_round > 0 %}
|
|
||||||
# mdi:battery-{{ battery_round }}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% endif %}
|
|
||||||
# {% else %}
|
|
||||||
# mdi:battery-alert
|
|
||||||
# {% 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.
|
|
||||||
# #
|
|
||||||
# - alias: Alert When Moving
|
|
||||||
# trigger:
|
|
||||||
# platform: numeric_state
|
|
||||||
# entity_id:
|
|
||||||
# - sensor.suresh_driving_speed
|
|
||||||
# - sensor.mallika_driving_speed
|
|
||||||
# - sensor.srinika_driving_speed
|
|
||||||
# - sensor.hasika_driving_speed
|
|
||||||
# above: 8
|
|
||||||
# condition:
|
|
||||||
# - condition: template
|
|
||||||
# value_template: >
|
|
||||||
# {%- if state_attr('automation.alert_when_moving', 'last_triggered') -%}
|
|
||||||
# {{ (as_timestamp(now()) - as_timestamp(state_attr('automation.alert_when_moving', 'last_triggered'))) > 300 }}
|
|
||||||
# {%- else -%}
|
|
||||||
# true
|
|
||||||
# {%- endif -%}
|
|
||||||
# - condition: template
|
|
||||||
# value_template: "{{ states('input_boolean.home_mode_away') == 'off' }}"
|
|
||||||
# - condition: template
|
|
||||||
# value_template: "{{ states('alarm_control_panel.home') | lower != 'armed_away' }}"
|
|
||||||
# action:
|
|
||||||
# - service: script.voice_notify
|
|
||||||
# data_template:
|
|
||||||
# message: >-
|
|
||||||
# {% set apostrophe = "\'" %}
|
|
||||||
# {{ trigger.entity_id.split('.')[1].split('_')[0] |title ~ apostrophe ~ 's' }} vehicle is in motion.
|
|
||||||
# - service: script.notify_me
|
|
||||||
# data_template:
|
|
||||||
# message: >-
|
|
||||||
# {% 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
|
|
||||||
# ###############################################################################
|
|
||||||
# - alias: Notify Low battery
|
|
||||||
# initial_state: true
|
|
||||||
# trigger:
|
|
||||||
# platform: numeric_state
|
|
||||||
# entity_id:
|
|
||||||
# - 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
|
|
||||||
# value_template: "{{ states('input_boolean.battery_notifications') == 'on' }}"
|
|
||||||
# action:
|
|
||||||
# - service: script.notify_me
|
|
||||||
# data_template:
|
|
||||||
# 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.split(' ')[1] }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
|
|
||||||
# - service: script.led_message
|
|
||||||
# data_template:
|
|
||||||
# message: "{{ trigger.to_state.attributes.friendly_name.split(' ')[1] }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
|
|
||||||
|
|
||||||
# # - alias: Alert Low Battery
|
|
||||||
# # trigger:
|
|
||||||
# # - platform: template
|
|
||||||
# # value_template: >
|
|
||||||
# # {% set ns = namespace(lowBattery=false) %}
|
|
||||||
# # {%- for x in states if x.attributes and x.attributes.battery_level and x.attributes.battery_level |int <= 24 %}
|
|
||||||
# # {% set ns.lowBattery = true %}{% endfor %}
|
|
||||||
# # {{ ns.lowBattery }}
|
|
||||||
# # condition:
|
|
||||||
# # - condition: template
|
|
||||||
# # value_template: "{{ ((trigger.to_state.state | int) < states('sensor.battery_alert_threshold') | int) }}"
|
|
||||||
# # action:
|
|
||||||
# # - service: script.voice_notify
|
|
||||||
# # data_template:
|
|
||||||
# # message: >
|
|
||||||
# # {% set ns = namespace(lowBattery="") %}
|
|
||||||
# # {%- for x in states if x.attributes and x.attributes.battery_level and x.attributes.battery_level |int <= 24 %}
|
|
||||||
# # {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
|
|
||||||
# # {% set ns.lowBattery = ns.lowBattery ~ ',' ~ x.name %}
|
|
||||||
# # {%- endfor %}
|
|
||||||
# # {{ ns.lowBattery -}}
|
|
||||||
# # {{- ' battery is ' if ns.lowBattery.split(',')|count == 2 else ' batteries are ' -}} less than 25 percent.
|
|
||||||
# # - service: script.led_message
|
|
||||||
# # data_template:
|
|
||||||
# # message: "{{ trigger.to_state.attributes.friendly_name.split(' ')[1] }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
|
|
||||||
|
|
||||||
# - alias: Check Wi-Fi Status of iPhones At Home
|
|
||||||
# initial_state: true
|
|
||||||
# trigger:
|
|
||||||
# - platform: state
|
|
||||||
# entity_id:
|
|
||||||
# - 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"
|
|
||||||
# - condition: state
|
|
||||||
# entity_id: sensor.mallika_iphone_wifi_state
|
|
||||||
# state: "Not Connected"
|
|
||||||
# - condition: state
|
|
||||||
# entity_id: sensor.srinika_iphone_wifi_state
|
|
||||||
# state: "Not Connected"
|
|
||||||
# - condition: state
|
|
||||||
# entity_id: sensor.suresh_iphone_wifi_state
|
|
||||||
# state: "Not Connected"
|
|
||||||
# action:
|
|
||||||
# - service: script.notify_me
|
|
||||||
# data_template:
|
|
||||||
# message: >
|
|
||||||
# {% set member = trigger.entity_id.split('.')[1].split('_')[0] %}
|
|
||||||
# {{ member | title }}'s iPhone is not connected to Wi-Fi at home!
|
|
||||||
# - service: script.voice_notify
|
|
||||||
# data_template:
|
|
||||||
# message: >
|
|
||||||
# {% set member = trigger.entity_id.split('.')[1].split('_')[0] %}
|
|
||||||
# {{ member | title }}'s iPhone is not connected to Wi-Fi at home!
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
|
||||||
- service: script.frontdoor_cam # change to front door camera stream on chromecast
|
- service: script.frontdoor_cam # change to front door camera stream on chromecast
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
||||||
|
@ -392,7 +392,7 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
|
||||||
- service: script.stream2chromecast
|
- service: script.stream2chromecast
|
||||||
data_template:
|
data_template:
|
||||||
url: !secret driveway_camera_stream_url
|
url: !secret driveway_camera_stream_url
|
||||||
|
@ -495,7 +495,7 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
||||||
action:
|
action:
|
||||||
|
@ -591,7 +591,7 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
|
||||||
- service: script.stream2chromecast
|
- service: script.stream2chromecast
|
||||||
data_template:
|
data_template:
|
||||||
url: !secret playarea_camera_stream_url
|
url: !secret playarea_camera_stream_url
|
||||||
|
@ -711,7 +711,7 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
||||||
action:
|
action:
|
||||||
|
@ -818,7 +818,7 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
||||||
action:
|
action:
|
||||||
|
@ -909,7 +909,7 @@ automation:
|
||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
||||||
action:
|
action:
|
||||||
|
|
|
@ -1,24 +1,6 @@
|
||||||
homeassistant:
|
homeassistant:
|
||||||
customize:
|
customize:
|
||||||
package.door_sensors:
|
package.door_sensors:
|
||||||
door_notification_script: &door_notification_script
|
|
||||||
message: >
|
|
||||||
{% set doors = "" %}
|
|
||||||
{% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
|
|
||||||
states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" %}
|
|
||||||
{% set doors = "Attention! Both Garage Doors are OPEN" %}
|
|
||||||
{% elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
|
|
||||||
states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" %}
|
|
||||||
{% set doors = "Both Garage Doors are now CLOSED" %}
|
|
||||||
{% else %}
|
|
||||||
{% if trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "on" %}
|
|
||||||
Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED!
|
|
||||||
{% elif trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "off" %}
|
|
||||||
Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED!
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{{ doors }}
|
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
|
@ -125,85 +107,72 @@ automation:
|
||||||
trigger:
|
trigger:
|
||||||
platform: state
|
platform: state
|
||||||
entity_id:
|
entity_id:
|
||||||
- binary_sensor.door_window_sensor_158d0004231f7b # 2 Car Garage
|
|
||||||
- binary_sensor.door_window_sensor_158d0004248d5b # Single car garage
|
- binary_sensor.door_window_sensor_158d0004248d5b # Single car garage
|
||||||
condition:
|
- binary_sensor.door_window_sensor_158d0004231f7b # 2 Car Garage
|
||||||
- condition: template
|
|
||||||
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ trigger.from_state.state not in ['unavailable', 'unknown'] }}"
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ trigger.to_state.state not in ['unavailable', 'unknown'] }}"
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}"
|
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
entity_id: switch.garage
|
entity_id: switch.garage
|
||||||
- service: script.notify_family
|
- service: script.notify_family
|
||||||
data_template:
|
data_template:
|
||||||
<<: *door_notification_script
|
message: >
|
||||||
notify_options: ["voice", "led", "tv"]
|
{% set doors = "" %}
|
||||||
|
{% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
|
||||||
|
states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" %}
|
||||||
|
{% set doors = "Attention! Both Garage Doors are OPEN" %}
|
||||||
|
{% elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
|
||||||
|
states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" %}
|
||||||
|
{% set doors = "Both Garage Doors are now CLOSED" %}
|
||||||
|
{% else %}
|
||||||
|
{% if trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "on" %}
|
||||||
|
{% set doors = "Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED!" %}
|
||||||
|
{% elif trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "off" %}
|
||||||
|
{% set doors = "Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED!" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{{ doors }} - {{ trigger.to_state.attributes.friendly_name }}: from '{{trigger.from_state.state}}'', to: '{{ trigger.to_state.state }}'
|
||||||
|
notify_options:
|
||||||
|
- voice
|
||||||
|
- led
|
||||||
|
- tv
|
||||||
|
- email
|
||||||
|
- telegram
|
||||||
- delay: "00:00:05"
|
- delay: "00:00:05"
|
||||||
- service: camera.snapshot
|
- service: camera.snapshot
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "camera.garage"
|
entity_id: "camera.garage"
|
||||||
filename:
|
filename: "{{ '/config/www/downloads/camera/garage/garage_' ~
|
||||||
"{{ '/config/www/downloads/camera/garage/garage_' ~
|
|
||||||
((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
|
((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}"
|
||||||
|
# - service: script.notify_family
|
||||||
- service: script.notify_family
|
# data_template:
|
||||||
data_template:
|
# message: >
|
||||||
title: "{{ trigger.to_state.attributes.friendly_name }}: {{ 'OPEN' if trigger.to_state.state == 'on' else 'CLOSED' }}"
|
# {% set doors = "" %}
|
||||||
message: >-
|
# {% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
|
||||||
{%- set doors = "" -%}
|
# states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" %}
|
||||||
{%- if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
|
# {% set doors = "Attention! Both Garage Doors are OPEN" %}
|
||||||
states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" -%}
|
# {% elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
|
||||||
{% set doors = "Both Garage Doors are OPEN" -%}
|
# states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" %}
|
||||||
{%- elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
|
# {% set doors = "Both Garage Doors are now CLOSED" %}
|
||||||
states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" -%}
|
# {% else %}
|
||||||
{% set doors = "Both Garage Doors are CLOSED" -%}
|
# {% if trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "on" %}
|
||||||
{%- else -%}
|
# {% set doors = "Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED!" %}
|
||||||
{% set doors = states.binary_sensor.door_window_sensor_158d0004248d5b.name ~ " is " ~
|
# {% elif trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "off" %}
|
||||||
('Closed' if states('binary_sensor.door_window_sensor_158d0004248d5b') == 'off' else 'OPEN')
|
# {% set doors = "Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED!" %}
|
||||||
~ " and " ~ state_attr('binary_sensor.door_window_sensor_158d0004231f7b', 'friendly_name') ~ " is " ~
|
# {% endif %}
|
||||||
('Closed' if states('binary_sensor.door_window_sensor_158d0004231f7b') == 'off' else 'OPEN') %}
|
# {% endif %}
|
||||||
{%- endif %}
|
# {{ doors }}
|
||||||
Your {{doors}} on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") }}. Please check the garage snapshot below.
|
# url: >
|
||||||
url: >
|
# {{ '/config/www/downloads/camera/garage/garage_' ~
|
||||||
{{ '/config/www/downloads/camera/garage/garage_' ~
|
# ((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
|
||||||
((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
|
# .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}
|
# notify_options:
|
||||||
notify_options:
|
# - telegram
|
||||||
- telegram
|
# - email
|
||||||
|
# - tv
|
||||||
- service: notify.notify_smtp
|
- service: switch.turn_off
|
||||||
data_template:
|
|
||||||
title: 'Garage Door Status {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
|
|
||||||
message: >-
|
|
||||||
{%- set doors = "" -%}
|
|
||||||
{%- if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
|
|
||||||
states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" -%}
|
|
||||||
{%- set doors = "Both Garage Doors are OPEN" -%}
|
|
||||||
{%- elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
|
|
||||||
states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" -%}
|
|
||||||
{%- set doors = "Both Garage Doors are CLOSED" -%}
|
|
||||||
{%- else -%}
|
|
||||||
{%- set doors = states.binary_sensor.door_window_sensor_158d0004248d5b.name ~ " is " ~
|
|
||||||
('Closed' if states('binary_sensor.door_window_sensor_158d0004248d5b') == 'off' else 'OPEN')
|
|
||||||
~ " and " ~ state_attr('binary_sensor.door_window_sensor_158d0004231f7b', 'friendly_name') ~ " is " ~
|
|
||||||
('Closed' if states('binary_sensor.door_window_sensor_158d0004231f7b') == 'off' else 'OPEN') -%}
|
|
||||||
{%- endif -%}
|
|
||||||
Your {{doors}} on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") }}. Please check the garage snapshot below.
|
|
||||||
data:
|
|
||||||
images:
|
|
||||||
- "{{ '/config/www/downloads/camera/garage/garage_' ~
|
|
||||||
((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
|
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}"
|
|
||||||
|
|
||||||
- service_template: "switch.turn_{{- trigger.to_state.state }}"
|
|
||||||
entity_id: switch.garage
|
entity_id: switch.garage
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
# Notify Entry Door Status
|
# Notify Entry Door Status
|
||||||
###############################################################################
|
###############################################################################
|
||||||
- alias: Voice Notify Entry Door Status
|
- alias: Voice Notify Entry Door Status
|
||||||
|
@ -233,10 +202,13 @@ automation:
|
||||||
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') }} is CLOSED!
|
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') }} is CLOSED!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
notify_options:
|
notify_options:
|
||||||
- telegram
|
# - telegram
|
||||||
- tv
|
- tv
|
||||||
- led
|
- led
|
||||||
- voice
|
|
||||||
|
###############################################################################
|
||||||
|
# Light automations when doors are opened
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
- alias: When Front Door Opens Turn Front Room Lights ON
|
- alias: When Front Door Opens Turn Front Room Lights ON
|
||||||
initial_state: true
|
initial_state: true
|
||||||
|
@ -304,12 +276,12 @@ automation:
|
||||||
- service: timer.start
|
- service: timer.start
|
||||||
entity_id: timer.timer_garage
|
entity_id: timer.timer_garage
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# MASTER BATHROOM AUTOMATIONS
|
# MASTER BATHROOM AUTOMATIONS
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Only turn ON lights at 25% at night
|
# Only turn ON lights at 25% at night
|
||||||
#
|
#
|
||||||
- alias: Master Bathroom Door Opened After Dark
|
- alias: Master Bathroom Door Opened After Dark
|
||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
|
@ -379,9 +351,9 @@ automation:
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: switch.master_bathroom_toilet_light
|
entity_id: switch.master_bathroom_toilet_light
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# GUEST BATHROOM AUTOMATIONS
|
# GUEST BATHROOM AUTOMATIONS
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
- alias: Guest Bathroom Door Opened
|
- alias: Guest Bathroom Door Opened
|
||||||
initial_state: true
|
initial_state: true
|
||||||
|
|
|
@ -55,11 +55,11 @@ automation:
|
||||||
script.xiaomi_red
|
script.xiaomi_red
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
#
|
#
|
||||||
# This automation will trigger when the Home Security System is "Triggered"
|
# This automation will trigger when the Home Security System is "Triggered"
|
||||||
# This will send all relevant information - Door Statuses and Camera snapshots around the home
|
# This will send all relevant information - Door Statuses and Camera snapshots around the home
|
||||||
# Meanwhile Home Security Company will be calling and/or dispatching Police over to the house.
|
# Meanwhile Home Security Company will be calling and/or dispatching Police over to the house.
|
||||||
# This should give you enough information to have a good conversation with the Home Security System company when not at home
|
# This should give you enough information to have a good conversation with the Home Security System company when not at home
|
||||||
|
|
||||||
- alias: Home Security Triggered
|
- alias: Home Security Triggered
|
||||||
initial_state: true
|
initial_state: true
|
||||||
|
@ -67,6 +67,9 @@ automation:
|
||||||
platform: state
|
platform: state
|
||||||
entity_id: alarm_control_panel.home
|
entity_id: alarm_control_panel.home
|
||||||
to: "triggered"
|
to: "triggered"
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
|
||||||
action:
|
action:
|
||||||
- service: script.notify_family
|
- service: script.notify_family
|
||||||
data_template:
|
data_template:
|
||||||
|
@ -95,40 +98,34 @@ automation:
|
||||||
- led
|
- led
|
||||||
- voice
|
- voice
|
||||||
|
|
||||||
|
|
||||||
- service: camera.snapshot
|
- service: camera.snapshot
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "camera.frontdoor_camera"
|
entity_id: "camera.frontdoor_camera"
|
||||||
filename:
|
filename: "{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
|
||||||
"{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
|
|
||||||
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
- service: camera.snapshot
|
- service: camera.snapshot
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "camera.driveway_camera"
|
entity_id: "camera.driveway_camera"
|
||||||
filename:
|
filename: "{{ '/config/www/downloads/camera/driveway/driveway_' ~
|
||||||
"{{ '/config/www/downloads/camera/driveway/driveway_' ~
|
|
||||||
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
- service: camera.snapshot
|
- service: camera.snapshot
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "camera.garage"
|
entity_id: "camera.garage"
|
||||||
filename:
|
filename: "{{ '/config/www/downloads/camera/garage/garage_' ~
|
||||||
"{{ '/config/www/downloads/camera/garage/garage_' ~
|
|
||||||
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
- service: camera.snapshot
|
- service: camera.snapshot
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "camera.patio_camera"
|
entity_id: "camera.patio_camera"
|
||||||
filename:
|
filename: "{{ '/config/www/downloads/camera/patio/patio_' ~
|
||||||
"{{ '/config/www/downloads/camera/patio/patio_' ~
|
|
||||||
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
- service: camera.snapshot
|
- service: camera.snapshot
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "camera.playarea_camera"
|
entity_id: "camera.playarea_camera"
|
||||||
filename:
|
filename: "{{ '/config/www/downloads/camera/playarea/playarea_' ~
|
||||||
"{{ '/config/www/downloads/camera/playarea/playarea_' ~
|
|
||||||
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
|
|
||||||
|
@ -139,24 +136,24 @@ automation:
|
||||||
data:
|
data:
|
||||||
photo:
|
photo:
|
||||||
- file: "{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
|
- file: "{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
|
||||||
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
caption: "Front Door"
|
caption: "Front Door"
|
||||||
- file: "{{ '/config/www/downloads/camera/driveway/driveway_' ~
|
- file: "{{ '/config/www/downloads/camera/driveway/driveway_' ~
|
||||||
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
caption: "Driveway"
|
caption: "Driveway"
|
||||||
- file: "{{ '/config/www/downloads/camera/garage/garage_' ~
|
- file: "{{ '/config/www/downloads/camera/garage/garage_' ~
|
||||||
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
caption: "Garage"
|
caption: "Garage"
|
||||||
- file: "{{ '/config/www/downloads/camera/patio/patio_' ~
|
- file: "{{ '/config/www/downloads/camera/patio/patio_' ~
|
||||||
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
caption: "Patio"
|
caption: "Patio"
|
||||||
- file: "{{ '/config/www/downloads/camera/playarea/playarea_' ~
|
- file: "{{ '/config/www/downloads/camera/playarea/playarea_' ~
|
||||||
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
caption: "Playarea"
|
caption: "Playarea"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -195,11 +192,11 @@ automation:
|
||||||
- tv
|
- tv
|
||||||
- led
|
- led
|
||||||
- voice
|
- voice
|
||||||
|
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('alarm_control_panel.home') != 'disarmed' }}"
|
value_template: "{{ states('alarm_control_panel.home') != 'disarmed' }}"
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.notify_camera_alerts
|
entity_id: input_boolean.camera_alerts
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# A gentle 10 minute reminder that the Home Security system is OFF
|
# A gentle 10 minute reminder that the Home Security system is OFF
|
||||||
|
@ -212,6 +209,9 @@ automation:
|
||||||
to: "disarmed"
|
to: "disarmed"
|
||||||
for:
|
for:
|
||||||
minutes: 10
|
minutes: 10
|
||||||
|
condition:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
|
||||||
action:
|
action:
|
||||||
- service: script.notify_family
|
- service: script.notify_family
|
||||||
data:
|
data:
|
||||||
|
@ -274,18 +274,20 @@ automation:
|
||||||
- tv
|
- tv
|
||||||
- led
|
- led
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Check for Garage Door Status when Home Security System State changes
|
# Check for Garage Door Status when Home Security System State changes
|
||||||
###############################################################################
|
###############################################################################
|
||||||
- alias: Home Security System And Garage Door Check
|
- alias: Home Security System And Garage Door Check
|
||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time_pattern
|
- platform: time_pattern
|
||||||
minutes: '/15'
|
minutes: "/15"
|
||||||
seconds: 00
|
seconds: 00
|
||||||
condition:
|
condition:
|
||||||
condition: and
|
condition: and
|
||||||
conditions:
|
conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
|
||||||
- condition: or
|
- condition: or
|
||||||
|
@ -306,11 +308,10 @@ automation:
|
||||||
message: >
|
message: >
|
||||||
Attention! Your home Security system is set to {{ states('alarm_control_panel.home').split('_')[1] | upper }} mode. BUT THE {% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
|
Attention! Your home Security system is set to {{ states('alarm_control_panel.home').split('_')[1] | upper }} mode. BUT THE {% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
|
||||||
url: "{{ '/config/www/downloads/camera/garage/garage_' ~
|
url: "{{ '/config/www/downloads/camera/garage/garage_' ~
|
||||||
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
|
||||||
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
|
||||||
notify_options:
|
notify_options:
|
||||||
- telegram
|
- telegram
|
||||||
- tv
|
- tv
|
||||||
- led
|
- led
|
||||||
- voice
|
- voice
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,9 @@ automation:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}"
|
value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}"
|
||||||
action:
|
action:
|
||||||
- service: script.led_message
|
- service: script.notify_family
|
||||||
data_template:
|
data_template:
|
||||||
message: >
|
message: >
|
||||||
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
|
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
|
||||||
|
notify_options:
|
||||||
|
- led
|
||||||
|
|
|
@ -1,195 +0,0 @@
|
||||||
homeassistant:
|
|
||||||
customize:
|
|
||||||
input_label.back_door_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.basement_door_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.front_room_window_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.garage_door_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.garage_motion:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.kitchen_motion_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d00016c2d0e:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d00016db6d2:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d0001a25041:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d0001a662fe:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d00024e57d3:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d00024e57fb:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d00024e842c:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d00024ee084:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d000272bed1:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d00047b6f69:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d000272bf48:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.motion_sensor_158d000272bfd7:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.single_car_garage_door_tilt_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.stairs_motion_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.two_car_garage_door_tilt_sensor_sensor:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.door_window_sensor_158d0004231f7b:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.door_window_sensor_158d0004248d5b:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.door_window_sensor_158d00040ad8fc:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.door_window_sensor_158d0004880f30:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
input_label.door_window_sensor_158d000424a6d6:
|
|
||||||
unit_of_measurement: "count"
|
|
||||||
|
|
||||||
input_label:
|
|
||||||
door_window_sensor_158d000424a6d6:
|
|
||||||
name: Front Door
|
|
||||||
icon: mdi:run-fast
|
|
||||||
door_window_sensor_158d00040ad8fc:
|
|
||||||
name: Back Door
|
|
||||||
icon: mdi:run-fast
|
|
||||||
door_window_sensor_158d0004880f30:
|
|
||||||
name: Garage Entry Door
|
|
||||||
icon: mdi:run-fast
|
|
||||||
basement_door_sensor_sensor:
|
|
||||||
name: Basement Door
|
|
||||||
icon: mdi:run-fast
|
|
||||||
garage_door_sensor_sensor:
|
|
||||||
name: Garage Door
|
|
||||||
icon: mdi:run-fast
|
|
||||||
|
|
||||||
front_room_window_sensor_sensor:
|
|
||||||
name: Front Room Sensor
|
|
||||||
icon: mdi:run-fast
|
|
||||||
garage_motion:
|
|
||||||
name: Garage Motion
|
|
||||||
icon: mdi:run-fast
|
|
||||||
kitchen_motion_sensor_sensor:
|
|
||||||
name: Kitchen Motion
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d00016c2d0e:
|
|
||||||
name: Dining Room Motion (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d00016db6d2:
|
|
||||||
name: Front Room Motion (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d0001a25041:
|
|
||||||
name: Family Room (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d0001a662fe:
|
|
||||||
name: Kitchen (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d00024e57d3:
|
|
||||||
name: Master Bedroom (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d00024e57fb:
|
|
||||||
name: Driveway Motion (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d00024e842c:
|
|
||||||
name: Backyard Motion (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d00024ee084:
|
|
||||||
name: Front Door Motion (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d000272bed1:
|
|
||||||
name: Srinika Bedroom (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d00047b6f69:
|
|
||||||
name: Hasika Bedroom (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
|
|
||||||
motion_sensor_158d000272bf48:
|
|
||||||
name: Garage Motion (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
motion_sensor_158d000272bfd7:
|
|
||||||
name: Office Room Motion (Xiaomi)
|
|
||||||
icon: mdi:run-fast
|
|
||||||
|
|
||||||
door_window_sensor_158d0004248d5b:
|
|
||||||
name: Single Car Garage Door
|
|
||||||
icon: mdi:run-fast
|
|
||||||
door_window_sensor_158d0004231f7b:
|
|
||||||
name: Double Car Garage Door
|
|
||||||
icon: mdi:run-fast
|
|
||||||
stairs_motion_sensor_sensor:
|
|
||||||
name: Stairs Motion
|
|
||||||
icon: mdi:run-fast
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: Count Motions
|
|
||||||
trigger:
|
|
||||||
- platform: state
|
|
||||||
to: "on"
|
|
||||||
entity_id:
|
|
||||||
- binary_sensor.door_window_sensor_158d000424a6d6
|
|
||||||
- binary_sensor.door_window_sensor_158d00040ad8fc
|
|
||||||
- binary_sensor.door_window_sensor_158d0004880f30 # garage entry door
|
|
||||||
- binary_sensor.basement_door_sensor_sensor
|
|
||||||
- binary_sensor.front_room_window_sensor_sensor
|
|
||||||
- binary_sensor.garage_door_sensor_sensor
|
|
||||||
- binary_sensor.garage_motion
|
|
||||||
- binary_sensor.kitchen_motion_sensor_sensor
|
|
||||||
- binary_sensor.motion_sensor_158d00016c2d0e
|
|
||||||
- binary_sensor.motion_sensor_158d00016db6d2
|
|
||||||
- binary_sensor.motion_sensor_158d0001a25041
|
|
||||||
- binary_sensor.motion_sensor_158d0001a662fe
|
|
||||||
- binary_sensor.motion_sensor_158d00024e57d3
|
|
||||||
- binary_sensor.motion_sensor_158d00024e57fb
|
|
||||||
- binary_sensor.motion_sensor_158d00024e842c
|
|
||||||
- binary_sensor.motion_sensor_158d00024ee084
|
|
||||||
- binary_sensor.motion_sensor_158d000272bed1
|
|
||||||
- binary_sensor.motion_sensor_158d00047b6f69
|
|
||||||
- binary_sensor.motion_sensor_158d000272bf48
|
|
||||||
- binary_sensor.motion_sensor_158d000272bfd7
|
|
||||||
- binary_sensor.stairs_motion_sensor_sensor
|
|
||||||
- binary_sensor.door_window_sensor_158d0004248d5b # Single Car Garage
|
|
||||||
- binary_sensor.door_window_sensor_158d0004231f7b # Double Car Garage
|
|
||||||
action:
|
|
||||||
- service: input_label.set_value
|
|
||||||
data_template:
|
|
||||||
entity_id: "input_label.{{ trigger.entity_id.split('.')[1] }}"
|
|
||||||
value: >
|
|
||||||
{% set cur_value = states("input_label." ~ trigger.entity_id.split('.')[1] ) | int %}
|
|
||||||
{{ cur_value + 1 }}
|
|
||||||
|
|
||||||
- alias: Reset Motion Counters At Midnight
|
|
||||||
trigger:
|
|
||||||
- platform: time
|
|
||||||
at: "00:00:00"
|
|
||||||
action:
|
|
||||||
- service: input_label.set_value
|
|
||||||
data:
|
|
||||||
value: 0
|
|
||||||
entity_id:
|
|
||||||
- input_label.basement_door_sensor_sensor
|
|
||||||
- input_label.front_room_window_sensor_sensor
|
|
||||||
- input_label.garage_door_sensor_sensor
|
|
||||||
- input_label.garage_motion
|
|
||||||
- input_label.kitchen_motion_sensor_sensor
|
|
||||||
- input_label.motion_sensor_158d00016c2d0e
|
|
||||||
- input_label.motion_sensor_158d00016db6d2
|
|
||||||
- input_label.motion_sensor_158d0001a25041
|
|
||||||
- input_label.motion_sensor_158d0001a662fe
|
|
||||||
- input_label.motion_sensor_158d00024e57d3
|
|
||||||
- input_label.motion_sensor_158d00024e57fb
|
|
||||||
- input_label.motion_sensor_158d00024e842c
|
|
||||||
- input_label.motion_sensor_158d00024ee084
|
|
||||||
- input_label.motion_sensor_158d000272bed1
|
|
||||||
- input_label.motion_sensor_158d00047b6f69
|
|
||||||
- input_label.motion_sensor_158d000272bf48
|
|
||||||
- input_label.motion_sensor_158d000272bfd7
|
|
||||||
- input_label.door_window_sensor_158d000424a6d6
|
|
||||||
- input_label.door_window_sensor_158d00040ad8fc
|
|
||||||
- input_label.door_window_sensor_158d0004880f30
|
|
|
@ -55,3 +55,14 @@ automation:
|
||||||
- tv
|
- tv
|
||||||
- led
|
- led
|
||||||
- voice
|
- voice
|
||||||
|
|
||||||
|
script:
|
||||||
|
###############################################################################
|
||||||
|
# A script that toggles Nest Thermostat between eco/away & non-eco/away modes
|
||||||
|
###############################################################################
|
||||||
|
toggle_climate:
|
||||||
|
sequence:
|
||||||
|
- service: climate.set_away_mode
|
||||||
|
data_template:
|
||||||
|
entity_id: climate.dining_room
|
||||||
|
away_mode: "{{ false if state_attr('climate.dining_room', 'away_mode') == 'on' else true }}"
|
||||||
|
|
|
@ -64,6 +64,17 @@ telegram_bot:
|
||||||
allowed_chat_ids:
|
allowed_chat_ids:
|
||||||
- !secret telegram_chatid
|
- !secret telegram_chatid
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# _ _ _ _ __
|
||||||
|
# | \ | | | | (_)/ _|
|
||||||
|
# | \| | ___ | |_ _| |_ _ _
|
||||||
|
# | . ` |/ _ \| __| | _| | | |
|
||||||
|
# | |\ | (_) | |_| | | | |_| |
|
||||||
|
# |_| \_|\___/ \__|_|_| \__, |
|
||||||
|
# __/ |
|
||||||
|
# |___/
|
||||||
|
# Notify Related Scripts
|
||||||
|
###############################################################################
|
||||||
script:
|
script:
|
||||||
notify_family:
|
notify_family:
|
||||||
sequence:
|
sequence:
|
||||||
|
@ -111,9 +122,9 @@ script:
|
||||||
|
|
||||||
notify_firestick:
|
notify_firestick:
|
||||||
sequence:
|
sequence:
|
||||||
# - condition: state
|
- condition: state
|
||||||
# entity_id: input_boolean.firetv_alerts
|
entity_id: input_boolean.firetv_alerts
|
||||||
# state: "on"
|
state: "on"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ 'tv' in notify_options }}"
|
value_template: "{{ 'tv' in notify_options }}"
|
||||||
- service: notify.android_tv_fire_tv
|
- service: notify.android_tv_fire_tv
|
||||||
|
@ -126,13 +137,17 @@ script:
|
||||||
image:
|
image:
|
||||||
path: "{{ url }}" #/config/www/downloads/camera/driveway/driveway_20220604_185216.jpg
|
path: "{{ url }}" #/config/www/downloads/camera/driveway/driveway_20220604_185216.jpg
|
||||||
icon:
|
icon:
|
||||||
path: /config/www/{{- [ "suresh.jpg", "srinika.jpg", "mallika.jpg", "hasika.jpg" ] | random -}}
|
path: >
|
||||||
|
/config/www/{{- [ "suresh.jpg", "srinika.jpg", "mallika.jpg", "hasika.jpg",
|
||||||
|
"bob.jpg", "butters.jpg", "eric.jpg", "gene.jpg", "kyle.jpg", "linda.jpg",
|
||||||
|
"lois.jpg", "louis.jpg", "meg.jpg", "morty.jpg", "peter.jpg", "quagmire.jpg",
|
||||||
|
"randy.jpg", "tina.jpg" ] | random -}}
|
||||||
|
|
||||||
notify_telegram:
|
notify_telegram:
|
||||||
sequence:
|
sequence:
|
||||||
# - condition: state
|
- condition: state
|
||||||
# entity_id: input_boolean.text_alerts
|
entity_id: input_boolean.telegram_alerts
|
||||||
# state: "on"
|
state: "on"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ 'telegram' in notify_options }}"
|
value_template: "{{ 'telegram' in notify_options }}"
|
||||||
- service: telegram_bot.send_message
|
- service: telegram_bot.send_message
|
||||||
|
@ -146,21 +161,21 @@ script:
|
||||||
|
|
||||||
notify_email:
|
notify_email:
|
||||||
sequence:
|
sequence:
|
||||||
# - condition: state
|
- condition: state
|
||||||
# entity_id: input_boolean.email_alerts
|
entity_id: input_boolean.email_alerts
|
||||||
# state: "on"
|
state: "on"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ 'email' in notify_options }}"
|
value_template: "{{ 'email' in notify_options }}"
|
||||||
- service: script.notify_smtp
|
- service: notify.notify_smtp
|
||||||
data_template:
|
data_template:
|
||||||
title: "{{ title }}"
|
title: "{{ title }}"
|
||||||
message: "{{ message }}"
|
message: "{{ message }}"
|
||||||
|
|
||||||
notify_voice:
|
notify_voice:
|
||||||
sequence:
|
sequence:
|
||||||
# - condition: state
|
- condition: state
|
||||||
# entity_id: input_boolean.voice_alerts
|
entity_id: input_boolean.voice_alerts
|
||||||
# state: "on"
|
state: "on"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ 'voice' in notify_options }}"
|
value_template: "{{ 'voice' in notify_options }}"
|
||||||
- service: script.voice_notify
|
- service: script.voice_notify
|
||||||
|
@ -169,12 +184,112 @@ script:
|
||||||
|
|
||||||
notify_on_led_screen:
|
notify_on_led_screen:
|
||||||
sequence:
|
sequence:
|
||||||
# - condition: state
|
- condition: state
|
||||||
# entity_id: input_boolean.led_alerts
|
entity_id: input_boolean.led_notifications
|
||||||
# state: "on"
|
state: "on"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ 'led' in notify_options }}"
|
value_template: "{{ 'led' in notify_options }}"
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
data_template:
|
data_template:
|
||||||
topic: messageboard/messages
|
topic: messageboard/messages
|
||||||
payload: "{{ message }}"
|
payload: "{{ message }}"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Voice Notify
|
||||||
|
# Conditions:
|
||||||
|
# => Only Announce when people are home. Except in emergency mode!
|
||||||
|
# => Only Announce when Music is NOT being played
|
||||||
|
###############################################################################
|
||||||
|
voice_notify:
|
||||||
|
sequence:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.voice_notifications') == 'on' }}"
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.do_not_disturb') | lower == 'off' }}"
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ message | trim != '' }}"
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('input_boolean.home_mode_away') == 'off' }}"
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{% if only_at_night | default('no', true ) == "yes" %}
|
||||||
|
{% if states('sun.sun') == "above_horizon" %}
|
||||||
|
false
|
||||||
|
{% else %}
|
||||||
|
true
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
true
|
||||||
|
{% endif %}
|
||||||
|
- service: media_player.volume_set
|
||||||
|
entity_id: media_player.living_room, media_player.upstairs
|
||||||
|
data_template:
|
||||||
|
volume_level: >
|
||||||
|
{% if states('input_boolean.emergency_mode') == "on" %}
|
||||||
|
{{ states('input_number.tts_volume_level_alert') }}
|
||||||
|
{% else %}
|
||||||
|
{% if now().hour | int < 12 and now().hour | int > 6 %}
|
||||||
|
{{ states('input_number.tts_volume_level_morning') }}
|
||||||
|
{% elif now().hour|int > 12 and now().hour|int < 20 %}
|
||||||
|
{{ states('input_number.tts_volume_level_afternoon') }}
|
||||||
|
{% else %}
|
||||||
|
{{ states('input_number.tts_volume_level_evening') }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
- service: tts.amazon_polly_say
|
||||||
|
entity_id: media_player.living_room, media_player.upstairs
|
||||||
|
data_template:
|
||||||
|
cache: true
|
||||||
|
message: >
|
||||||
|
{% set msg = "" %}
|
||||||
|
{% macro getGreeting() %}
|
||||||
|
{% if greeting | default('yes', true ) == "yes" %}
|
||||||
|
{% if now().hour|int < 12 %}
|
||||||
|
Good morning.
|
||||||
|
{% elif now().hour|int < 18 %}
|
||||||
|
Good afternoon.
|
||||||
|
{% else %}
|
||||||
|
Good evening.
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
{%- macro getEndGreeting() -%}
|
||||||
|
{%- if greeting |default('yes', true ) == "yes" -%}
|
||||||
|
Thank you!
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endmacro -%}
|
||||||
|
{% set msg = msg + "<speak> " %}
|
||||||
|
{% set msg = msg + getGreeting() %}
|
||||||
|
{% set msg = msg + ". " + message %}
|
||||||
|
{% set msg = msg.replace(".", " <break time='0.5s'/> ") %}
|
||||||
|
{% set msg = msg + " " + getEndGreeting() %}
|
||||||
|
{% set msg = msg + " </speak>" %}
|
||||||
|
{{ msg }}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Greeting
|
||||||
|
###############################################################################
|
||||||
|
voice_greeting:
|
||||||
|
sequence:
|
||||||
|
- service: tts.amazon_polly_say
|
||||||
|
entity_id: media_player.living_room, media_player.upstairs
|
||||||
|
data_template:
|
||||||
|
cache: true
|
||||||
|
message: >
|
||||||
|
{% set msg = "" %}
|
||||||
|
{% macro getGreeting() %}
|
||||||
|
{% if greeting | default('yes', true ) == "yes" %}
|
||||||
|
{% if now().hour|int < 12 %}
|
||||||
|
Good morning.
|
||||||
|
{% elif now().hour|int < 18 %}
|
||||||
|
Good afternoon.
|
||||||
|
{% else %}
|
||||||
|
Good evening.
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
{% set msg = msg + "<speak> " %}
|
||||||
|
{% set msg = msg + " " + getGreeting() %}
|
||||||
|
{% set msg = msg.replace(".", " <break time='0.5s'/> ") %}
|
||||||
|
{% set msg = msg + " </speak>" %}
|
||||||
|
{{ msg }}
|
||||||
|
|
|
@ -282,7 +282,7 @@ automation:
|
||||||
condition: and
|
condition: and
|
||||||
conditions:
|
conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.trash_reminders') == 'on' }}"
|
value_template: "{{ states('input_boolean.trash_alerts') == 'on' }}"
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ states('input_boolean.home_mode_away') == 'off' }}"
|
value_template: "{{ states('input_boolean.home_mode_away') == 'off' }}"
|
||||||
- condition: or
|
- condition: or
|
||||||
|
@ -309,14 +309,14 @@ automation:
|
||||||
- tv
|
- tv
|
||||||
- led
|
- led
|
||||||
|
|
||||||
- alias: Reset Trash Reminders
|
- alias: Reset Trash Alerts
|
||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: "09:00:00"
|
at: "09:00:00"
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.trash_reminders
|
entity_id: input_boolean.trash_alerts
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: input_select.trash_pickup_day
|
entity_id: input_select.trash_pickup_day
|
||||||
|
|
|
@ -79,7 +79,7 @@ script:
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.all_indoor_lights_off
|
- service: script.all_indoor_lights_off
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.notify_camera_alerts
|
entity_id: input_boolean.camera_alerts
|
||||||
- service: alarm_control_panel.alarm_arm_away
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
data:
|
data:
|
||||||
entity_id: alarm_control_panel.home
|
entity_id: alarm_control_panel.home
|
||||||
|
@ -150,151 +150,20 @@ script:
|
||||||
rgb_color: [0, 255, 0]
|
rgb_color: [0, 255, 0]
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# A script that toggles Nest Thermostat between eco/away & non-eco/away modes
|
# Status of the house
|
||||||
###############################################################################
|
|
||||||
toggle_climate:
|
|
||||||
sequence:
|
|
||||||
- service: climate.set_away_mode
|
|
||||||
data_template:
|
|
||||||
entity_id: climate.dining_room
|
|
||||||
away_mode: "{{ false if state_attr('climate.dining_room', 'away_mode') == 'on' else true }}"
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# _ _ _ _ __
|
|
||||||
# | \ | | | | (_)/ _|
|
|
||||||
# | \| | ___ | |_ _| |_ _ _
|
|
||||||
# | . ` |/ _ \| __| | _| | | |
|
|
||||||
# | |\ | (_) | |_| | | | |_| |
|
|
||||||
# |_| \_|\___/ \__|_|_| \__, |
|
|
||||||
# __/ |
|
|
||||||
# |___/
|
|
||||||
# Notify Related Scripts
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
good_night_tts:
|
|
||||||
sequence:
|
|
||||||
- service: script.voice_notify
|
|
||||||
data_template:
|
|
||||||
message: !include ../templates/goodnight.yaml
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Voice Notify
|
|
||||||
# Conditions:
|
|
||||||
# => Only Announce when people are home. Except in emergency mode!
|
|
||||||
# => Only Announce when Music is NOT being played
|
|
||||||
###############################################################################
|
|
||||||
voice_notify:
|
|
||||||
sequence:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.voice_notifications') == 'on' }}"
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.do_not_disturb') | lower == 'off' }}"
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ message | trim != '' }}"
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states('input_boolean.home_mode_away') == 'off' }}"
|
|
||||||
- condition: template
|
|
||||||
value_template: >
|
|
||||||
{% if only_at_night | default('no', true ) == "yes" %}
|
|
||||||
{% if states('sun.sun') == "above_horizon" %}
|
|
||||||
false
|
|
||||||
{% else %}
|
|
||||||
true
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
true
|
|
||||||
{% endif %}
|
|
||||||
- service: media_player.volume_set
|
|
||||||
entity_id: media_player.living_room, media_player.upstairs
|
|
||||||
data_template:
|
|
||||||
volume_level: >
|
|
||||||
{% if states('input_boolean.emergency_mode') == "on" %}
|
|
||||||
{{ states('input_number.tts_volume_level_alert') }}
|
|
||||||
{% else %}
|
|
||||||
{% if now().hour | int < 12 and now().hour | int > 6 %}
|
|
||||||
{{ states('input_number.tts_volume_level_morning') }}
|
|
||||||
{% elif now().hour|int > 12 and now().hour|int < 20 %}
|
|
||||||
{{ states('input_number.tts_volume_level_afternoon') }}
|
|
||||||
{% else %}
|
|
||||||
{{ states('input_number.tts_volume_level_evening') }}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
- service: tts.amazon_polly_say
|
|
||||||
entity_id: media_player.living_room, media_player.upstairs
|
|
||||||
data_template:
|
|
||||||
cache: true
|
|
||||||
message: >
|
|
||||||
{% set msg = "" %}
|
|
||||||
{% macro getGreeting() %}
|
|
||||||
{% if greeting | default('yes', true ) == "yes" %}
|
|
||||||
{% if now().hour|int < 12 %}
|
|
||||||
Good morning.
|
|
||||||
{% elif now().hour|int < 18 %}
|
|
||||||
Good afternoon.
|
|
||||||
{% else %}
|
|
||||||
Good evening.
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endmacro %}
|
|
||||||
{%- macro getEndGreeting() -%}
|
|
||||||
{%- if greeting |default('yes', true ) == "yes" -%}
|
|
||||||
Thank you!
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endmacro -%}
|
|
||||||
{% set msg = msg + "<speak> " %}
|
|
||||||
{% set msg = msg + getGreeting() %}
|
|
||||||
{% set msg = msg + ". " + message %}
|
|
||||||
{% set msg = msg.replace(".", " <break time='0.5s'/> ") %}
|
|
||||||
{% set msg = msg + " " + getEndGreeting() %}
|
|
||||||
{% set msg = msg + " </speak>" %}
|
|
||||||
{{ msg }}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Greeting
|
|
||||||
###############################################################################
|
|
||||||
voice_greeting:
|
|
||||||
sequence:
|
|
||||||
- service: tts.amazon_polly_say
|
|
||||||
entity_id: media_player.living_room, media_player.upstairs
|
|
||||||
data_template:
|
|
||||||
cache: true
|
|
||||||
message: >
|
|
||||||
{% set msg = "" %}
|
|
||||||
{% macro getGreeting() %}
|
|
||||||
{% if greeting | default('yes', true ) == "yes" %}
|
|
||||||
{% if now().hour|int < 12 %}
|
|
||||||
Good morning.
|
|
||||||
{% elif now().hour|int < 18 %}
|
|
||||||
Good afternoon.
|
|
||||||
{% else %}
|
|
||||||
Good evening.
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endmacro %}
|
|
||||||
{% set msg = msg + "<speak> " %}
|
|
||||||
{% set msg = msg + " " + getGreeting() %}
|
|
||||||
{% set msg = msg.replace(".", " <break time='0.5s'/> ") %}
|
|
||||||
{% set msg = msg + " </speak>" %}
|
|
||||||
{{ msg }}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Status around the house
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
home_status:
|
home_status:
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.voice_notify
|
- service: script.notify_family
|
||||||
data_template:
|
data_template:
|
||||||
message: !include ../templates/home_status.yaml
|
message: !include ../templates/home_status.yaml
|
||||||
|
notify_options:
|
||||||
|
- voice
|
||||||
|
|
||||||
###############################################################################
|
good_night_tts:
|
||||||
# Display message on LED Matrix Screen
|
|
||||||
###############################################################################
|
|
||||||
led_message:
|
|
||||||
sequence:
|
sequence:
|
||||||
- condition: state
|
- service: script.notify_family
|
||||||
entity_id: input_boolean.led_alerts
|
|
||||||
state: "on"
|
|
||||||
- service: mqtt.publish
|
|
||||||
data_template:
|
data_template:
|
||||||
topic: messageboard/messages
|
message: !include ../templates/goodnight.yaml
|
||||||
payload: "{{ message }}"
|
notify_options:
|
||||||
|
- voice
|
||||||
|
|
|
@ -194,19 +194,11 @@ sensor:
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
input_boolean:
|
input_boolean:
|
||||||
voice_notifications:
|
|
||||||
name: Home Assistant Announcements
|
|
||||||
icon: mdi:volume-off
|
|
||||||
|
|
||||||
do_not_disturb:
|
do_not_disturb:
|
||||||
name: Do Not Disturb
|
name: Do Not Disturb
|
||||||
initial: off
|
initial: off
|
||||||
icon: mdi:do-not-disturb
|
icon: mdi:do-not-disturb
|
||||||
|
|
||||||
led_alerts:
|
|
||||||
name: LED Messages
|
|
||||||
icon: mdi:led-strip
|
|
||||||
|
|
||||||
movie_time:
|
movie_time:
|
||||||
name: "Movie Time"
|
name: "Movie Time"
|
||||||
icon: mdi:movie-roll
|
icon: mdi:movie-roll
|
||||||
|
@ -239,30 +231,34 @@ input_boolean:
|
||||||
name: Nightly Report
|
name: Nightly Report
|
||||||
icon: mdi:file-chart
|
icon: mdi:file-chart
|
||||||
|
|
||||||
notify_camera_alerts:
|
|
||||||
name: Notify Camera Alerts
|
|
||||||
icon: mdi:camera
|
|
||||||
|
|
||||||
trash_reminders:
|
|
||||||
name: Remind Trash Notifications
|
|
||||||
icon: mdi:recycle
|
|
||||||
|
|
||||||
enjoyable_weather_reminders:
|
enjoyable_weather_reminders:
|
||||||
name: Remind me to enjoy Good Weather
|
name: Remind me to enjoy Good Weather
|
||||||
icon: mdi:weather-sunny
|
icon: mdi:weather-sunny
|
||||||
|
|
||||||
security_system_alerts:
|
security_system_alerts:
|
||||||
name: Notify Security System Status Change
|
name: Security System Alerts
|
||||||
icon: mdi:verified
|
icon: mdi:security
|
||||||
|
|
||||||
|
trash_alerts:
|
||||||
|
name: Trash Alerts
|
||||||
|
icon: mdi:recycle
|
||||||
|
|
||||||
|
garage_door_notifications:
|
||||||
|
name: Garage Door Alerts
|
||||||
|
icon: mdi:garage
|
||||||
|
|
||||||
zone_alerts:
|
zone_alerts:
|
||||||
name: Zone Alerts
|
name: Zone Alerts
|
||||||
icon: mdi:map-marker
|
icon: mdi:map-marker
|
||||||
|
|
||||||
battery_notifications:
|
battery_alerts:
|
||||||
name: Battery Notifications
|
name: Battery Alerts
|
||||||
icon: mdi:battery
|
icon: mdi:battery
|
||||||
|
|
||||||
|
camera_alerts:
|
||||||
|
name: Camera Alerts
|
||||||
|
icon: mdi:camera
|
||||||
|
|
||||||
dummy:
|
dummy:
|
||||||
name: "Dummy Input Boolean!"
|
name: "Dummy Input Boolean!"
|
||||||
icon: mdi:sticker-emoji
|
icon: mdi:sticker-emoji
|
||||||
|
@ -272,13 +268,26 @@ input_boolean:
|
||||||
name: Light Automations
|
name: Light Automations
|
||||||
icon: mdi:lightbulb-on
|
icon: mdi:lightbulb-on
|
||||||
|
|
||||||
text_alerts:
|
# Notifications
|
||||||
name: Text Alerts
|
telegram_notifications:
|
||||||
icon: mdi:map-marker
|
name: Telegram Notifications
|
||||||
|
icon: mdi:message
|
||||||
|
|
||||||
garage_door_notifications:
|
firetv_notifications:
|
||||||
name: Garage Door Notifications
|
name: FireTV Notifications
|
||||||
icon: mdi:garage
|
icon: mdi:television
|
||||||
|
|
||||||
|
email_notifications:
|
||||||
|
name: Email Notifications
|
||||||
|
icon: mdi:email
|
||||||
|
|
||||||
|
voice_notifications:
|
||||||
|
name: Voice Notifications
|
||||||
|
icon: mdi:volume-off
|
||||||
|
|
||||||
|
led_notifications:
|
||||||
|
name: LED Notifications
|
||||||
|
icon: mdi:led-strip
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# _ _ _
|
# _ _ _
|
||||||
|
|
Loading…
Reference in New Issue