micor changes and clean up.

This commit is contained in:
Mahasri Kalavala 2019-12-20 10:32:28 -05:00
parent a3c869e9e8
commit 87961b393c
45 changed files with 1628 additions and 1728 deletions

View File

@ -27,33 +27,33 @@ homeassistant:
sun:
alexa:
config:
cloud:
alexa:
filter:
include_entities:
- light.family_room
- light.master_bedroom
- light.gateway_light_34ce008ad65d
- switch.basement_left
- switch.basement_right
- switch.frontyard_light
- switch.garage_lights
- switch.guest_bedroom
- switch.prayer_room
- switch.kids_bed_accent
- switch.kids_bedroom
- switch.kitchen
- switch.office_room
- switch.wemobackyardlightswitch
- switch.wemoswitch1
include_domains:
- light
- switch
# cloud:
# alexa:
# filter:
# include_entities:
# - light.family_room
# - light.master_bedroom
# - light.gateway_light_34ce008ad65d
# - switch.basement_left
# - switch.basement_right
# - switch.frontyard_light
# - switch.garage_lights
# - switch.guest_bedroom
# - switch.prayer_room
# - switch.kids_bed_accent
# - switch.kids_bedroom
# - switch.kitchen
# - switch.office_room
# - switch.wemobackyardlightswitch
# - switch.wemoswitch1
# include_domains:
# - light
# - switch
entity_config:
light.gateway_light_34ce008ad65d:
name: Gateway Light
description: Xiaomi Gateway Light
# entity_config:
# light.gateway_light_34ce008ad65d:
# name: Gateway Light
# description: Xiaomi Gateway Light
discovery:
@ -71,14 +71,15 @@ homekit:
- binary_sensor.single_car_garage_door_tilt_sensor_sensor
- binary_sensor.two_car_garage_door_tilt_sensor_sensor
map:
updater:
logbook:
history:
mobile_app:
# map:
# updater:
# logbook:
# history:
websocket_api:
python_script:
recorder:
db_url: !secret my_sql_url
# recorder:
# db_url: !secret my_sql_url
logger: !include logging.yaml
zeroconf:
@ -104,32 +105,6 @@ binary_sensor:
- platform: workday
country: US
person:
- name: Suresh
id: suresh
device_trackers:
- device_tracker.suresh
- device_tracker.suresh_kalavala
- device_tracker.tesla_model_3_5yj3e1ea8jf010610_location_tracker
- name: Mallika
id: mallika
device_trackers:
- device_tracker.mallika
- device_tracker.life360_mallika
- name: Srinika
id: srinika
device_trackers:
- device_tracker.srinika
- device_tracker.life360_srinika
- name: Hasika
id: hasika
device_trackers:
- device_tracker.hasika
- device_tracker.life360_hasika
lovelace:
mode: yaml

View File

@ -105,17 +105,17 @@ cards:
- script.emergency_script
- script.emergency_script_loop
- type: horizontal-stack
cards:
- type: glance
entities:
- input_label.mallika_birthday_days2go
- type: glance
entities:
- input_label.srinika_birthday_days2go
- type: glance
entities:
- input_label.hasika_birthday_days2go
# - type: horizontal-stack
# cards:
# - type: glance
# entities:
# - input_label.mallika_birthday_days2go
# - type: glance
# entities:
# - input_label.srinika_birthday_days2go
# - type: glance
# entities:
# - input_label.hasika_birthday_days2go
- type: entity-filter
title: Doors
@ -184,15 +184,6 @@ cards:
- type: weather-forecast
entity: weather.dark_sky
- type: picture-entity
id: camera_ohio_doppler_weather
title: Ohio Doppler Weather
entity: camera.ohio_doppler_weather
camera_image: camera.ohio_doppler_weather
show_info: true
tap_action:
action: more-info
- type: conditional
conditions:
- entity: sensor.usps_mail

View File

@ -7,7 +7,6 @@
###############################################################################
homeassistant:
customize:
automation.alarm_clock:
icon: mdi:alarm-check
@ -74,28 +73,28 @@ automation:
entity_id: input_label.alarm_current_time
data_template:
value: >
{%- if states.input_number.slider_hours.state | int < 10 -%}
{%- if states.input_number.slider_hours.state|int == 0 %}
{%- if states('input_number.slider_hours') | int < 10 -%}
{%- if states('input_number.slider_hours') |int == 0 %}
12
{%- else -%}
{{- 0 ~ states.input_number.slider_hours.state|int -}}
{{- 0 ~ states('input_number.slider_hours') |int -}}
{%- endif -%}
{%- else -%}
{{- states.input_number.slider_hours.state |int -}}
{{- states('input_number.slider_hours') |int -}}
{% endif -%}:
{%- if states.input_number.slider_minutes.state | int < 10 -%}
{{- 0 ~ states.input_number.slider_minutes.state |int -}}
{%- if states('input_number.slider_minutes') | int < 10 -%}
{{- 0 ~ states('input_number.slider_minutes') |int -}}
{%- else -%}
{{- states.input_number.slider_minutes.state|int -}}
{%- endif -%}{%- if states.input_boolean.am.state == "on" %} AM{%- else %} PM{%- endif -%}
{{- states('input_number.slider_minutes') |int -}}
{%- endif -%}{%- if states('input_boolean.am') == "on" %} AM{%- else %} PM{%- endif -%}
- alias: AM Change OFF
initial_state: true
trigger:
platform: state
entity_id: input_boolean.am
from: 'on'
to: 'off'
from: "on"
to: "off"
action:
- service: input_boolean.turn_on
entity_id: input_boolean.pm
@ -107,8 +106,8 @@ automation:
trigger:
platform: state
entity_id: input_boolean.am
from: 'off'
to: 'on'
from: "off"
to: "on"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.pm
@ -120,8 +119,8 @@ automation:
trigger:
platform: state
entity_id: input_boolean.pm
from: 'on'
to: 'off'
from: "on"
to: "off"
action:
- service: input_boolean.turn_on
entity_id: input_boolean.am
@ -133,8 +132,8 @@ automation:
trigger:
platform: state
entity_id: input_boolean.pm
from: 'off'
to: 'on'
from: "off"
to: "on"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.am
@ -145,7 +144,7 @@ automation:
initial_state: true
trigger:
platform: time_pattern
minutes: '/1'
minutes: "/1"
seconds: 00
condition:
- condition: template

View File

@ -32,7 +32,6 @@
###############################################################################
automation:
- alias: UPS State Change
initial_state: true
trigger:
@ -52,14 +51,14 @@
trigger:
- platform: state
entity_id: sensor.ups_status
from: 'ONLINE'
to: 'ONBATT'
from: "ONLINE"
to: "ONBATT"
action:
- service: script.notify_me
data_template:
message:
Power failure at {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %B-%d,%Y', true) }}.
Battery can last for {{ states.sensor.ups_time_left.state }} minutes.
Battery can last for {{ states('sensor.ups_time_left') }} minutes.
# # Power Restored Notification
# ###############################################################################
@ -68,11 +67,11 @@
trigger:
- platform: state
entity_id: sensor.ups_status
from: 'ONBATT'
to: 'ONLINE'
from: "ONBATT"
to: "ONLINE"
action:
- service: script.notify_me
data_template:
message:
Power restored at {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p %B-%d,%Y', true) }}.
Ran on battery for {{ "%0.2f" % (states.sensor.ups_time_on_battery.state | int / 60 |float) }} minutes.
Ran on battery for {{ "%0.2f" % (states('sensor.ups_time_on_battery') | int / 60 |float) }} minutes.

View File

@ -9,11 +9,11 @@ homeassistant:
timer:
timer_bathroom_aroma:
duration: '00:30:00'
duration: "00:30:00"
timer_downstairs_aroma:
duration: '01:00:00'
duration: "01:00:00"
timer_upstairs_aroma:
duration: '01:00:00'
duration: "01:00:00"
###############################################################################
# _ _ _
@ -26,7 +26,6 @@ timer:
###############################################################################
automation:
#
# Automations to start timer when they are switched ON
#
@ -35,8 +34,8 @@ automation:
trigger:
- platform: state
entity_id: switch.downstairs_fragrance
from: 'off'
to: 'on'
from: "off"
to: "on"
action:
- service: timer.start
entity_id: timer.timer_bathroom_aroma
@ -46,8 +45,8 @@ automation:
trigger:
- platform: state
entity_id: switch.downstairs_fragrance
from: 'on'
to: 'off'
from: "on"
to: "off"
action:
- service: timer.finish
entity_id: timer.timer_bathroom_aroma
@ -57,8 +56,8 @@ automation:
trigger:
- platform: state
entity_id: switch.downstairs_fragrance
from: 'off'
to: 'on'
from: "off"
to: "on"
action:
- service: timer.start
entity_id: timer.timer_downstairs_aroma
@ -68,8 +67,8 @@ automation:
trigger:
- platform: state
entity_id: switch.downstairs_fragrance
from: 'on'
to: 'off'
from: "on"
to: "off"
action:
- service: timer.finish
entity_id: timer.timer_downstairs_aroma
@ -79,8 +78,8 @@ automation:
trigger:
- platform: state
entity_id: switch.upstairs_fragrance
from: 'off'
to: 'on'
from: "off"
to: "on"
action:
- service: timer.start
entity_id: timer.timer_upstairs_aroma
@ -90,8 +89,8 @@ automation:
trigger:
- platform: state
entity_id: switch.upstairs_fragrance
from: 'on'
to: 'off'
from: "on"
to: "off"
action:
- service: timer.finish
entity_id: timer.timer_upstairs_aroma
@ -138,9 +137,9 @@ automation:
- alias: Turn On Upstairs Aroma
trigger:
- platform: time
at: '08:00:00'
at: "08:00:00"
- platform: time
at: '20:00:00'
at: "20:00:00"
action:
- service: switch.turn_on
entity_id: switch.upstairs_fragrance
@ -148,7 +147,7 @@ automation:
- alias: Turn On Downstairs Aroma
trigger:
- platform: time
at: '17:00:00'
at: "17:00:00"
action:
- service: switch.turn_on
entity_id: switch.downstairs_fragrance

View File

@ -7,7 +7,6 @@ homeassistant:
friendly_name: All Indoor Lights & Switches OFF
script:
home_mode_away:
sequence:
- service: script.all_indoor_lights_off
@ -16,7 +15,7 @@ script:
- service: climate.set_away_mode
data:
entity_id: climate.dining_room
away_mode: 'true'
away_mode: "true"
- service: alarm_control_panel.alarm_arm_away
data:
entity_id: alarm_control_panel.simplisafe
@ -35,7 +34,7 @@ script:
- service: notify.notify_smtp
data_template:
title: 'Indoor Pictures {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: 'No one seem to be home at the moment... Please see the images and make sure everything is okay.'
message: "No one seem to be home at the moment... Please see the images and make sure everything is okay."
data:
images:
- "/home/homeassistant/.homeassistant/www/downloads/camera/kitchen/kitchen_away.jpg"

View File

@ -187,7 +187,7 @@ sensor:
{% 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.state | lower == "charging" %}
{% if states('sensor.suresh_iphone_battery_state') | lower == "charging" %}
{% if battery_level == -1 %}
mdi:battery-unknown
{% else %}
@ -225,7 +225,7 @@ sensor:
{% 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.state | lower == "charging" %}
{% if states('sensor.mallika_iphone_battery_state') | lower == "charging" %}
{% if battery_level == -1 %}
mdi:battery-unknown
{% else %}
@ -263,7 +263,7 @@ sensor:
{% 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.state | lower == "charging" %}
{% if states('sensor.srinika_iphone_battery_state') | lower == "charging" %}
{% if battery_level == -1 %}
mdi:battery-unknown
{% else %}
@ -301,7 +301,7 @@ sensor:
{% 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.state | lower == "charging" %}
{% if states('sensor.hasika_iphone_battery_state') | lower == "charging" %}
{% if battery_level == -1 %}
mdi:battery-unknown
{% else %}
@ -364,9 +364,9 @@ automation:
true
{%- endif -%}
- condition: template
value_template: "{{ states.input_boolean.home_mode_away.state == 'off' }}"
value_template: "{{ states('input_boolean.home_mode_away') == 'off' }}"
- condition: template
value_template: "{{ states.alarm_control_panel.simplisafe.state | lower != 'armed_away' }}"
value_template: "{{ states('alarm_control_panel.simplisafe') | lower != 'armed_away' }}"
action:
- service: script.voice_notify
data_template:
@ -395,7 +395,7 @@ automation:
below: 25
condition:
- condition: template
value_template: '{{ states.input_boolean.battery_notifications.state == "on" }}'
value_template: "{{ states('input_boolean.battery_notifications') == 'on' }}"
action:
- service: script.notify_me
data_template:

View File

@ -1,6 +1,5 @@
homeassistant:
sensor:
- platform: mqtt
name: "Master Bed Sensor"

View File

@ -61,7 +61,6 @@ input_label:
###############################################################################
automation:
###############################################################################
# Build the excitement
###############################################################################
@ -76,7 +75,7 @@ automation:
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: template
value_template: "{{ trigger.to_state.state | int > 0 and trigger.to_state.state | int < 30 }}"
action:
@ -98,7 +97,7 @@ automation:
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: template
value_template: "{{ trigger.to_state.state | int == 0 }}"
action:
@ -113,7 +112,7 @@ automation:
initial_state: true
trigger:
platform: time_pattern
hours: '/1'
hours: "/1"
minutes: 3
seconds: 00
condition:
@ -121,18 +120,18 @@ automation:
conditions:
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: time
after: '07:00:00'
before: '21:00:00'
after: "07:00:00"
before: "21:00:00"
- condition: or
conditions:
- condition: template
value_template: "{{ states.input_label.srinika_birthday_days2go.state | int == 0 }}"
value_template: "{{ states('input_label.srinika_birthday_days2go') | int == 0 }}"
- condition: template
value_template: "{{ states.input_label.hasika_birthday_days2go.state | int == 0 }}"
value_template: "{{ states('input_label.hasika_birthday_days2go') | int == 0 }}"
- condition: template
value_template: "{{ states.input_label.mallika_birthday_days2go.state | int == 0 }}"
value_template: "{{ states('input_label.mallika_birthday_days2go') | int == 0 }}"
action:
- service: script.voice_notify
data_template:
@ -142,34 +141,34 @@ automation:
- service: script.voice_notify
data_template:
message: "Alexa, Sing Happy Birthday Song."
greeting: 'no'
greeting: "no"
- alias: Update Birthdays
initial_state: true
trigger:
- platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
- platform: homeassistant
event: start
condition:
- condition: template
value_template: "{{ states.input_label.srinika_birthday.state.split('-') | length > 0 }}"
value_template: "{{ states('input_label.srinika_birthday').split('-') | length > 0 }}"
- condition: template
value_template: "{{ states.input_label.hasika_birthday.state.split('-') | length > 0 }}"
value_template: "{{ states('input_label.hasika_birthday').split('-') | length > 0 }}"
- condition: template
value_template: "{{ states.input_label.mallika_birthday.state.split('-') | length > 0 }}"
value_template: "{{ states('input_label.mallika_birthday').split('-') | length > 0 }}"
action:
- service: input_label.set_value
data_template:
entity_id: input_label.srinika_birthday_days2go
value: >
{% set year = states.sensor.date.state.split('-')[0] %}
{% set month = states.sensor.date.state.split('-')[1] %}
{% set date = states.sensor.date.state.split('-')[2] %}
{% set year = states('sensor.date').split('-')[0] %}
{% set month = states('sensor.date').split('-')[1] %}
{% set date = states('sensor.date').split('-')[2] %}
{% if states('input_label.srinika_birthday') != "unknown" %}
{%- set bDayMonth = states.input_label.srinika_birthday.state.split('-')[0] -%}
{%- set bDayDate = states.input_label.srinika_birthday.state.split('-')[1] -%}
{%- set bDayMonth = states('input_label.srinika_birthday').split('-')[0] -%}
{%- set bDayDate = states('input_label.srinika_birthday').split('-')[1] -%}
{%- set numOfDays = ((as_timestamp(strptime(year ~ '-' ~ bDayMonth ~ '-' ~ bDayDate , '%Y-%m-%d')) | timestamp_custom('%j', true) | int ) - (as_timestamp(strptime(year ~ '-' ~ month~ '-' ~ date , '%Y-%m-%d')) | timestamp_custom('%j', true) | int)) -%}
{%- if numOfDays < 0 -%}
{{ numOfDays + 365 }}
@ -183,12 +182,12 @@ automation:
data_template:
entity_id: input_label.hasika_birthday_days2go
value: >
{% set year = states.sensor.date.state.split('-')[0] %}
{% set month = states.sensor.date.state.split('-')[1] %}
{% set date = states.sensor.date.state.split('-')[2] %}
{% set year = states('sensor.date').split('-')[0] %}
{% set month = states('sensor.date').split('-')[1] %}
{% set date = states('sensor.date').split('-')[2] %}
{% if states('input_label.hasika_birthday') != "unknown" %}
{%- set bDayMonth = states.input_label.hasika_birthday.state.split('-')[0] -%}
{%- set bDayDate = states.input_label.hasika_birthday.state.split('-')[1] -%}
{%- set bDayMonth = states('input_label.hasika_birthday').split('-')[0] -%}
{%- set bDayDate = states('input_label.hasika_birthday').split('-')[1] -%}
{%- set numOfDays = ((as_timestamp(strptime(year ~ '-' ~ bDayMonth ~ '-' ~ bDayDate , '%Y-%m-%d')) | timestamp_custom('%j', true) | int ) - (as_timestamp(strptime(year ~ '-' ~ month~ '-' ~ date , '%Y-%m-%d')) | timestamp_custom('%j', true) | int)) -%}
{%- if numOfDays < 0 -%}
{{ numOfDays + 365 }}
@ -202,12 +201,12 @@ automation:
data_template:
entity_id: input_label.mallika_birthday_days2go
value: >
{% set year = states.sensor.date.state.split('-')[0] %}
{% set month = states.sensor.date.state.split('-')[1] %}
{% set date = states.sensor.date.state.split('-')[2] %}
{% set year = states('sensor.date').split('-')[0] %}
{% set month = states('sensor.date').split('-')[1] %}
{% set date = states('sensor.date').split('-')[2] %}
{% if states('input_label.mallika_birthday') != "unknown" %}
{%- set bDayMonth = states.input_label.mallika_birthday.state.split('-')[0] -%}
{%- set bDayDate = states.input_label.mallika_birthday.state.split('-')[1] -%}
{%- set bDayMonth = states('input_label.mallika_birthday').split('-')[0] -%}
{%- set bDayDate = states('input_label.mallika_birthday').split('-')[1] -%}
{%- set numOfDays = ((as_timestamp(strptime(year ~ '-' ~ bDayMonth ~ '-' ~ bDayDate , '%Y-%m-%d')) | timestamp_custom('%j', true) | int ) - (as_timestamp(strptime(year ~ '-' ~ month~ '-' ~ date , '%Y-%m-%d')) | timestamp_custom('%j', true) | int)) -%}
{%- if numOfDays < 0 -%}
{{ numOfDays + 365 }}

View File

@ -363,8 +363,8 @@ automation:
- "/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_latest.jpg"
- condition: template
value_template: >
{% if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" or
states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" %}
{% if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" or
states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" %}
True
{% else %}
False
@ -442,8 +442,8 @@ automation:
- "/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_latest.jpg"
- condition: template
value_template: >
{% if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" or
states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" %}
{% if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" or
states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" %}
True
{% else %}
False
@ -475,8 +475,8 @@ automation:
entity_id: image_processing.tensorflow_garage_camera
- condition: template
value_template: >
{% if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" or
states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" %}
{% if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" or
states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" %}
True
{% else %}
False
@ -643,7 +643,7 @@ automation:
- condition: template
value_template: "{{ states('alarm_control_panel.simplisafe') == 'armed_home' or states('alarm_control_panel.simplisafe') == 'armed_away' }}"
action:
- delay: "{{ '00:00:08' if states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == 'on' else '0:0:0' }}"
- delay: "{{ '00:00:08' if states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == 'on' else '0:0:0' }}"
- service: camera.snapshot
data_template:
entity_id: "camera.frontdoor_camera"
@ -681,7 +681,7 @@ automation:
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states.device_tracker.life360_suresh.state == 'home' }}"
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Front Door camera!"
@ -751,7 +751,7 @@ automation:
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states.device_tracker.life360_suresh.state == 'home' }}"
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Driveway camera!"
@ -822,7 +822,7 @@ automation:
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states.device_tracker.life360_suresh.state == 'home' }}"
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Patio camera!"

View File

@ -1,358 +1,335 @@
#
# I COMMENTED OUT ALL THE TAGBOX RELATED STUFF AS I USE TENSORFLOW COMPONENT FOR IT.
#
homeassistant:
customize:
image_processing.facebox_frontdoor_camera:
friendly_name: People @ Front Door
image_processing.facebox_driveway_camera:
friendly_name: People @ Driveway
image_processing.facebox_patio_camera:
friendly_name: People @ Patio
image_processing.facebox_playarea_camera:
friendly_name: People @ Playarea
image_processing.facebox_garage_camera:
friendly_name: People @ Garage
# #
# # I COMMENTED OUT ALL THE TAGBOX RELATED STUFF AS I USE TENSORFLOW COMPONENT FOR IT.
# #
# homeassistant:
# customize:
# image_processing.facebox_frontdoor_camera:
# friendly_name: People @ Front Door
# image_processing.facebox_driveway_camera:
# friendly_name: People @ Driveway
# image_processing.facebox_patio_camera:
# friendly_name: People @ Patio
# image_processing.facebox_playarea_camera:
# friendly_name: People @ Playarea
# image_processing.facebox_garage_camera:
# friendly_name: People @ Garage
image_processing.tagbox_frontdoor_camera:
friendly_name: Frontdoor Tag
image_processing.tagbox_driveway_camera:
friendly_name: Driveway Tag
image_processing.tagbox_playarea_camera:
friendly_name: Playarea Tag
image_processing.tagbox_patio_camera:
friendly_name: Patio Tag
image_processing.tagbox_garage_camera:
friendly_name: Garage Tag
# image_processing.tagbox_frontdoor_camera:
# friendly_name: Frontdoor Tag
# image_processing.tagbox_driveway_camera:
# friendly_name: Driveway Tag
# image_processing.tagbox_playarea_camera:
# friendly_name: Playarea Tag
# image_processing.tagbox_patio_camera:
# friendly_name: Patio Tag
# image_processing.tagbox_garage_camera:
# friendly_name: Garage Tag
sensor.frontdoor_camera_objects:
friendly_name: Things At Front Door
sensor.driveway_camera_objects:
friendly_name: Things At Driveway
sensor.playarea_camera_objects:
friendly_name: Things At Playarea
sensor.patio_camera_objects:
friendly_name: Things At Patio
sensor.garage_camera_objects:
friendly_name: Things in Garage
sensor.frontdoor_camera_people:
friendly_name: People At Front Door
sensor.driveway_camera_people:
friendly_name: People Driveway
sensor.playarea_camera_people:
friendly_name: People Playarea
sensor.patio_camera_people:
friendly_name: People Patio
sensor.garage_camera_people:
friendly_name: Garage Patio
# sensor.frontdoor_camera_objects:
# friendly_name: Things At Front Door
# sensor.driveway_camera_objects:
# friendly_name: Things At Driveway
# sensor.playarea_camera_objects:
# friendly_name: Things At Playarea
# sensor.patio_camera_objects:
# friendly_name: Things At Patio
# sensor.garage_camera_objects:
# friendly_name: Things in Garage
# sensor.frontdoor_camera_people:
# friendly_name: People At Front Door
# sensor.driveway_camera_people:
# friendly_name: People Driveway
# sensor.playarea_camera_people:
# friendly_name: People Playarea
# sensor.patio_camera_people:
# friendly_name: People Patio
# sensor.garage_camera_people:
# friendly_name: Garage Patio
image_processing:
- platform: facebox
ip_address: !secret ha_ip_address
scan_interval: 360
port: 8080
source:
- entity_id: camera.frontdoor_camera
- entity_id: camera.driveway_camera
- entity_id: camera.patio_camera
- entity_id: camera.playarea_camera
- entity_id: camera.garage_camera
# - platform: tagbox
# scan_interval: 10000 # Default 10
# image_processing:
# - platform: facebox
# ip_address: !secret ha_ip_address
# port: 8081
# scan_interval: 360
# port: 8080
# source:
# - entity_id: camera.frontdoor_camera
# - entity_id: camera.driveway_camera
# - entity_id: camera.patio_camera
# - entity_id: camera.playarea_camera
# - entity_id: camera.garage_camera
# # - platform: tagbox
# # scan_interval: 10000 # Default 10
# # ip_address: !secret ha_ip_address
# # port: 8081
# # source:
# # - entity_id: camera.frontdoor_camera
# # - entity_id: camera.driveway_camera
# # - entity_id: camera.patio_camera
# # - entity_id: camera.playarea_camera
# # - entity_id: camera.garage_camera
sensor:
##
#Facebox related sensors
##
- platform: template
sensors:
frontdoor_camera_people:
value_template: >-
{% set faces = state_attr('image_processing.facebox_frontdoor_camera', 'matched_faces') %}
{% if None != faces %}
{% if faces | list | count == 0 %}
Clear
{% else %}
{%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
{% endif %}
{% endif %}
icon_template: mdi:cctv
- platform: template
sensors:
driveway_camera_people:
value_template: >-
{% set faces = state_attr('image_processing.facebox_driveway_camera', 'matched_faces') %}
{% if None != faces %}
{% if faces | list | count == 0 %}
Clear
{% else %}
{%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
{% endif %}
{% endif %}
icon_template: mdi:cctv
- platform: template
sensors:
patio_camera_people:
value_template: >-
{% set faces = state_attr('image_processing.facebox_patio_camera', 'matched_faces') %}
{% if None != faces %}
{% if faces | list | count == 0 %}
Clear
{% else %}
{%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
{% endif %}
{% endif %}
icon_template: mdi:cctv
- platform: template
sensors:
playarea_camera_people:
value_template: >-
{% set faces = state_attr('image_processing.facebox_playarea_camera', 'matched_faces') %}
{% if None != faces %}
{% if faces | list | count == 0 %}
Clear
{% else %}
{%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
{% endif %}
{% endif %}
icon_template: mdi:cctv
- platform: template
sensors:
garage_camera_people:
value_template: >-
{% set faces = state_attr('image_processing.facebox_garage_camera', 'matched_faces') %}
{% if None != faces %}
{% if faces | list | count == 0 %}
Clear
{% else %}
{%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
{% endif %}
{% endif %}
icon_template: mdi:cctv
# ###########################################################################################################################
# # Tagbox related Sensors; Please don't go crazy looking at the code. Here is the simple explanation.
# # The tagbox gives a bunch of tags for each picture, and I eliminate a bunch of unwanted tags by filtering them out
# # The unwanted tags are something that I really don't care - like a Tree in the front yard.
# # Then I do custom mapping of the tags that fits my needs. That way I can display what I want rather than what I was given.
# # I have no control over what tagbox gives, I want to pick and choose tags irrespective of confidence level.
# ###########################################################################################################################
# sensor:
# ##
# #Facebox related sensors
# ##
# - platform: template
# sensors:
# frontdoor_camera_objects:
# frontdoor_camera_people:
# value_template: >-
# {% set attribs = state_attr('image_processing.tagbox_frontdoor_camera', 'tags') %}
# {%- if None != attribs -%}
# {%- set tag_map = {'Vehicle':'Car', 'Sedan':'Car', 'Luxury vehicle':'Car', 'Driving':'Car',
# 'Wheel':'Car', 'Automotive design':'Car', 'Automotive exterior':'Car',
# 'Transport':'Car', 'Sports car':'Car', 'Land vehicle':'Car', 'Supercar':'Car',
# 'Waterway':'Rain', 'Super car': 'Car'
# } -%}
# {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Car', 'Vehicle', 'Suburb', 'Street',
# 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Super car', 'Snow', 'Winter', 'Supercar',
# 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sport venue', 'Soil', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Drawing', 'Sketch', 'Stadium',
# 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Parking lot', 'Parking',
# 'Black', 'White', 'Darkness', 'Light', 'Text'] -%}
# {%- macro filter_unwanted(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# {%- macro mapped_items(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}
# {%- endfor -%}
# {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# {%- endmacro -%}
# {% macro get_final_output(output_list) %}
# {%- for x in output_list if x != "" -%}
# {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# {%- endfor -%}
# {% endmacro %}
# {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# {{- "Clear" if output |trim == "" else output -}}
# {% set faces = state_attr('image_processing.facebox_frontdoor_camera', 'matched_faces') %}
# {% if None != faces %}
# {% if faces | list | count == 0 %}
# Clear
# {% else %}
# {%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
# {% endif %}
# {% endif %}
# icon_template: mdi:cctv
# - platform: template
# sensors:
# driveway_camera_objects:
# driveway_camera_people:
# value_template: >-
# {%- set attribs = state_attr('image_processing.tagbox_driveway_camera', 'tags') -%}
# {%- if None != attribs -%}
# {%- set tag_map = {'Vehicle':'Car', 'Sedan':'Car', 'Luxury vehicle':'Car', 'Driving':'Car',
# 'Wheel':'Car', 'Automotive design':'Car', 'Automotive exterior':'Car',
# 'Transport':'Car', 'Sports car':'Car', 'Land vehicle':'Car','Supercar':'Car',
# 'Waterway':'Rain', 'Super car': 'Car'
# } -%}
# {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Car', 'Vehicle', 'Suburb', 'Street',
# 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Super car', 'Sport venue', 'Supercar',
# 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Snow', 'Winter', 'Soil', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Drawing', 'Sketch', 'Stadium',
# 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White',
# 'Black', 'White', 'Darkness', 'Light', 'Text'] -%}
# {%- macro filter_unwanted(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# {%- macro mapped_items(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}
# {%- endfor -%}
# {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# {%- endmacro -%}
# {% macro get_final_output(output_list) %}
# {%- for x in output_list if x != "" -%}
# {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# {%- endfor -%}
# {% endmacro %}
# {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# {{- "Clear" if output |trim == "" else output -}}
# {% set faces = state_attr('image_processing.facebox_driveway_camera', 'matched_faces') %}
# {% if None != faces %}
# {% if faces | list | count == 0 %}
# Clear
# {% else %}
# {%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
# {% endif %}
# {% endif %}
# icon_template: mdi:cctv
# - platform: template
# sensors:
# patio_camera_objects:
# patio_camera_people:
# value_template: >-
# {% set attribs = state_attr('image_processing.tagbox_patio_camera', 'tags') %}
# {%- if None != attribs -%}
# {%- set tag_map = {'Waterway':'Rain'} -%}
# {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Vehicle','Driving', 'Transport', 'Car', 'Vehicle', 'Suburb', 'Street',
# 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Car', 'Wheel', 'Sports car','Super car', 'Sport venue', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sedan', 'Automotive design', 'Snow', 'Winter', 'Soil', 'Stadium',
# 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Luxury vehicle', 'Automotive exterior', 'Drawing', 'Sketch',
# 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Black', 'White', 'Light', 'Text'] -%}
# {%- macro filter_unwanted(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# {%- macro mapped_items(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}
# {%- endfor -%}
# {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# {%- endmacro -%}
# {% macro get_final_output(output_list) %}
# {%- for x in output_list if x != "" -%}
# {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# {%- endfor -%}
# {% endmacro %}
# {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# {{- "Clear" if output |trim == "" else output -}}
# {% set faces = state_attr('image_processing.facebox_patio_camera', 'matched_faces') %}
# {% if None != faces %}
# {% if faces | list | count == 0 %}
# Clear
# {% else %}
# {%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
# {% endif %}
# {% endif %}
# icon_template: mdi:cctv
# - platform: template
# sensors:
# playarea_camera_objects:
# playarea_camera_people:
# value_template: >-
# {% set attribs = state_attr('image_processing.tagbox_playarea_camera', 'tags') %}
# {%- if None != attribs -%}
# {%- set tag_map = {'Waterway':'Rain'} -%}
# {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Vehicle','Driving', 'Transport', 'Car', 'Vehicle', 'Suburb', 'Street',
# 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Car', 'Wheel', 'Sports car', 'Super car', 'Winter', 'Soil', 'Stadium',
# 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sedan', 'Automotive design', 'Snow', 'Sport venue', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Luxury vehicle', 'Automotive exterior', 'Drawing', 'Sketch',
# 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Black', 'White', 'Light', 'Text'] -%}
# {%- macro filter_unwanted(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# {%- macro mapped_items(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}{%- endfor -%}
# {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# {%- endmacro -%}
# {% macro get_final_output(output_list) %}
# {%- for x in output_list if x != "" -%}
# {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# {%- endfor -%}
# {% endmacro %}
# {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# {{- "Clear" if output |trim == "" else output -}}
# {% set faces = state_attr('image_processing.facebox_playarea_camera', 'matched_faces') %}
# {% if None != faces %}
# {% if faces | list | count == 0 %}
# Clear
# {% else %}
# {%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
# {% endif %}
# {% endif %}
# icon_template: mdi:cctv
# - platform: template
# sensors:
# garage_camera_objects:
# garage_camera_people:
# value_template: >-
# {% set attribs = state_attr('image_processing.tagbox_garage_camera', 'tags') %}
# {%- if None != attribs -%}
# {%- set tag_map = {'Waterway':'Rain'} -%}
# {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Driving', 'Transport', 'Suburb', 'Street',
# 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Winter', 'Soil', 'Stadium',
# 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sedan', 'Automotive design', 'Snow', 'Sport venue', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Luxury vehicle', 'Automotive exterior', 'Drawing', 'Sketch',
# 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Black', 'White', 'Light', 'Text'] -%}
# {%- macro filter_unwanted(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# {%- macro mapped_items(tags) -%}
# {%- set comma = joiner(',') -%}
# {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}{%- endfor -%}
# {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# {%- endmacro -%}
# {% macro get_final_output(output_list) %}
# {%- for x in output_list if x != "" -%}
# {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# {%- endfor -%}
# {% endmacro %}
# {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# {{- "Clear" if output |trim == "" else output -}}
# {% set faces = state_attr('image_processing.facebox_garage_camera', 'matched_faces') %}
# {% if None != faces %}
# {% if faces | list | count == 0 %}
# Clear
# {% else %}
# {%- for face in faces | list %}{%- if loop.first %}{% elif loop.last %} and {% else %}, {% endif -%}{{ face }}{%- endfor %}
# {% endif %}
# {% endif %}
# icon_template: mdi:cctv
automation:
# # ###########################################################################################################################
# # # Tagbox related Sensors; Please don't go crazy looking at the code. Here is the simple explanation.
# # # The tagbox gives a bunch of tags for each picture, and I eliminate a bunch of unwanted tags by filtering them out
# # # The unwanted tags are something that I really don't care - like a Tree in the front yard.
# # # Then I do custom mapping of the tags that fits my needs. That way I can display what I want rather than what I was given.
# # # I have no control over what tagbox gives, I want to pick and choose tags irrespective of confidence level.
# # ###########################################################################################################################
- alias: Alert Family Member Activity
trigger:
- platform: state
entity_id:
- sensor.frontdoor_camera_people
- sensor.driveway_camera_people
- sensor.patio_camera_people
- sensor.playarea_camera_people
- sensor.garage_camera_people
condition:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
- condition: template
value_template: '{{ trigger.to_state.state | trim != "" and
trigger.to_state.state | lower | trim != "unknown" and
trigger.to_state.state | lower | trim != "clear" }}'
action:
- service: script.notify_me
data_template:
message: >-
{% set camera_name = states['camera'][trigger.entity_id.split('.')[1].split('_')[0] ~ '_camera'].attributes.friendly_name %}
{{ trigger.to_state.state }} is at the {{ camera_name }}.
# # - platform: template
# # sensors:
# # frontdoor_camera_objects:
# # value_template: >-
# # {% set attribs = state_attr('image_processing.tagbox_frontdoor_camera', 'tags') %}
# # {%- if None != attribs -%}
# # {%- set tag_map = {'Vehicle':'Car', 'Sedan':'Car', 'Luxury vehicle':'Car', 'Driving':'Car',
# # 'Wheel':'Car', 'Automotive design':'Car', 'Automotive exterior':'Car',
# # 'Transport':'Car', 'Sports car':'Car', 'Land vehicle':'Car', 'Supercar':'Car',
# # 'Waterway':'Rain', 'Super car': 'Car'
# # } -%}
# # {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Car', 'Vehicle', 'Suburb', 'Street',
# # 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Super car', 'Snow', 'Winter', 'Supercar',
# # 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sport venue', 'Soil', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# # 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Drawing', 'Sketch', 'Stadium',
# # 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Parking lot', 'Parking',
# # 'Black', 'White', 'Darkness', 'Light', 'Text'] -%}
# # {%- macro filter_unwanted(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# # {%- macro mapped_items(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}
# # {%- endfor -%}
# # {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# # {%- endmacro -%}
# # {% macro get_final_output(output_list) %}
# # {%- for x in output_list if x != "" -%}
# # {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# # {%- endfor -%}
# # {% endmacro %}
# # {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# # {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# # {{- "Clear" if output |trim == "" else output -}}
# # {% endif %}
# # icon_template: mdi:cctv
# - alias: Alert Object Activity
# # - platform: template
# # sensors:
# # driveway_camera_objects:
# # value_template: >-
# # {%- set attribs = state_attr('image_processing.tagbox_driveway_camera', 'tags') -%}
# # {%- if None != attribs -%}
# # {%- set tag_map = {'Vehicle':'Car', 'Sedan':'Car', 'Luxury vehicle':'Car', 'Driving':'Car',
# # 'Wheel':'Car', 'Automotive design':'Car', 'Automotive exterior':'Car',
# # 'Transport':'Car', 'Sports car':'Car', 'Land vehicle':'Car','Supercar':'Car',
# # 'Waterway':'Rain', 'Super car': 'Car'
# # } -%}
# # {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Car', 'Vehicle', 'Suburb', 'Street',
# # 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Super car', 'Sport venue', 'Supercar',
# # 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Snow', 'Winter', 'Soil', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# # 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Drawing', 'Sketch', 'Stadium',
# # 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White',
# # 'Black', 'White', 'Darkness', 'Light', 'Text'] -%}
# # {%- macro filter_unwanted(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# # {%- macro mapped_items(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}
# # {%- endfor -%}
# # {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# # {%- endmacro -%}
# # {% macro get_final_output(output_list) %}
# # {%- for x in output_list if x != "" -%}
# # {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# # {%- endfor -%}
# # {% endmacro %}
# # {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# # {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# # {{- "Clear" if output |trim == "" else output -}}
# # {% endif %}
# # icon_template: mdi:cctv
# # - platform: template
# # sensors:
# # patio_camera_objects:
# # value_template: >-
# # {% set attribs = state_attr('image_processing.tagbox_patio_camera', 'tags') %}
# # {%- if None != attribs -%}
# # {%- set tag_map = {'Waterway':'Rain'} -%}
# # {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Vehicle','Driving', 'Transport', 'Car', 'Vehicle', 'Suburb', 'Street',
# # 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Car', 'Wheel', 'Sports car','Super car', 'Sport venue', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# # 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sedan', 'Automotive design', 'Snow', 'Winter', 'Soil', 'Stadium',
# # 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Luxury vehicle', 'Automotive exterior', 'Drawing', 'Sketch',
# # 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Black', 'White', 'Light', 'Text'] -%}
# # {%- macro filter_unwanted(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# # {%- macro mapped_items(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}
# # {%- endfor -%}
# # {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# # {%- endmacro -%}
# # {% macro get_final_output(output_list) %}
# # {%- for x in output_list if x != "" -%}
# # {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# # {%- endfor -%}
# # {% endmacro %}
# # {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# # {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# # {{- "Clear" if output |trim == "" else output -}}
# # {% endif %}
# # icon_template: mdi:cctv
# # - platform: template
# # sensors:
# # playarea_camera_objects:
# # value_template: >-
# # {% set attribs = state_attr('image_processing.tagbox_playarea_camera', 'tags') %}
# # {%- if None != attribs -%}
# # {%- set tag_map = {'Waterway':'Rain'} -%}
# # {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Vehicle','Driving', 'Transport', 'Car', 'Vehicle', 'Suburb', 'Street',
# # 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Car', 'Wheel', 'Sports car', 'Super car', 'Winter', 'Soil', 'Stadium',
# # 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sedan', 'Automotive design', 'Snow', 'Sport venue', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# # 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Luxury vehicle', 'Automotive exterior', 'Drawing', 'Sketch',
# # 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Black', 'White', 'Light', 'Text'] -%}
# # {%- macro filter_unwanted(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# # {%- macro mapped_items(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}{%- endfor -%}
# # {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# # {%- endmacro -%}
# # {% macro get_final_output(output_list) %}
# # {%- for x in output_list if x != "" -%}
# # {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# # {%- endfor -%}
# # {% endmacro %}
# # {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# # {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# # {{- "Clear" if output |trim == "" else output -}}
# # {% endif %}
# # icon_template: mdi:cctv
# # - platform: template
# # sensors:
# # garage_camera_objects:
# # value_template: >-
# # {% set attribs = state_attr('image_processing.tagbox_garage_camera', 'tags') %}
# # {%- if None != attribs -%}
# # {%- set tag_map = {'Waterway':'Rain'} -%}
# # {%- set unwanted_tags = ['Asphalt', 'Backyard', 'City', 'Estate', 'Flower', 'Garden', 'Grass', 'Tree', 'Driving', 'Transport', 'Suburb', 'Street',
# # 'Highway', 'Infrastructure', 'Lane', 'Lawn', 'Neighbourhood', 'Public space', 'Winter', 'Soil', 'Stadium',
# # 'Residential area', 'Road', 'Road surface', 'Sidewalk', 'Tarmac', 'Race track', 'Sedan', 'Automotive design', 'Snow', 'Sport venue', 'Outdoor structure', 'Cartoon', 'Poster', 'Illustration',
# # 'Transport', 'Walkway', 'Yard', 'Screenshot', 'Night', 'Lighting and Light', 'Luxury vehicle', 'Automotive exterior', 'Drawing', 'Sketch',
# # 'Black-and-white', 'Monochrome', 'Monochrome photography', 'Black and White', 'Black', 'White', 'Light', 'Text'] -%}
# # {%- macro filter_unwanted(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in unwanted_tags -%}{{- comma() -}}{{- item -}}{% endfor %}{%- endmacro -%}
# # {%- macro mapped_items(tags) -%}
# # {%- set comma = joiner(',') -%}
# # {%- for item in tags if item not in tag_map -%}{{- comma() -}}{{- item -}}{%- endfor -%}
# # {%- for item in tags if item in tag_map -%}{{- comma() -}}{{- tag_map[item] -}}{%- endfor -%}
# # {%- endmacro -%}
# # {% macro get_final_output(output_list) %}
# # {%- for x in output_list if x != "" -%}
# # {%- if loop.first %}{% elif loop.last %},{% else %},{% endif -%}{{- x -}}
# # {%- endfor -%}
# # {% endmacro %}
# # {%- set result = filter_unwanted(attribs| map(attribute='name')|list).split(',') -%}
# # {%- set output = get_final_output(mapped_items(result).split(',') | unique|list) -%}
# # {{- "Clear" if output |trim == "" else output -}}
# # {% endif %}
# # icon_template: mdi:cctv
# automation:
# - alias: Alert Family Member Activity
# trigger:
# - platform: state
# entity_id:
# - sensor.frontdoor_camera_objects
# - sensor.driveway_camera_objects
# - sensor.patio_camera_objects
# - sensor.playarea_camera_objects
# - sensor.garage_camera_objects
# - sensor.frontdoor_camera_people
# - sensor.driveway_camera_people
# - sensor.patio_camera_people
# - sensor.playarea_camera_people
# - sensor.garage_camera_people
# condition:
# - condition: template
# value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
@ -365,45 +342,68 @@ automation:
# data_template:
# message: >-
# {% set camera_name = states['camera'][trigger.entity_id.split('.')[1].split('_')[0] ~ '_camera'].attributes.friendly_name %}
# {{ trigger.to_state.state }} detected at the {{ camera_name }}.
# {{ trigger.to_state.state }} is at the {{ camera_name }}.
#
# This automation basically scans image and keeps a count of people from each camera view and notifies using iOS notification
# There is another automation that alerts in the house (using TTS) based on the data
#
- alias: Scan People and Objects
initial_state: true
trigger:
- platform: state
entity_id:
- binary_sensor.frontdoor_camera_motion
- binary_sensor.driveway_camera_motion
- binary_sensor.patio_camera_motion
- binary_sensor.playarea_camera_motion
- binary_sensor.frontdoor_camera_field_detection
- binary_sensor.driveway_camera_field_detection
- binary_sensor.patio_camera_field_detection
- binary_sensor.playarea_camera_field_detection
- binary_sensor.frontdoor_camera_line_crossing
- binary_sensor.driveway_camera_line_crossing
- binary_sensor.patio_camera_line_crossing
- binary_sensor.playarea_camera_line_crossing
- binary_sensor.garage_motion
to: 'on'
condition:
- condition: template
value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
- condition: template
value_template: >
{% macro last_triggered(entity) %}
{% set time_in_seconds = 30 %}
{{ ( (as_timestamp(now()) - as_timestamp(states["binary_sensor"][entity].attributes.last_tripped_time)))|round|abs < time_in_seconds }}
{% endmacro %}
{{ last_triggered(trigger.entity_id.split('.')[1].split('_')[0] ~ '_camera_motion')}}
action:
- service: image_processing.scan
data_template:
entity_id: "image_processing.facebox_{{- trigger.entity_id.split('.')[1].split('_')[0] -}}_camera"
# # - alias: Alert Object Activity
# # trigger:
# # - platform: state
# # entity_id:
# # - sensor.frontdoor_camera_objects
# # - sensor.driveway_camera_objects
# # - sensor.patio_camera_objects
# # - sensor.playarea_camera_objects
# # - sensor.garage_camera_objects
# # condition:
# # - condition: template
# # value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
# # - condition: template
# # value_template: '{{ trigger.to_state.state | trim != "" and
# # trigger.to_state.state | lower | trim != "unknown" and
# # trigger.to_state.state | lower | trim != "clear" }}'
# # action:
# # - service: script.notify_me
# # data_template:
# # message: >-
# # {% set camera_name = states['camera'][trigger.entity_id.split('.')[1].split('_')[0] ~ '_camera'].attributes.friendly_name %}
# # {{ trigger.to_state.state }} detected at the {{ camera_name }}.
# #
# # This automation basically scans image and keeps a count of people from each camera view and notifies using iOS notification
# # There is another automation that alerts in the house (using TTS) based on the data
# #
# - alias: Scan People and Objects
# initial_state: true
# trigger:
# - platform: state
# entity_id:
# - binary_sensor.frontdoor_camera_motion
# - binary_sensor.driveway_camera_motion
# - binary_sensor.patio_camera_motion
# - binary_sensor.playarea_camera_motion
# - binary_sensor.frontdoor_camera_field_detection
# - binary_sensor.driveway_camera_field_detection
# - binary_sensor.patio_camera_field_detection
# - binary_sensor.playarea_camera_field_detection
# - binary_sensor.frontdoor_camera_line_crossing
# - binary_sensor.driveway_camera_line_crossing
# - binary_sensor.patio_camera_line_crossing
# - binary_sensor.playarea_camera_line_crossing
# - binary_sensor.garage_motion
# to: 'on'
# condition:
# - condition: template
# value_template: "{{ states('input_boolean.notify_camera_alerts') == 'on' }}"
# - condition: template
# value_template: >
# {% macro last_triggered(entity) %}
# {% set time_in_seconds = 30 %}
# {{ ( (as_timestamp(now()) - as_timestamp(states["binary_sensor"][entity].attributes.last_tripped_time)))|round|abs < time_in_seconds }}
# {% endmacro %}
# {{ last_triggered(trigger.entity_id.split('.')[1].split('_')[0] ~ '_camera_motion')}}
# action:
# - service: image_processing.scan
# data_template:
# entity_id: "image_processing.tagbox_{{- trigger.entity_id.split('.')[1].split('_')[0] -}}_camera"
# entity_id: "image_processing.facebox_{{- trigger.entity_id.split('.')[1].split('_')[0] -}}_camera"
# # - service: image_processing.scan
# # data_template:
# # entity_id: "image_processing.tagbox_{{- trigger.entity_id.split('.')[1].split('_')[0] -}}_camera"

View File

@ -6,7 +6,6 @@
###############################################################################
automation:
# ÛÛÛÛÛÛ ÛÛÛÛÛÛ ÛÛÛ
# °°ÛÛÛÛÛÛ ÛÛÛÛÛÛ °°°
# °ÛÛÛ°ÛÛÛÛÛ°ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ
@ -25,19 +24,19 @@ automation:
initial_state: true
trigger:
platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
entity_id: "binary_sensor.workday_sensor"
state: "on"
- condition: template
value_template: '{{ states.sensor.wakeup_hour.state |int == now().hour |int }}'
value_template: "{{ states('sensor.wakeup_hour') |int == now().hour |int }}"
- condition: template
value_template: '{{ states.sensor.wakeup_minute.state|int == now().minute|int }}'
value_template: "{{ states('sensor.wakeup_minute') |int == now().minute|int }}"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: switch.turn_on
data:
@ -51,19 +50,19 @@ automation:
initial_state: true
trigger:
platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
entity_id: "binary_sensor.workday_sensor"
state: "on"
- condition: template
value_template: '{{ states.sensor.wakeup_hour.state |int == now().hour|int }}'
value_template: "{{ states('sensor.wakeup_hour') |int == now().hour|int }}"
- condition: template
value_template: '{{ now().minute | int == (states.sensor.wakeup_minute.state | int + 10) }}'
value_template: "{{ now().minute | int == (states('sensor.wakeup_minute') | int + 10) }}"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
data:
@ -76,19 +75,19 @@ automation:
initial_state: true
trigger:
platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
entity_id: "binary_sensor.workday_sensor"
state: "on"
- condition: template
value_template: '{{ states.sensor.wakeup_hour.state|int == now().hour|int }}'
value_template: "{{ states('sensor.wakeup_hour') |int == now().hour|int }}"
- condition: template
value_template: '{{ now().minute|int == (states.sensor.wakeup_minute.state|int + 15) }}'
value_template: "{{ now().minute|int == (states('sensor.wakeup_minute') |int + 15) }}"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_off
data:
@ -102,11 +101,11 @@ automation:
trigger:
platform: sun
event: sunrise
offset: '00:15:00'
offset: "00:15:00"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: switch.turn_off
entity_id: switch.frontyard_light
@ -120,19 +119,19 @@ automation:
initial_state: true
trigger:
platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
entity_id: "binary_sensor.workday_sensor"
state: "on"
- condition: template
value_template: '{{ now().hour|int == (states.sensor.wakeup_hour.state|int + 3) }}'
value_template: "{{ now().hour|int == (states('sensor.wakeup_hour') |int + 3) }}"
- condition: template
value_template: '{{ states.sensor.wakeup_minute.state|int == now().minute|int }}'
value_template: "{{ states('sensor.wakeup_minute') |int == now().minute|int }}"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: switch.turn_off
entity_id: switch.kitchen
@ -156,11 +155,11 @@ automation:
trigger:
platform: sun
event: sunset
offset: '+00:00:00'
offset: "+00:00:00"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: switch.turn_on
entity_id: switch.frontyard_light
@ -175,14 +174,14 @@ automation:
trigger:
platform: sun
event: sunset
offset: '-00:30:00'
offset: "-00:30:00"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
- condition: state
entity_id: input_boolean.movie_time
state: 'off'
state: "off"
action:
- service: switch.turn_on
data:
@ -238,19 +237,19 @@ automation:
initial_state: true
trigger:
platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: template
value_template: '{{ states.sensor.bedtime_hour.state|int == now().hour|int }}'
value_template: "{{ states('sensor.bedtime_hour') |int == now().hour|int }}"
- condition: template
value_template: '{{ (states.sensor.bedtime_minute.state|int - 15 ) == now().minute|int }}'
value_template: "{{ (states('sensor.bedtime_minute') |int - 15 ) == now().minute|int }}"
- condition: state
entity_id: light.family_room
state: 'on'
state: "on"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
data:
@ -266,16 +265,16 @@ automation:
initial_state: true
trigger:
platform: time_pattern
minutes: '/5'
minutes: "/5"
seconds: 00
condition:
- condition: template
value_template: '{{ states.sensor.bedtime_hour.state|int == now().hour|int }}'
value_template: "{{ states('sensor.bedtime_hour') |int == now().hour|int }}"
- condition: template
value_template: '{{ states.sensor.bedtime_minute.state|int == now().minute|int }}'
value_template: "{{ states('sensor.bedtime_minute') |int == now().minute|int }}"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: script.all_indoor_lights_off
- service: script.notify_me
@ -289,11 +288,11 @@ automation:
initial_state: true
trigger:
platform: time
at: '22:10:00'
at: "22:10:00"
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: template
value_template: "{{ states('input_boolean.nightly_report') == 'on' }}"
action:

View File

@ -6,15 +6,15 @@ sensor:
single_car_garage_door_sensor_status:
friendly_name: Single Car Garage Door Sensor Status
value_template: >-
{% if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == 'on' %}
{% if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == 'on' %}
Open
{% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == 'off' %}
{% elif states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == 'off' %}
Closed
{% else %}
Unknown
{% endif %}
icon_template: >-
{% set door_status = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state |d('unknown') %}
{% set door_status = states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') %}
{% if door_status == 'unknown' %}
mdi:alert-circle
{% else %}
@ -29,16 +29,16 @@ sensor:
sensors:
two_car_garage_door_sensor_status:
value_template: >-
{% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == 'on' %}
{% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == 'on' %}
Open
{% elif states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == 'off' %}
{% elif states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == 'off' %}
Closed
{% else %}
Unknown
{% endif %}
friendly_name: Double Car Garage Door Sensor Status
icon_template: >-
{% set door_status = states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state |d('unknown') %}
{% set door_status = states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') %}
{% if door_status == 'unknown' %}
mdi:alert-circle
{% else %}
@ -54,24 +54,24 @@ binary_sensor:
state_topic: "/garage/motion"
name: "Garage Motion"
device_class: motion
payload_on: 'on'
payload_off: 'off'
payload_on: "on"
payload_off: "off"
value_template: "{{ value }}"
- platform: mqtt
state_topic: "/kitchen/motion"
name: "Kitchen Camera Motion"
device_class: motion
payload_on: 'on'
payload_off: 'off'
payload_on: "on"
payload_off: "off"
value_template: "{{ value }}"
- platform: mqtt
state_topic: "/frontroom/motion"
name: "Frontroom Camera Motion"
device_class: motion
payload_on: 'on'
payload_off: 'off'
payload_on: "on"
payload_off: "off"
value_template: "{{ value }}"
###############################################################################
@ -85,20 +85,19 @@ binary_sensor:
###############################################################################
automation:
- alias: Garage Motion Reset
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.garage_motion
to: 'on'
from: 'off'
to: "on"
from: "off"
action:
- delay: '00:00:30'
- delay: "00:00:30"
- service: mqtt.publish
data:
topic: "/garage/motion"
payload: 'off'
payload: "off"
retain: false
- alias: Kitchen Camera Motion Reset
@ -106,14 +105,14 @@ automation:
trigger:
- platform: state
entity_id: binary_sensor.kitchen_camera_motion
to: 'on'
from: 'off'
to: "on"
from: "off"
action:
- delay: '00:00:30'
- delay: "00:00:30"
- service: mqtt.publish
data:
topic: "/kitchen/motion"
payload: 'off'
payload: "off"
retain: false
- alias: Frontroom Camera Motion Reset
@ -121,14 +120,14 @@ automation:
trigger:
- platform: state
entity_id: binary_sensor.frontroom_camera_motion
to: 'on'
from: 'off'
to: "on"
from: "off"
action:
- delay: '00:00:30'
- delay: "00:00:30"
- service: mqtt.publish
data:
topic: "/frontroom/motion"
payload: 'off'
payload: "off"
retain: false
################################################################################
@ -166,11 +165,11 @@ automation:
data_template:
message: >
{% set doors = "" %}
{% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and
states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
{% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and
states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
{% set doors = "Atention! Both Garage Doors are OPEN" %}
{% elif states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
{% elif states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
{% set doors = "Both Garage Doors are now CLOSED" %}
{% else %}
{% if trigger.to_state.state | lower == "on" %}
@ -184,7 +183,8 @@ automation:
- service: camera.snapshot
data_template:
entity_id: "camera.garage_camera"
filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
filename:
"{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~
(states.automation.notify_garage_door_status.last_triggered ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.notify_smtp
@ -192,17 +192,17 @@ automation:
title: 'Garage Door Status {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: >-
{% set doors = "" %}
{% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and
states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
{% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and
states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
{% set doors = "Both Garage Doors are OPEN" %}
{% elif states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
{% elif states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
{% set doors = "Both Garage Doors are CLOSED" %}
{% else %}
{% set doors = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.name ~ " is " ~
('Closed' if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == 'off' else 'OPEN')
~ " and " ~ states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.name ~ " is " ~
('Closed' if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == 'off' else 'OPEN') %}
('Closed' if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == 'off' else 'OPEN')
~ " and " ~ states('binary_sensor.two_car_garage_door_tilt_sensor_sensor.name') ~ " is " ~
('Closed' if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == 'off' else 'OPEN') %}
{% endif %}
Your {{doors}} on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") }}. Please check the garage snapshot below.
data:
@ -230,7 +230,7 @@ automation:
trigger:
platform: state
entity_id: binary_sensor.garage_door_sensor_sensor
to: 'on'
to: "on"
condition:
condition: or
conditions:
@ -239,9 +239,9 @@ automation:
- condition: and
conditions:
- condition: template
value_template: "{{ states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == 'off' }}"
value_template: "{{ states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == 'off' }}"
- condition: template
value_template: "{{ states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == 'off' }}"
value_template: "{{ states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == 'off' }}"
action:
- service: switch.turn_on
entity_id: switch.garage
@ -266,16 +266,16 @@ automation:
message: >
{% if trigger.to_state.state | lower == "on" %}
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') }} is OPEN,
{% if states.alarm_control_panel.simplisafe.state == 'armed_home' or
states.alarm_control_panel.simplisafe.state == 'armed_away' %}
{% if states('alarm_control_panel.simplisafe') == 'armed_home' or
states('alarm_control_panel.simplisafe') == 'armed_away' %}
But your home security system is ON.
{% endif %}
{% elif trigger.to_state.state | lower == "off" %}
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') }} is CLOSED!
{% endif %}
greeting: 'no'
greeting: "no"
only_at_night: >
{% if states.alarm_control_panel.simplisafe.state == 'armed_home' %}
{% if states('alarm_control_panel.simplisafe') == 'armed_home' %}
no
{% else %}
yes
@ -288,11 +288,11 @@ automation:
trigger:
platform: state
entity_id: binary_sensor.basement_door_sensor_sensor
to: 'on'
to: "on"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: homeassistant.turn_on
entity_id: switch.rf_switch_one
@ -303,13 +303,13 @@ automation:
platform: state
entity_id:
- switch.rf_switch_one
to: 'on'
to: "on"
for:
minutes: 5
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: homeassistant.turn_off
entity_id: switch.rf_switch_one

View File

@ -154,7 +154,7 @@
# to: 'disarmed'
# condition:
# - condition: template
# value_template: '{{ states.input_boolean.emergency_mode.state == "on" }}'
# value_template: "{{ states('input_boolean.emergency_mode') == 'on' }}"
# action:
# - service: input_boolean.turn_off
# entity_id: input_boolean.emergency_mode

View File

@ -2,37 +2,37 @@ homeassistant:
sensor:
- platform: snmp
name: 'ESXi Server Description'
name: "ESXi Server Description"
host: !secret esxi_server
baseoid: 1.3.6.1.2.1.1.1.0
accept_errors: true
- platform: snmp
name: 'ESXi Total RAM'
name: "ESXi Total RAM"
host: !secret esxi_server
baseoid: 1.3.6.1.2.1.25.2.3.1.5.6
accept_errors: true
- platform: snmp
name: 'ESXi Used RAM'
name: "ESXi Used RAM"
host: !secret esxi_server
baseoid: 1.3.6.1.2.1.25.2.3.1.6.6
accept_errors: true
- platform: snmp
name: 'ESXi System Uptime Epoch'
name: "ESXi System Uptime Epoch"
host: !secret esxi_server
baseoid: 1.3.6.1.2.1.25.1.1.0
accept_errors: true
- platform: snmp
name: 'ESXi Number of Network Interfaces'
name: "ESXi Number of Network Interfaces"
host: !secret esxi_server
baseoid: 1.3.6.1.2.1.2.1.0
accept_errors: true
- platform: snmp
name: 'ESXi System Memory Size'
name: "ESXi System Memory Size"
host: !secret esxi_server
baseoid: 1.3.6.1.2.1.25.2.2.0
accept_errors: true
@ -41,7 +41,7 @@ sensor:
sensors:
esxi_memory_used:
friendly_name: "ESXi Memory Usage"
unit_of_measurement: '%'
unit_of_measurement: "%"
value_template: "{{(states('sensor.esxi_used_ram') | float / states('sensor.esxi_total_ram') | float * 100) | round }}"
- platform: template
@ -49,7 +49,7 @@ sensor:
esxi_system_uptime:
friendly_name: "ESXi System Uptime"
value_template: >
{% set time = states.sensor.esxi_system_uptime_epoch.state | int %}
{% set time = states('sensor.esxi_system_uptime_epoch') | int %}
{% set minutes = ((time % 360000) / 6000) | int %}
{% set hours = ((time % 8640000) / 360000) | int %}
{% set days = (time / 8640000) | int %}

View File

@ -54,7 +54,6 @@ frontend:
#
###############################################################################
automation:
- alias: Random Theme At Startup
initial_state: true
trigger:
@ -64,7 +63,7 @@ automation:
- service_template: frontend.set_theme
data_template:
name: >
{% if states.sun.sun.state == "above_horizon" %}
{% if states('sun.sun') == "above_horizon" %}
{{ ["light_pink", "default"] | random }}
{% else %}
{{ [ "dark_red" ] | random }}

View File

@ -33,4 +33,4 @@
# - service: persistent_notification.create
# data:
# title: 'Chuck Norris fact:'
# message: '{{ states.sensor.fact_of_the_day.state }}'
# message: '{{ states('sensor.fact_of_the_day') }}'

View File

@ -7,7 +7,6 @@
homeassistant:
customize:
sensor.holiday:
hidden: true
icon: mdi:beach
@ -43,7 +42,6 @@ sensor:
#
###############################################################################
automation:
- alias: Notify Holiday State Change
initial_state: true
trigger:
@ -53,21 +51,21 @@ automation:
- condition: template
value_template: "{{ states('sensor.holiday') != 'unknown' }}"
- condition: template
value_template: "{{ states.sensor.holiday.state | trim != '' }}"
value_template: "{{ states('sensor.holiday') | trim != '' }}"
action:
- service: persistent_notification.create
data:
message: 'Today is {{ states.sensor.holiday.state }}.'
title: '{{ states.sensor.holiday.state }}'
message: "Today is {{ states('sensor.holiday') }}."
title: "{{ states('sensor.holiday') }}"
- service: script.notify_me
data_template:
message: 'Today is: {{states.sensor.holiday.state }}'
message: "Today is: {{states('sensor.holiday') }}"
- alias: Notify Indian Holidays
initial_state: true
trigger:
platform: time
at: '09:00:00'
at: "09:00:00"
condition:
- condition: template
value_template: >-
@ -77,7 +75,7 @@ automation:
{%- else -%}
{% set days2NextEvent = strptime((now().year ~ "-12-31 12:02:05"), '%Y-%m-%d %H:%M:%S').strftime('%j') | int - (now().strftime('%j') | int) + (strptime(states.calendar.holidays_in_india.attributes.start_time, '%Y-%m-%d %H:%M:%S').strftime('%j') | int) -%}
{%- endif -%}
{%- if days2NextEvent <= (states.input_number.calendar_remind_before_days.state | int) -%}
{%- if days2NextEvent <= (states('input_number.calendar_remind_before_days') | int) -%}
{%- if days2NextEvent |int == 0 -%}
true
{%- elif days2NextEvent | int == 1 -%}
@ -100,7 +98,7 @@ automation:
{%- else -%}
{% set days2NextEvent = strptime((now().year ~ "-12-31 12:02:05"), '%Y-%m-%d %H:%M:%S').strftime('%j') | int - (now().strftime('%j') | int) + (strptime(states.calendar.holidays_in_india.attributes.start_time, '%Y-%m-%d %H:%M:%S').strftime('%j') | int) -%}
{%- endif -%}
{%- if days2NextEvent <= (states.input_number.calendar_remind_before_days.state | int) -%}
{%- if days2NextEvent <= (states('input_number.calendar_remind_before_days') | int) -%}
{%- if days2NextEvent |int == 0 -%}
Today is {{ states.calendar.holidays_in_india.attributes.message | replace(".", "") | title }}.
{%- elif days2NextEvent |int == 1 -%}

View File

@ -36,7 +36,6 @@ speedtestdotnet:
- upload
sensor:
- platform: uptime
name: Home Assistant Up Time
unit_of_measurement: hours
@ -48,7 +47,7 @@ sensor:
- platform: rest
resource: http://icanhazip.com
name: external_ip
value_template: '{{ value }}'
value_template: "{{ value }}"
scan_interval: 86400
- platform: systemmonitor
@ -64,27 +63,17 @@ sensor:
- platform: rest
resource: https://pypi.python.org/pypi/homeassistant/json
name: HA Current Version
value_template: '{{ value_json.info.version }}'
value_template: "{{ value_json.info.version }}"
- platform: command_line
name: HA Installed Version
command: /srv/homeassistant/bin/hass --version
scan_interval: 86400
- platform: pi_hole
pi_hole:
host: !secret pi_hole_ip
ssl: false
verify_ssl: false
monitored_conditions:
- ads_blocked_today
- ads_percentage_today
- dns_queries_today
- domains_being_blocked
- queries_cached
- queries_forwarded
- unique_clients
- unique_domains
- clients_ever_seen
###############################################################################
# _ _ _
@ -97,7 +86,6 @@ sensor:
###############################################################################
automation:
# Notify me when I get a new public IP from my ISP
######################################################
@ -138,5 +126,5 @@ automation:
action:
- service: persistent_notification.create
data:
title: 'Domain Renew'
message: 'It is time to renew your domain. The domain will expire in {{ states.sensor.my_domain.state }} days.'
title: "Domain Renew"
message: "It is time to renew your domain. The domain will expire in {{ states('sensor.my_domain') }} days."

View File

@ -1,6 +1,5 @@
homeassistant:
customize_domain:
alarm_control_panel:
homebridge_hidden: true

View File

@ -45,30 +45,30 @@ automation:
- condition: template
value_template: "{% if trigger.from_state %} True {% else %} False {% endif %}"
- condition: template
value_template: '{{ states.alarm_control_panel.simplisafe.state != "unknown" }}'
value_template: "{{ states('alarm_control_panel.simplisafe') != 'unknown' }}"
- condition: template
value_template: '{{ states.alarm_control_panel.simplisafe.state | trim != "" }}'
value_template: "{{ states('alarm_control_panel.simplisafe') | trim != '' }}"
action:
- service_template: >
{% if states.alarm_control_panel.simplisafe.state == "armed_home" %}
{% if states('alarm_control_panel.simplisafe') == "armed_home" %}
script.xiaomi_blue
{% elif states.alarm_control_panel.simplisafe.state == "armed_away" %}
{% elif states('alarm_control_panel.simplisafe') == "armed_away" %}
script.xiaomi_green
{% elif states.alarm_control_panel.simplisafe.state == "triggered" %}
{% elif states('alarm_control_panel.simplisafe') == "triggered" %}
script.xiaomi_red
{% elif states.alarm_control_panel.simplisafe.state == "disarmed" %}
{% elif states('alarm_control_panel.simplisafe') == "disarmed" %}
script.xiaomi_red
{% endif %}
- service: script.ifttt_leeo_color_change
data_template:
value1: >
{% if states.alarm_control_panel.simplisafe.state == "armed_home" %}
{% if states('alarm_control_panel.simplisafe') == "armed_home" %}
"#0000FF"
{% elif states.alarm_control_panel.simplisafe.state == "armed_away" %}
{% elif states('alarm_control_panel.simplisafe') == "armed_away" %}
"#00FF00"
{% elif states.alarm_control_panel.simplisafe.state == "triggered" %}
{% elif states('alarm_control_panel.simplisafe') == "triggered" %}
"#FF0000"
{% elif states.alarm_control_panel.simplisafe.state == "disarmed" %}
{% elif states('alarm_control_panel.simplisafe') == "disarmed" %}
"#FF0000"
{% endif %}
@ -94,29 +94,29 @@ automation:
- service: script.notify_me
data_template:
message: >
{% if states.alarm_control_panel.simplisafe.state == "armed_home" %}
{% if states('alarm_control_panel.simplisafe') == "armed_home" %}
Your home is now secured!
{% elif states.alarm_control_panel.simplisafe.state == "armed_away" %}
{% elif states('alarm_control_panel.simplisafe') == "armed_away" %}
Your Home Security System is now set to Away mode!
{% elif states.alarm_control_panel.simplisafe.state == "triggered" %}
{% elif states('alarm_control_panel.simplisafe') == "triggered" %}
Attention!: Your Home Security System is triggered! It has been notified to the authorities.
{% elif states.alarm_control_panel.simplisafe.state == "disarmed" %}
{% elif states('alarm_control_panel.simplisafe') == "disarmed" %}
Attention!: Your Home Security System is turned OFF.
{% endif %}
- service: script.voice_notify
data_template:
message: >
{% if states.alarm_control_panel.simplisafe.state == "armed_home" %}
{% if states('alarm_control_panel.simplisafe') == "armed_home" %}
Your home is now secured!
{% elif states.alarm_control_panel.simplisafe.state == "armed_away" %}
{% elif states('alarm_control_panel.simplisafe') == "armed_away" %}
Your Home Security System is now set to Away mode!
{% elif states.alarm_control_panel.simplisafe.state == "triggered" %}
{% elif states('alarm_control_panel.simplisafe') == "triggered" %}
Attention!: Your Home Security System is triggered! It has been notified to the authorities.
{% elif states.alarm_control_panel.simplisafe.state == "disarmed" %}
{% elif states('alarm_control_panel.simplisafe') == "disarmed" %}
Attention!: Your Home Security System is turned OFF.
{% endif %}
- condition: template
value_template: '{{ states.alarm_control_panel.simplisafe.state != "disarmed" }}'
value_template: "{{ states('alarm_control_panel.simplisafe') != 'disarmed' }}"
- service: input_boolean.turn_on
entity_id: input_boolean.notify_camera_motion
@ -199,9 +199,9 @@ automation:
seconds: 00
condition:
- condition: template
value_template: "{{ states.sensor.bedtime_hour.state|int == now().hour|int }}"
value_template: "{{ states('sensor.bedtime_hour')|int == now().hour|int }}"
- condition: template
value_template: "{{ states.sensor.bedtime_minute.state|int == now().minute|int }}"
value_template: "{{ states('sensor.bedtime_minute')|int == now().minute|int }}"
- condition: template
value_template: "{{ states('alarm_control_panel.simplisafe') != 'away' }}"
- condition: state
@ -231,33 +231,33 @@ automation:
# condition: and
# conditions:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" or states.alarm_control_panel.simplisafe.state == "armed_away" }}'
# value_template: '{{ states('alarm_control_panel.simplisafe') == "armed_home" or states('alarm_control_panel.simplisafe') == "armed_away" }}'
# - condition: or
# conditions:
# - condition: template
# value_template: '{{ states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" }}'
# value_template: '{{ states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" }}'
# - condition: template
# value_template: '{{ states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" }}'
# value_template: '{{ states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" }}'
# action:
# - service: switch.turn_on
# entity_id: switch.garage
# - service: script.notify_me
# data_template:
# message: >
# Attention! Your home Security system is set to {{ states.alarm_control_panel.simplisafe.state.split('_')[1] | upper }} mode.
# BUT THE {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
# Attention! Your home Security system is set to {{ states('alarm_control_panel.simplisafe').split('_')[1] | upper }} mode.
# BUT THE {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
# - service: camera.snapshot
# data_template:
# entity_id: "camera.garage_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: camera.snapshot
# data_template:
# entity_id: "camera.driveway_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: camera.snapshot
# data_template:
# entity_id: "camera.frontdoor_camera"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# filename: "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - service: notify.notify_smtp
# data_template:
# title: 'Garage Picture {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
@ -272,33 +272,33 @@ automation:
# {%- endif %} {{ dt.strftime("%B %Y")}}
# {%- endmacro -%}
# {% set doors = "" %}
# {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
# {% set doors = "Both garage doors" %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on"%}
# {% set doors = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on"%}
# {% set doors = states('binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" %}
# {% set doors = states('binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% endif %}
# Your {{ doors }} seem to be open while your home security system is set to "{{ states.alarm_control_panel.simplisafe.state.split('_')[1]| title }}" mode. Today is {{ get_date(now()) }}, and time is {{ now().strftime("%I:%M:%S %p") }}. Please see the attached pictures and make sure everything is okay.
# Your {{ doors }} seem to be open while your home security system is set to "{{ states('alarm_control_panel.simplisafe').split('_')[1]| title }}" mode. Today is {{ get_date(now()) }}, and time is {{ now().strftime("%I:%M:%S %p") }}. Please see the attached pictures and make sure everything is okay.
# data:
# images:
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states.automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/garage/garage_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/driveway/driveway_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - "{{ '/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/frontdoor_' ~ (states('automation.home_security_system_and_garage_door_check.last_updated ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" }}'
# value_template: '{{ states('alarm_control_panel.simplisafe') == "armed_home" }}'
# - service: script.voice_notify
# data_template:
# message: >
# {% set doors = "" %}
# {% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" and states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" and states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
# {% set doors = "Both garage doors" %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on"%}
# {% set doors = states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" %}
# {% set doors = states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on"%}
# {% set doors = states('binary_sensor.single_car_garage_door_tilt_sensor_sensor.name %}
# {% elif states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" %}
# {% set doors = states('binary_sensor.two_car_garage_door_tilt_sensor_sensor.name %}
# {% endif %}
# Attention! Your home Security system is set to {{ states.alarm_control_panel.simplisafe.state.split('_')[1] | upper }} mode.
# Attention! Your home Security system is set to {{ states('alarm_control_panel.simplisafe').split('_')[1] | upper }} mode.
# BUT the {{ doors }} {{ 'are' if doors.endswith('s') else 'is' }} open.
###############################################################################
@ -319,10 +319,10 @@ automation:
# state: 'disarmed'
# action:
# - service_template: >-
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# {% if states('binary_sensor.back_door_sensor_sensor') == "off" and
# states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "off" and
# states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
# states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
# alarm_control_panel.alarm_arm_home
# {% else %}
# alarm_control_panel.disarm
@ -332,31 +332,31 @@ automation:
# - service: script.voice_notify
# data_template:
# message: >
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# {% if states('binary_sensor.back_door_sensor_sensor') == "off" and
# states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "off" and
# states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
# states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
# {%- if states.binary_sensor.back_door_sensor_sensor.state == "on" -%}
# {%- if states('binary_sensor.back_door_sensor_sensor') == "on" -%}
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
# {%- if states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "on" -%}
# {%- if states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {%- if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {%- if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
@ -368,31 +368,31 @@ automation:
# - service: script.notify_me
# data_template:
# message: >
# {% if states.binary_sensor.back_door_sensor_sensor.state == "off" and
# states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "off" and
# states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "off" and
# states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "off" %}
# {% if states('binary_sensor.back_door_sensor_sensor') == "off" and
# states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "off" and
# states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "off" and
# states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "off" %}
# It's getting dark outside, and your home security system is now set to HOME mode.
# {% else %}
# It is getting dark outside.
# {%- if states.binary_sensor.back_door_sensor_sensor.state == "on" -%}
# {%- if states('binary_sensor.back_door_sensor_sensor') == "on" -%}
# {%- set doors = doors ~ " Back Door" -%}
# {%- endif -%}
# {%- if states.binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor.state == "on" -%}
# {%- if states('binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor') == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Front Door" -%}
# {% else %}
# {%- set doors = doors ~ " Front Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {%- if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Two Car Garage Door" -%}
# {% else %}
# {%- set doors = doors ~ " Two Car Garage Door" -%}
# {% endif %}
# {%- endif -%}
# {%- if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state == "on" -%}
# {%- if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') == "on" -%}
# {% if doors | trim != "" %}
# {%- set doors = doors ~ " and Single Car Garage Door" -%}
# {% else %}
@ -417,9 +417,9 @@ automation:
# condition: or
# conditions:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state | lower == "armed_away" }}'
# value_template: '{{ states('alarm_control_panel.simplisafe') | lower == "armed_away" }}'
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state | lower == "armed_home" }}'
# value_template: '{{ states('alarm_control_panel.simplisafe') | lower == "armed_home" }}'
# action:
# - service: notify.ios_suresh
# data_template:
@ -444,7 +444,7 @@ automation:
# to: 'on'
# condition:
# - condition: template
# value_template: '{{ states.alarm_control_panel.simplisafe.state == "armed_home" or states.alarm_control_panel.simplisafe.state == "armed_away" }}'
# value_template: '{{ states('alarm_control_panel.simplisafe') == "armed_home" or states('alarm_control_panel.simplisafe') == "armed_away" }}'
# action:
# - service: notify.ios_suresh
# data_template:

View File

@ -6,7 +6,6 @@
###############################################################################
homeassistant:
customize:
switch.frontyard_light:
icon: mdi:lightbulb
friendly_name: Front Porch Lights
@ -123,7 +122,6 @@ hue:
tplink:
discovery: false
switch:
# In-wall switches
- host: !secret tplink_kids_bedroom
- host: !secret tplink_guest_bedroom_1
@ -237,7 +235,6 @@ script:
# period: 2
# spread: 360
# change: 35
# stop_colorloop:
# sequence:
# - service: light.lifx_effect_stop
@ -255,21 +252,20 @@ script:
###############################################################################
automation:
# Animate Master Bedroom Lights
###############################################################################
- alias: Animate Master Bedroom Lights
initial_state: true
trigger:
platform: time_pattern
seconds: '/5'
seconds: "/5"
condition:
- condition: state
entity_id: input_boolean.animate_upstairs_lights
state: 'on'
state: "on"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
data:
@ -278,9 +274,12 @@ automation:
brightness: 255
color_temp: 366
data_template:
rgb_color: ['{{ "{0:d}".format(range(0, 255)|random) }}' ,
rgb_color:
[
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}']
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}',
]
# Restore Master Bedroom Lights
###############################################################################
@ -289,11 +288,11 @@ automation:
trigger:
platform: state
entity_id: input_boolean.animate_upstairs_lights
to: 'off'
to: "off"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
data:
@ -309,14 +308,14 @@ automation:
initial_state: true
trigger:
platform: time_pattern
seconds: '/5'
seconds: "/5"
condition:
- condition: state
entity_id: input_boolean.animate_downstairs_lights
state: 'on'
state: "on"
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
data:
@ -325,9 +324,12 @@ automation:
brightness: 255
color_temp: 366
data_template:
rgb_color: ['{{ "{0:d}".format(range(0, 255)|random) }}' ,
rgb_color:
[
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}']
'{{ "{0:d}".format(range(0, 255)|random) }}',
'{{ "{0:d}".format(range(0, 255)|random) }}',
]
# Restore Familyroom Lights
###############################################################################
@ -336,11 +338,11 @@ automation:
trigger:
platform: state
entity_id: input_boolean.animate_downstairs_lights
to: 'off'
to: "off"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
data:
@ -394,12 +396,12 @@ automation:
trigger:
- platform: state
entity_id: input_boolean.long_flash
to: 'on'
from: 'off'
to: "on"
from: "off"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
entity_id:
@ -416,12 +418,12 @@ automation:
trigger:
- platform: state
entity_id: input_boolean.short_flash
to: 'on'
from: 'off'
to: "on"
from: "off"
condition:
- condition: state
entity_id: input_boolean.light_automations
state: 'on'
state: "on"
action:
- service: light.turn_on
entity_id:

View File

@ -99,4 +99,4 @@
# - service: input_select.select_option
# data_template:
# entity_id: input_select.log_level
# option: '{{ states.sensor.current_log_level.state | default("warning") }}'
# option: '{{ states('sensor.current_log_level') | default("warning") }}'

View File

@ -158,12 +158,12 @@ automation:
entity_id: input_select.snapcast_server
condition:
- condition: template
value_template: '{{ states.input_select.snapcast_server.state | lower != "select one" }}'
value_template: "{{ states('input_select.snapcast_server') | lower != 'select one' }}"
action:
- service_template: >-
{% if states.input_select.snapcast_server.state | lower == "stop" %}
{% if states('input_select.snapcast_server') | lower == "stop" %}
shell_command.stop_snapserver
{% elif states.input_select.snapcast_server.state | lower == "start" %}
{% elif states('input_select.snapcast_server') | lower == "start" %}
shell_command.start_snapserver
{% else %}
shell_command.restart_snapserver

View File

@ -1,55 +1,55 @@
homeassistant:
customize:
input_label.aeotec_zw120_door_window_sensor_gen5_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.back_door_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.basement_door_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.downstairs_multi_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.front_room_multi_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.front_room_window_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.garage_door_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.garage_motion:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.guest_bedroom_multi_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.kitchen_motion_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d00016c2d0e:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d00016db6d2:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d0001a25041:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d0001a662fe:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d00024e57d3:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d00024e57fb:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d00024e842c:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d00024ee084:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d000272bed1:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d000272bf48:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.motion_sensor_158d000272bfd7:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.single_car_garage_door_tilt_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.stairs_motion_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.two_car_garage_door_tilt_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label.upstairs_multi_sensor_sensor:
unit_of_measurement: 'count'
unit_of_measurement: "count"
input_label:
aeotec_zw120_door_window_sensor_gen5_sensor:
@ -134,7 +134,7 @@ automation:
- alias: Count Motions
trigger:
- platform: state
to: 'on'
to: "on"
entity_id:
- binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor
- binary_sensor.back_door_sensor_sensor
@ -203,7 +203,6 @@ automation:
- input_label.stairs_motion_sensor_sensor
- input_label.two_car_garage_door_tilt_sensor_sensor
- input_label.upstairs_multi_sensor_sensor
# {% for x in states.binary_sensor if 'camera' not in x.entity_id and
# 'cube' not in x.entity_id and
# 'tesla' not in x.entity_id and

View File

@ -25,17 +25,17 @@ homeassistant:
timer:
timer_kitchen:
duration: '00:10:00'
duration: "00:10:00"
timer_familyroom:
duration: '00:05:00'
duration: "00:05:00"
timer_frontroom:
duration: '00:05:00'
duration: "00:05:00"
timer_garage:
duration: '00:05:00'
duration: "00:05:00"
timer_masterbedroom:
duration: '00:05:00'
duration: "00:05:00"
timer_officeroom:
duration: '00:05:00'
duration: "00:05:00"
###############################################################################
# _ _ _
@ -48,7 +48,6 @@ timer:
###############################################################################
automation:
# Office Room:
# Motion Detected - Turn ON the light and extend timer
###############################################################################
@ -57,75 +56,45 @@ automation:
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d000272bfd7
from: 'off'
to: 'on'
to: "on"
action:
- service: timer.start
entity_id: timer.timer_officeroom
- service: switch.turn_on
entity_id: switch.office_room
- condition: template
value_template: '{{ states.sun.sun.state == "below_horizon" }}'
value_template: "{{ states('sun.sun') == 'below_horizon' }}"
- service: homeassistant.turn_on
entity_id: switch.zwave_smart_switch_switch
- alias: Officeroom Timer Elapsed
initial_state: true
trigger:
- platform: state
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.timer_officeroom
from: 'active'
to: 'idle'
action:
- service: switch.turn_off
entity_id: switch.office_room
- service: homeassistant.turn_off
entity_id: switch.zwave_smart_switch_switch
# Srinika's Bedroom:
# Motion Detected - Turn ON the bedroom light and extend timer
###############################################################################
# - alias: Srinika Bedroom Motion & Timer
# initial_state: true
# trigger:
# - platform: state
# entity_id: binary_sensor.motion_sensor_158d000272bed1
# from: 'off'
# to: 'on'
# action:
# - service: timer.start
# entity_id: timer.timer_srinika_bedroom
# - service: switch.turn_on
# entity_id: switch.switch.guest_bedroom
# - condition: template
# value_template: '{{ states.sun.sun.state == "below_horizon" }}'
# - alias: Srinika Bedroom Timer Elapsed
# initial_state: true
# trigger:
# - platform: state
# entity_id: timer.timer_srinika_bedroom
# from: 'active'
# to: 'idle'
# action:
# - service: switch.turn_off
# entity_id: switch.guest_bedroom
# Front Room:
# Motion Detected - Turn ON the light and extend timer
###############################################################################
# # Front Room:
# # Motion Detected - Turn ON the light and extend timer
# ###############################################################################
- alias: Frontroom Motion & Timer
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d00016db6d2
from: 'off'
to: 'on'
from: "off"
to: "on"
action:
- service: timer.start
entity_id: timer.timer_frontroom
- condition: template
value_template: '{{ states.sun.sun.state == "below_horizon" }}'
value_template: "{{ states('sun.sun') == 'below_horizon' }}"
- service: homeassistant.turn_on
entity_id: switch.zwave_smart_switch_switch
@ -135,17 +104,16 @@ automation:
- alias: Frontroom Timer Elapsed
initial_state: true
trigger:
- platform: state
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.timer_frontroom
from: 'active'
to: 'idle'
condition:
- condition: template
value_template: '{{ states.input_boolean.working_in_office_room.state == "off" }}'
value_template: "{{ states('input_boolean.working_in_office_room') == 'off' }}"
action:
- service: homeassistant.turn_off
entity_id: switch.rf_switch_four
# Kitchen:
# Motion Detected - Turn ON the light and extend timer
###############################################################################
@ -157,18 +125,17 @@ automation:
- binary_sensor.motion_sensor_158d0001a662fe
- binary_sensor.kitchen_motion_sensor_sensor
- binary_sensor.basement_door_sensor_sensor
from: 'off'
to: 'on'
from: "off"
to: "on"
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
state: "below_horizon"
action:
- service: switch.turn_on
entity_id: switch.kitchen
- service: timer.start
entity_id: timer.timer_kitchen
# Kitchen:
# Timer Elapsed - Turn OFF lights
###############################################################################
@ -182,16 +149,16 @@ automation:
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
state: "below_horizon"
action:
- service_template: >
{% if now().hour|int >= states.sensor.bedtime_hour.state|int and now().minute|int >= states.sensor.bedtime_minute.state|int %}
{% if now().hour|int >= states('sensor.bedtime_hour') |int and
now().minute|int >= states('sensor.bedtime_minute') |int %}
switch.turn_off
{% else %}
switch.turn_on
{% endif %}
entity_id: switch.kitchen
# Family Room:
# Motion Detected - When TV is OFF, turn ON the light 100% and extend timer
###############################################################################
@ -202,12 +169,12 @@ automation:
entity_id:
- binary_sensor.tv_multi_sensor_sensor
- binary_sensor.motion_sensor_158d0001a25041
from: 'off'
to: 'on'
from: "off"
to: "on"
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
state: "below_horizon"
- condition: template
value_template: "{{ states('input_boolean.movie_time') != 'on' }}"
action:
@ -215,7 +182,7 @@ automation:
entity_id: light.family_room
data_template:
brightness: >
{% if states.binary_sensor.sharp_tv.state == "on" %}
{% if states('binary_sensor.sharp_tv') == "on" %}
25
{% else %}
254
@ -224,7 +191,6 @@ automation:
transition: 5
- service: timer.start
entity_id: timer.timer_familyroom
# Family Room:
# Timer Elapsed - Turn OFF lights
###############################################################################
@ -233,15 +199,14 @@ automation:
trigger:
- platform: state
entity_id: timer.timer_familyroom
from: 'active'
to: 'idle'
from: "active"
to: "idle"
action:
- service: light.turn_off
entity_id: light.family_room
- delay: '00:00:05'
- delay: "00:00:05"
- service: light.turn_off
entity_id: light.family_room
# Master Bedroom:
# Motion Detected - Turn ON the lights and extend timer
###############################################################################
@ -250,12 +215,12 @@ automation:
trigger:
- platform: state
entity_id: binary_sensor.upstairs_multi_sensor_sensor
from: 'off'
to: 'on'
from: "off"
to: "on"
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
state: "below_horizon"
action:
- service: light.turn_on
data:
@ -269,7 +234,6 @@ automation:
brightness: 10
- service: timer.start
entity_id: timer.timer_masterbedroom
# Master Bedroom:
# Timer Elapsed - Turn OFF lights
###############################################################################
@ -278,17 +242,16 @@ automation:
trigger:
- platform: state
entity_id: timer.timer_masterbedroom
from: 'active'
to: 'idle'
from: "active"
to: "idle"
action:
- service: light.turn_off
entity_id: light.master_bedroom_1
- service: light.turn_off
entity_id: light.master_bedroom_2
- delay: '00:00:05'
- delay: "00:00:05"
- service: light.turn_off
entity_id: light.master_bedroom
# Garage:
# Motion Detected - Turn ON the light and extend timer
#
@ -300,17 +263,16 @@ automation:
trigger:
- platform: state
entity_id: binary_sensor.garage_motion
from: 'off'
to: 'on'
from: "off"
to: "on"
condition:
- condition: template
value_template: '{{ states.input_boolean.working_in_garage.state | lower == "on" }}'
value_template: "{{ states('input_boolean.working_in_garage') | lower == 'on' }}"
- condition: template
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.switch.garage.last_updated)) | int > 30 }}'
value_template: "{{ (as_timestamp(now()) - as_timestamp(states.switch.garage.last_updated)) | int > 30 }}"
action:
- service: switch.turn_on
entity_id: switch.garage
# Start the timer when the lights are ON
###############################################################################
- alias: Garage Timer Start When Garage Lights ON
@ -318,12 +280,11 @@ automation:
trigger:
- platform: state
entity_id: switch.garage
from: 'off'
to: 'on'
from: "off"
to: "on"
action:
- service: timer.start
entity_id: timer.timer_garage
# Garage:
# Timer Elapsed - Turn OFF lights, when "I am not working"
###############################################################################
@ -332,12 +293,12 @@ automation:
trigger:
- platform: state
entity_id: timer.timer_garage
from: 'active'
to: 'idle'
from: "active"
to: "idle"
condition:
- condition: state
entity_id: input_boolean.working_in_garage
state: 'off'
state: "off"
action:
- service: switch.turn_off
entity_id: switch.garage

View File

@ -6,7 +6,6 @@
###############################################################################
homeassistant:
customize:
group.tts_announcements:
order: 52
@ -67,12 +66,11 @@ tts:
- platform: amazon_polly
aws_access_key_id: !secret aws_access_key_id
aws_secret_access_key: !secret aws_secret_access_key
region_name: 'us-east-1'
region_name: "us-east-1"
text_type: ssml
voice: Joanna
script:
###############################################################################
# Notify Related Scripts
###############################################################################
@ -93,13 +91,13 @@ script:
- service: ifttt.trigger
data_template:
event: "LEEO_COLOR_CHANGE"
value1: '{{ value1 }}'
value1: "{{ value1 }}"
notify_me:
sequence:
- condition: state
entity_id: input_boolean.text_alerts
state: 'on'
state: "on"
- condition: template
value_template: '{{ message | trim != "" }}'
- service: script.ifttt_notify
@ -121,29 +119,29 @@ script:
voice_notify:
sequence:
- condition: template
value_template: '{{ states.input_boolean.voice_notifications.state == "on" }}'
value_template: "{{ states('input_boolean.voice_notifications') == 'on' }}"
- condition: template
value_template: '{{ states.input_boolean.do_not_disturb.state | lower == "off" }}'
value_template: "{{ states('input_boolean.do_not_disturb') | lower == 'off' }}"
- condition: template
value_template: '{{ states.media_player.gstreamer.state == "idle" }}'
value_template: "{{ states('media_player.gstreamer') == 'idle' }}"
- condition: template
value_template: '{{ states.media_player.mpd.state != "playing" }}'
value_template: "{{ states('media_player.mpd') != 'playing' }}"
- condition: template
value_template: '{{ message | trim != "" }}'
value_template: "{{ message | trim != '' }}"
- condition: state
entity_id: group.all_devices
state: 'home'
state: "home"
- condition: template
value_template: >
{% if states.input_boolean.emergency_mode.state == "on" %}
{% if states('input_boolean.emergency_mode') == "on" %}
true
{% else %}
{{ states.group.all_devices.state == "home" }}
{{ states('group.all_devices') == "home" }}
{% endif %}
- condition: template
value_template: >
{% if only_at_night | default('no', true ) == "yes" %}
{% if states.sun.sun.state == "above_horizon" %}
{% if states('sun.sun') == "above_horizon" %}
false
{% else %}
true
@ -155,15 +153,15 @@ script:
entity_id: media_player.gstreamer
data_template:
volume_level: >
{% if states.input_boolean.emergency_mode.state == "on" %}
{{ states.input_number.tts_volume_level_alert.state }}
{% 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.state }}
{{ states('input_number.tts_volume_level_morning') }}
{% elif now().hour|int > 12 and now().hour|int < 20 %}
{{ states.input_number.tts_volume_level_afternoon.state }}
{{ states('input_number.tts_volume_level_afternoon') }}
{% else %}
{{ states.input_number.tts_volume_level_evening.state }}
{{ states('input_number.tts_volume_level_evening') }}
{% endif %}
{% endif %}
- service: tts.amazon_polly_say

View File

@ -56,7 +56,6 @@ input_select:
icon: mdi:pig
sensor:
## WiFi Information related sensors
- platform: mqtt
state_topic: "/wifi/pi_basement"
@ -235,47 +234,47 @@ script:
sequence:
- service: mqtt.publish
data_template:
topic: '/server/pi_basement'
topic: "/server/pi_basement"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_theater'
topic: "/server/pi_theater"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_kitchen'
topic: "/server/pi_kitchen"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_familyroom'
topic: "/server/pi_familyroom"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_frontroom'
topic: "/server/pi_frontroom"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_garage'
topic: "/server/pi_garage"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_guest1'
topic: "/server/pi_guest1"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_guest2'
topic: "/server/pi_guest2"
payload: CMD_REBOOT_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_masterbedroom'
topic: "/server/pi_masterbedroom"
payload: CMD_REBOOT_PI
retain: false
@ -283,47 +282,47 @@ script:
sequence:
- service: mqtt.publish
data_template:
topic: '/server/pi_basement'
topic: "/server/pi_basement"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_theater'
topic: "/server/pi_theater"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_kitchen'
topic: "/server/pi_kitchen"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_familyroom'
topic: "/server/pi_familyroom"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_frontroom'
topic: "/server/pi_frontroom"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_garage'
topic: "/server/pi_garage"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_guest1'
topic: "/server/pi_guest1"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_guest2'
topic: "/server/pi_guest2"
payload: CMD_RESTART_SNAPCLIENT
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_masterbedroom'
topic: "/server/pi_masterbedroom"
payload: CMD_RESTART_SNAPCLIENT
retain: false
@ -331,47 +330,47 @@ script:
sequence:
- service: mqtt.publish
data_template:
topic: '/server/pi_basement'
topic: "/server/pi_basement"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_theater'
topic: "/server/pi_theater"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_kitchen'
topic: "/server/pi_kitchen"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_familyroom'
topic: "/server/pi_familyroom"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_frontroom'
topic: "/server/pi_frontroom"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_garage'
topic: "/server/pi_garage"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_guest1'
topic: "/server/pi_guest1"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_guest2'
topic: "/server/pi_guest2"
payload: CMD_SHUTDOWN_PI
retain: false
- service: mqtt.publish
data_template:
topic: '/server/pi_masterbedroom'
topic: "/server/pi_masterbedroom"
payload: CMD_SHUTDOWN_PI
retain: false
@ -383,52 +382,52 @@ script:
- service: mqtt.publish
data:
topic: /server/pi_basement
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_theater
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_kitchen
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_familyroom
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_frontroom
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_garage
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_guest1
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_guest2
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_masterbedroom
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pizero_green
payload: 'CMD_REPORT_WIFI_DETAILS'
payload: "CMD_REPORT_WIFI_DETAILS"
retain: false
# Script to Query Disk Information - Publishes message 'CMD_REPORT_DISK_DETAILS'
@ -439,52 +438,52 @@ script:
- service: mqtt.publish
data:
topic: /server/pi_basement
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_theater
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_kitchen
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_familyroom
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_frontroom
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_garage
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_guest1
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_guest2
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pi_masterbedroom
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
- service: mqtt.publish
data:
topic: /server/pizero_green
payload: 'CMD_REPORT_DISK_DETAILS'
payload: "CMD_REPORT_DISK_DETAILS"
retain: false
###############################################################################
@ -500,7 +499,6 @@ script:
# Automations: Various automations to query and issue commands to Raspberry Pis
###############################################################################
automation:
# Queries WiFi Signal Level and Link Quality - it loads during startup, and
# updates once every 30 minutes
###############################################################################
@ -508,7 +506,7 @@ automation:
initial_state: true
trigger:
- platform: time_pattern
minutes: '/30'
minutes: "/30"
- platform: homeassistant
event: start
action:
@ -521,7 +519,7 @@ automation:
initial_state: true
trigger:
- platform: time_pattern
minutes: '/30'
minutes: "/30"
- platform: homeassistant
event: start
action:
@ -536,18 +534,18 @@ automation:
entity_id: input_select.rpi_commands
condition:
- condition: template
value_template: '{{ states.input_select.raspberry_pis.state | lower != "select one" }}'
value_template: "{{ states('input_select.raspberry_pis') | lower != 'select one' }}"
- condition: template
value_template: '{{ states.input_select.rpi_commands.state | lower != "select one" }}'
value_template: "{{ states('input_select.rpi_commands') | lower != 'select one' }}"
action:
service: mqtt.publish
data_template:
retain: false
topic: "{{ '/server/' ~ states.input_select.raspberry_pis.state }}"
topic: "{{ '/server/' ~ states('input_select.raspberry_pis') }}"
payload: >-
{% if states.input_select.rpi_commands.state | lower == "restart server" %}
{% if states('input_select.rpi_commands') | lower == "restart server" %}
CMD_REBOOT_PI
{% elif states.input_select.rpi_commands.state | lower == "restart snapcast" %}
{% elif states('input_select.rpi_commands') | lower == "restart snapcast" %}
CMD_RESTART_SNAPCLIENT
{% else %}
CMD_SHUTDOWN_PI

View File

@ -76,12 +76,12 @@ sensor:
- platform: template
sensors:
nas_memory_usage_above_80:
value_template: '{{ states.sensor.kalavala_nas_memory_usage.state | int > 80 }}'
value_template: "{{ states('sensor.kalavala_nas_memory_usage') | int > 80 }}"
- platform: template
sensors:
nas_cpu_usage_above_80:
value_template: '{{ states.sensor.kalavala_nas_cpu_usage.state | int > 80 }}'
value_template: "{{ states('sensor.kalavala_nas_cpu_usage') | int > 80 }}"
###############################################################################
# _ _ _

View File

@ -29,4 +29,4 @@
# - service: persistent_notification.create
# data:
# title: 'Quote:'
# message: '{{ states.sensor.quote_of_the_day.state }}'
# message: '{{ states('sensor.quote_of_the_day') }}'

View File

@ -152,35 +152,35 @@
# - delay:
# minutes: 1
# - service_template: >
# {%- if states.sensor.rf_switch_one.state | lower == "on" -%}
# {%- if states('sensor.rf_switch_one') | lower == "on" -%}
# homeassistant.turn_on
# {%- else -%}
# homeassistant.turn_off
# {%- endif -%}
# entity_id: switch.switch_one
# - service_template: >
# {%- if states.sensor.rf_switch_two.state | lower == "on" -%}
# {%- if states('sensor.rf_switch_two') | lower == "on" -%}
# homeassistant.turn_on
# {%- else -%}
# homeassistant.turn_off
# {%- endif -%}
# entity_id: switch.switch_two
# - service_template: >
# {%- if states.sensor.rf_switch_three.state | lower == "on" -%}
# {%- if states('sensor.rf_switch_three') | lower == "on" -%}
# homeassistant.turn_on
# {%- else -%}
# homeassistant.turn_off
# {%- endif -%}
# entity_id: switch.switch_three
# - service_template: >
# {%- if states.sensor.rf_switch_four.state | lower == "on" -%}
# {%- if states('sensor.rf_switch_four') | lower == "on" -%}
# homeassistant.turn_on
# {%- else -%}
# homeassistant.turn_off
# {%- endif -%}
# entity_id: switch.switch_four
# - service_template: >
# {%- if states.sensor.rf_switch_five.state | lower == "on" -%}
# {%- if states('sensor.rf_switch_five') | lower == "on" -%}
# homeassistant.turn_on
# {%- else -%}
# homeassistant.turn_off

View File

@ -22,6 +22,7 @@ input_datetime:
has_date: false
has_time: true
initial: "22:00:00"
autumn_wakeup_time:
name: Autumn Wakeup Time
has_date: false
@ -33,6 +34,7 @@ input_datetime:
has_date: false
has_time: true
initial: "22:00:00"
winter_wakeup_time:
name: Winter Wakeup Time
has_date: false
@ -44,6 +46,7 @@ input_datetime:
has_date: false
has_time: true
initial: "22:00:00"
spring_wakeup_time:
name: Spring Wakeup Time
has_date: false
@ -72,56 +75,56 @@ sensor:
wakeup_hour:
friendly_name: Wakeup Hour
value_template: >
{% if states.sensor.season.state | lower == "summer" %}
{{ states.input_datetime.summer_wakeup_time.state.split(':')[0] }}
{% elif states.sensor.season.state | lower == "autumn" %}
{{ states.input_datetime.autumn_wakeup_time.state.split(':')[0] }}
{% elif states.sensor.season.state | lower == "winter" %}
{{ states.input_datetime.winter_wakeup_time.state.split(':')[0] }}
{% elif states.sensor.season.state | lower == "spring" %}
{{ states.input_datetime.spring_wakeup_time.state.split(':')[0] }}
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_wakeup_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_wakeup_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_wakeup_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_wakeup_time').split(':')[0] }}
{% else %}
6
{% endif %}
wakeup_minute:
friendly_name: Wakeup Minute
value_template: >
{% if states.sensor.season.state | lower == "summer" %}
{{ states.input_datetime.summer_wakeup_time.state.split(':')[1] }}
{% elif states.sensor.season.state | lower == "autumn" %}
{{ states.input_datetime.autumn_wakeup_time.state.split(':')[1] }}
{% elif states.sensor.season.state | lower == "winter" %}
{{ states.input_datetime.winter_wakeup_time.state.split(':')[1] }}
{% elif states.sensor.season.state | lower == "spring" %}
{{ states.input_datetime.spring_wakeup_time.state.split(':')[1] }}
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_wakeup_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_wakeup_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_wakeup_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_wakeup_time').split(':')[1] }}
{% else %}
0
{% endif %}
bedtime_hour:
friendly_name: Bedtime Hour
value_template: >
{% if states.sensor.season.state | lower == "summer" %}
{{ states.input_datetime.summer_bed_time.state.split(':')[0] }}
{% elif states.sensor.season.state | lower == "autumn" %}
{{ states.input_datetime.autumn_bed_time.state.split(':')[0] }}
{% elif states.sensor.season.state | lower == "winter" %}
{{ states.input_datetime.winter_bed_time.state.split(':')[0] }}
{% elif states.sensor.season.state | lower == "spring" %}
{{ states.input_datetime.spring_bed_time.state.split(':')[0] }}
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_bed_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_bed_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_bed_time').split(':')[0] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_bed_time').split(':')[0] }}
{% else %}
0
{% endif %}
bedtime_minute:
friendly_name: Bedtime Minute
value_template: >
{% if states.sensor.season.state | lower == "summer" %}
{{ states.input_datetime.summer_bed_time.state.split(':')[1] }}
{% elif states.sensor.season.state | lower == "autumn" %}
{{ states.input_datetime.autumn_bed_time.state.split(':')[1] }}
{% elif states.sensor.season.state | lower == "winter" %}
{{ states.input_datetime.winter_bed_time.state.split(':')[1] }}
{% elif states.sensor.season.state | lower == "spring" %}
{{ states.input_datetime.spring_bed_time.state.split(':')[1] }}
{% if states('sensor.season') | lower == "summer" %}
{{ states('input_datetime.summer_bed_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "autumn" %}
{{ states('input_datetime.autumn_bed_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "winter" %}
{{ states('input_datetime.winter_bed_time').split(':')[1] }}
{% elif states('sensor.season') | lower == "spring" %}
{{ states('input_datetime.spring_bed_time').split(':')[1] }}
{% else %}
0
{% endif %}
@ -148,7 +151,7 @@ input_boolean:
stream_camera2chromecast:
name: Stream Cameras to Chromecast
icon: mdi:cctv
initial: off
initial: on
home_security:
name: Home Security System

View File

@ -1007,4 +1007,3 @@
# data_template:
# entity_id: climate.cooler_fan
# temperature: "{{ states.climate.main_floor.temperature |float }}"

View File

@ -37,7 +37,6 @@ input_number:
step: 0.1
automation:
###############################################################################
# The text entered in the text box will be announced in the house
###############################################################################
@ -50,4 +49,4 @@ automation:
- service: script.voice_notify
data_template:
message: "{{ trigger.to_state.state }}"
greeting: "{{ 'yes' if states.input_boolean.greeting.state == 'on' else 'no' }}"
greeting: "{{ 'yes' if states('input_boolean.greeting') == 'on' else 'no' }}"

View File

@ -14,13 +14,13 @@ homeassistant:
sensor:
- platform: mqtt
name: 'USPS Mail'
state_topic: '/usps/mails'
name: "USPS Mail"
state_topic: "/usps/mails"
value_template: "{{ value }}"
- platform: mqtt
name: USPS Packages
state_topic: '/usps/packages'
state_topic: "/usps/packages"
value_template: "{{ value }}"
camera:
@ -38,7 +38,6 @@ camera:
#
###############################################################################
automation:
# Notify USPS mails via TTS, and iOS notification with attachment
###############################################################################
- alias: Notify USPS Mail
@ -48,21 +47,23 @@ automation:
entity_id: sensor.usps_mail
condition:
- condition: template
value_template: '{{ states.sensor.usps_mail.state | int > 0 }}'
value_template: "{{ states('sensor.usps_mail') != 'unknown' }}"
- condition: template
value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}'
value_template: "{{ states('sensor.usps_mail') | int > 0 }}"
- condition: template
value_template: "{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}"
action:
- service: script.voice_notify
data_template:
message: >
{%- if states.sensor.usps_mail.state | int == 1 -%}
Attention: USPS is delivering {{ states.sensor.usps_mail.state }} mail today.
{%- if states('sensor.usps_mail') | int == 1 -%}
Attention: USPS is delivering {{ states('sensor.usps_mail') }} mail today.
{%- else -%}
Attention: USPS is delivering {{ states.sensor.usps_mail.state }} mails today.
Attention: USPS is delivering {{ states('sensor.usps_mail') }} mails today.
{%- endif -%}
- service: notify.ios_devices
data_template:
message: "USPS will be delivering {{ states.sensor.usps_mail.state }} mail(s) today."
message: "USPS will be delivering {{ states('sensor.usps_mail') }} mail(s) today."
data:
push:
category: camera
@ -80,15 +81,17 @@ automation:
entity_id: sensor.usps_packages
condition:
- condition: template
value_template: '{{ states.sensor.usps_packages.state | int > 0 }}'
value_template: "{{ states('sensor.usps_packages') != 'unknown' }}"
- condition: template
value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}'
value_template: "{{ states('sensor.usps_packages') | int > 0 }}"
- condition: template
value_template: "{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}"
action:
- service: script.voice_notify
data_template:
message: >
{%- if states.sensor.usps_packages.state | int == 1 -%}
Attention: USPS is delivering {{ states.sensor.usps_packages.state }} package today.
{%- if states('sensor.usps_packages') | int == 1 -%}
Attention: USPS is delivering {{ states('sensor.usps_packages') }} package today.
{%- else -%}
Attention: USPS is delivering {{ states.sensor.usps_packages.state }} packages today.
Attention: USPS is delivering {{ states('sensor.usps_packages') }} packages today.
{%- endif -%}

View File

@ -58,11 +58,6 @@ homeassistant:
icon: mdi:weather-windy-variant
homebridge_hidden: true
camera:
- platform: generic
name: Ohio Doppler Weather
still_image_url: !secret ohio_doppler_weather
input_boolean:
nice_breeze_alert:
name: Nice Breeze Alert
@ -121,8 +116,8 @@ weather:
- platform: darksky
api_key: !secret darksky_api_key
openuv:
api_key: !secret openuv_apikey
# openuv:
# api_key: !secret openuv_apikey
# iqvia:
# zip_code: !secret zip_code
@ -355,13 +350,13 @@ automation:
{%- elif curState == "sleet" %}
input_boolean.sleet_alert
{%- endif %}
# - alias: Update OpenUV every hour (24 of 50 calls per day)
# trigger:
# platform: time_pattern
# minutes: "/60"
# action:
# service: openuv.update_data
- alias: Update OpenUV every hour (24 of 50 calls per day)
trigger:
platform: time_pattern
minutes: "/60"
action:
service: openuv.update_data
# Weather sensors - TBD, too lazy to create them
#
# {{ states.sun.sun.state }}

View File

@ -35,13 +35,13 @@ automation:
seconds: 00
condition:
- condition: template
value_template: '{{ states.binary_sensor.workday_sensor.state == "on" }}'
value_template: "{{ states('binary_sensor.workday_sensor') == 'on' }}"
- condition: template
value_template: "{{ now().hour|int >= 10 and now().hour|int < 17 }}"
- condition: template
value_template: '{{ states.timer.wfh_timer.state == "idle" }}'
value_template: "{{ states('timer.wfh_timer') == 'idle' }}"
- condition: template
value_template: '{{ states.device_tracker.life360_suresh.state == "home" }}'
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
action:
- service: timer.start
entity_id: timer.wfh_timer
@ -81,7 +81,7 @@ automation:
event: leave
condition:
- condition: template
value_template: '{{ states.timer.wfh_timer.state == "active" }}'
value_template: "{{ states('timer.wfh_timer') == 'active' }}"
action:
- service: timer.cancel
entity_id: timer.wfh_timer

View File

@ -107,7 +107,7 @@ automation:
message: >-
{{ trigger.entity_id.split('.')[1].split('_')[1] | title }} just left {{ trigger.zone.attributes.friendly_name }}.
{% if trigger.entity_id.split('.')[1].split('_')[1] == "suresh" and trigger.zone.attributes.friendly_name | lower == "office" %}
and will be home in {{ (states.sensor.suresh2home.state | int) + 5 }} minutes.
and will be home in {{ (states('sensor.suresh2home') | int) + 5 }} minutes.
{% endif %}
greeting: "no"
@ -154,13 +154,13 @@ automation:
seconds: "/30"
condition:
- condition: template
value_template: '{{ states.input_boolean.home_mode_away.state == "off" }}'
value_template: "{{ states('input_boolean.home_mode_away') == 'off' }}"
- condition: template
value_template: >
{% set suresh = states.device_tracker.life360_suresh.state %}
{% set mallika = states.device_tracker.life360_mallika.state %}
{% set srinika = states.device_tracker.life360_srinika.state %}
{% set hasika = states.device_tracker.life360_hasika.state %}
{% set suresh = states('device_tracker.life360_suresh') %}
{% set mallika = states('device_tracker.life360_mallika') %}
{% set srinika = states('device_tracker.life360_srinika') %}
{% set hasika = states('device_tracker.life360_hasika') %}
{% if suresh != "home" and mallika != "home" and srinika != "home" and hasika != "home" %}
True
{% else %}
@ -198,10 +198,10 @@ automation:
message: "Suresh is on his way home, he is within the 5 miles range. Should be home soon!"
- condition: template
value_template: >
{% set suresh = states.device_tracker.life360_suresh.state %}
{% set mallika = states.device_tracker.life360_mallika.state %}
{% set srinika = states.device_tracker.life360_srinika.state %}
{% set hasika = states.device_tracker.life360_hasika.state %}
{% set suresh = states('device_tracker.life360_suresh') %}
{% set mallika = states('device_tracker.life360_mallika') %}
{% set srinika = states('device_tracker.life360_srinika') %}
{% set hasika = states('device_tracker.life360_hasika') %}
{% if suresh != "home" and mallika != "home" and srinika != "home" and hasika != "home" %}
True
{% else %}

View File

@ -104,7 +104,7 @@ automation:
- service: input_label.set_value
data_template:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_battery"
value: '{{ trigger.payload_json.batt | int }}'
value: "{{ trigger.payload_json.batt | int }}"
- service: input_label.set_name
data_template:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_battery"

View File

@ -10,7 +10,6 @@
homeassistant:
customize:
# ZWave Binary Sensors
binary_sensor.aeotec_water_sensor_sensor:
friendly_name: Aeotec Water Sensor
@ -437,7 +436,6 @@ zwave:
#
###############################################################################
automation:
- alias: WallMote Button 1 Pressed
trigger:
- platform: event
@ -471,7 +469,7 @@ automation:
- service: climate.set_away_mode
data_template:
entity_id: climate.dining_room
away_mode: 'false'
away_mode: "false"
- alias: WallMote Button 4 Pressed
trigger:
@ -484,4 +482,4 @@ automation:
- service: climate.set_away_mode
data_template:
entity_id: climate.dining_room
away_mode: 'true'
away_mode: "true"

View File

@ -1,10 +1,10 @@
>
{% macro weather_update() -%}
Outside temperature is {{ states.sensor.dark_sky_apparent_temperature.state | round(0) }} degrees.
Outside temperature is {{ states('sensor.dark_sky_apparent_temperature') | round(0) }} degrees.
{%- endmacro -%}
{%- macro uv_levels() -%}
{%- set uv = states.sensor.pws_uv.state | int -%}
{%- set uv = states('sensor.pws_uv') | int -%}
{%- if uv >= 6 and uv <= 7 -%}
Current UV index is high. Please be careful outdoors.
{%- elif uv >= 8 and uv <= 10 -%}
@ -17,7 +17,7 @@
{%- endmacro -%}
{%- macro USPS() -%}
USPS is going to deliver {{ states.sensor.usps_mail.state }} mails today.
USPS is going to deliver {{ states('sensor.usps_mail') }} mails today.
{%- endmacro -%}
{%- macro alert_battery_levels() %}
@ -28,12 +28,12 @@
{%- macro tesla_status() -%}
{%- if states("sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor") != "unknown" -%}
Your Tesla car battery is at {{ states.sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor.state }} percent ({{ (states.sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor.state | int) | round(0) }} miles).
Your Tesla car battery is at {{ states('sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor') }} percent ({{ (states('sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor') | int) | round(0) }} miles).
{%- endif -%}
{%- endmacro -%}
{%- macro pollen_levels() -%}
Pollen level is {{ states.sensor.pollen_level.state }}.
Pollen level is {{ states('sensor.pollen_level') }}.
{%- endmacro -%}
{%- macro humidity_status() -%}
@ -45,13 +45,13 @@
{%- endmacro -%}
{%- macro single_car_garage_door_status() -%}
{%- if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state|lower == "on" -%}
{%- if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') |lower == "on" -%}
{{ states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.attributes.friendly_name }} is OPEN
{%- endif -%}
{%- endmacro -%}
{%- macro two_car_garage_door_status() -%}
{% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state|lower == "on" %}
{% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') |lower == "on" %}
{{ states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.attributes.friendly_name }} is OPEN
{% endif %}
{%- endmacro -%}

View File

@ -46,11 +46,11 @@
{#- Provides Home Security System Status -#}
{%- macro alarm_status() -%}
{%- if states.alarm_control_panel.simplisafe.state | lower == "disarmed" -%}
{%- if states('alarm_control_panel.simplisafe') | lower == "disarmed" -%}
Your home security system is switched OFF. You may want to turn it ON.
{%- elif states.alarm_control_panel.simplisafe.state | lower == "armed_away" -%}
{%- elif states('alarm_control_panel.simplisafe') | lower == "armed_away" -%}
Your home security system is set to away mode.
{%- elif states.alarm_control_panel.simplisafe.state | lower == "armed_home" -%}
{%- elif states('alarm_control_panel.simplisafe') | lower == "armed_home" -%}
Your home security system is ON, and your home is secured.
{%- endif %}
{%- endmacro -%}
@ -58,11 +58,11 @@
{#- Provides Trash and Recycle Reminder -#}
{%- macro trash_recycle_status() -%}
{%- set flag = false -%}
{%- if states.sensor.trash_day.state | lower == "yes" -%}
{%- if states('sensor.trash_day') | lower == "yes" -%}
Your trash will be picked up tomorrow. Did you leave the trash bin outside?.
{%- set flag = true -%}
{%- endif %}
{%- if states.sensor.recycle_day.state | lower == "yes" -%}
{%- if states('sensor.recycle_day') | lower == "yes" -%}
{%- if flag -%}
Also, your recycle stuff will be picked up tomorrow as well! Please leave both recycle bin and trash cans outside if you haven't!.
{%- else -%}
@ -76,13 +76,13 @@
Outside, it is going to be {{states('sensor.dark_sky_minutely_summary')}}.
{%- endif -%}
{%- if states('sensor.dark_sky_apparent_temperature') != "unknown" %}
The temperature outside is around {{ states.sensor.dark_sky_apparent_temperature.state | round(0)}} degrees.
The temperature outside is around {{ states('sensor.dark_sky_apparent_temperature') | round(0)}} degrees.
{%- endif -%}
{%- endmacro -%}
{%- macro pihole() -%}
{%- if states.sensor.ads_blocked_today.state|int > 100 -%}
Our internet blocking system has blocked {{states.sensor.ads_blocked_today.state}} ads today.
{%- if states('sensor.ads_blocked_today') |int > 100 -%}
Our internet blocking system has blocked {{states('sensor.ads_blocked_today') }} ads today.
{%- endif -%}
{%- endmacro -%}
@ -103,35 +103,35 @@
{#- Provides Garage Doors Status -#}
{%- macro single_car_garage_door_status() -%}
{% if states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.state|lower == "on" %}
{% if states('binary_sensor.single_car_garage_door_tilt_sensor_sensor') |lower == "on" %}
{{ states.binary_sensor.single_car_garage_door_tilt_sensor_sensor.attributes.friendly_name }} is OPEN
{% endif %}
{%- endmacro -%}
{%- macro two_car_garage_door_status() -%}
{% if states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.state|lower == "on" %}
{% if states('binary_sensor.two_car_garage_door_tilt_sensor_sensor') |lower == "on" %}
{{ states.binary_sensor.two_car_garage_door_tilt_sensor_sensor.attributes.friendly_name }} is OPEN
{% endif %}
{%- endmacro -%}
{%- macro tesla_status() %}
{%- if states("binary_sensor.tesla_model_3_5yj3e1ea8jf010610_charger_sensor") != "unknown" -%}
Your Tesla Car is {{ 'not' if states.binary_sensor.tesla_model_3_5yj3e1ea8jf010610_charger_sensor.state == "off" }} plugged in.
Your Tesla Car is {{ 'not' if states('binary_sensor.tesla_model_3_5yj3e1ea8jf010610_charger_sensor') == "off" }} plugged in.
{% endif %}
{%- if states("sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor") != "unknown" and states("sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor") != "unknown" and states('sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor') | int > 0 -%}
Tesla Car battery is at {{ states.sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor.state }}%, and you can drive about {{ (states.sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor.state | int) | round(0) }} miles.
Tesla Car battery is at {{ states('sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor') }}%, and you can drive about {{ (states.sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor.state | int) | round(0) }} miles.
{% endif %}
{%- endmacro %}
{#- Check for low humidity levels in autumn, winter and high levels during rest of the year -#}
{%- macro humidity_status() -%}
{%- if states.sensor.season.state| lower == "autumn" or states.sensor.season.state| lower == "winter" %}
{%- if states.sensor.dining_room_thermostat_humidity.state | int < 30 -%}
{%- if states('sensor.season') | lower == "autumn" or states('sensor.season') | lower == "winter" %}
{%- if states('sensor.dining_room_thermostat_humidity') | int < 30 -%}
Home humidity is less than 30%.
{%- endif -%}
{% else %}
{%- if states.sensor.dining_room_thermostat_humidity.state | default(0) | int > 60 -%}
{%- if states('sensor.dining_room_thermostat_humidity') | default(0) | int > 60 -%}
Home humidity is more than 60%.
{%- endif -%}
{%- endif -%}

View File

@ -7,13 +7,15 @@
{# Birthday notifications #}
{%- macro birthday_countdown(name, days2go) -%}
{%- if days2go == 0 -%}
{%if days2go != 'unknown' %}
{%- if days2go |int == 0 -%}
Today is {{name}}'s Birthday!. Happy Birthday to you, my dear {{name}}!!!.
{%- elif days2go == 1 -%}
{%- elif days2go |int == 1 -%}
Tomorrow is {{name}}'s Birthday! HURRAY!!!
{%- elif days2go > 1 and days2go <= 10 -%}
{%- elif days2go |int > 1 and days2go |int <= 10 -%}
{{name}}'s Birthday is in {{days2go}} days! HURRAY!!!
{%- endif -%}
{%- endif -%}
{%- endmacro -%}
{%- macro tesla_status() -%}
@ -58,7 +60,7 @@
{% else %}
{% set days2NextEvent = strptime((now().year ~ "-12-31 12:02:05"), '%Y-%m-%d %H:%M:%S').strftime('%j') | int - (now().strftime('%j') | int) + (strptime(states.calendar.suresh_kalavala.attributes.start_time, '%Y-%m-%d %H:%M:%S').strftime('%j') | int) -%}
{% endif -%}
{% if days2NextEvent <= (states.input_number.calendar_remind_before_days.state | int) %}
{% if days2NextEvent <= states('input_number.calendar_remind_before_days') | int %}
Your next event. {{ states.calendar.suresh_kalavala.attributes.message }} . starts
{% if days2NextEvent == 0 | int %}
today at {{ strptime(states.calendar.suresh_kalavala.attributes.start_time, '%Y-%m-%d %H:%M:%S').strftime('%I:%M %p') }}.
@ -83,7 +85,7 @@
{% else %}
{% set days2NextEvent = strptime((now().year ~ "-12-31 12:02:05"), '%Y-%m-%d %H:%M:%S').strftime('%j') | int - (now().strftime('%j') | int) + (strptime(states.calendar.holidays_in_india.attributes.start_time, '%Y-%m-%d %H:%M:%S').strftime('%j') | int) -%}
{% endif -%}
{% if days2NextEvent <= (states.input_number.calendar_remind_before_days.state | int) %}
{% if days2NextEvent <= (states('input_number.calendar_remind_before_days') | int) %}
{% if days2NextEvent == 0 | int %}
Today is {{ states.calendar.holidays_in_india.attributes.message | replace(".", "")}}.
{%- elif days2NextEvent == 1 %}
@ -106,7 +108,7 @@
{% else %}
{% set days2NextEvent = strptime((now().year ~ "-12-31 12:02:05"), '%Y-%m-%d %H:%M:%S').strftime('%j') | int - (now().strftime('%j') | int) + (strptime(states.calendar.holidays_in_united_states.attributes.start_time, '%Y-%m-%d %H:%M:%S').strftime('%j') | int) -%}
{% endif -%}
{% if days2NextEvent <= (states.input_number.calendar_remind_before_days.state | int) %}
{% if days2NextEvent <= (states('input_number.calendar_remind_before_days') | int) %}
{% if days2NextEvent == 0 | int %}
Today is {{ states.calendar.holidays_in_united_states.attributes.message | replace(".", "")}}.
{%- elif days2NextEvent == 1 %}
@ -161,9 +163,9 @@
{# Drone Flying Weather #}
{%- macro drone_weather() -%}
{% if states.binary_sensor.good_weather_to_fly_drones.state| lower == "on" and
states.device_tracker.life360_suresh.state == "home" and
states.sun.sun.state == "above_horizon" %}
{% if states('binary_sensor.good_weather_to_fly_drones')| lower == "on" and
states('device_tracker.life360_suresh') == "home" and
states('sun.sun') == "above_horizon" %}
It is now a great weather to fly drone outside.
{% endif %}
{%- endmacro -%}
@ -202,9 +204,9 @@
{{ USPS() }}
{{ tesla_status() }}
{{ drone_weather() }}
{{ birthday_countdown("Mallika", states.input_label.mallika_birthday_days2go.state | int ) }}
{{ birthday_countdown("Srinika", states.input_label.srinika_birthday_days2go.state | int ) }}
{{ birthday_countdown("Hasika", states.input_label.hasika_birthday_days2go.state | int ) }}
{{ birthday_countdown("Mallika", states('input_label.mallika_birthday_days2go')) }}
{{ birthday_countdown("Srinika", states('input_label.srinika_birthday_days2go')) }}
{{ birthday_countdown("Hasika", states('input_label.hasika_birthday_days2go')) }}
{%- endmacro -%}
{# Call the macro #}

View File

@ -34,10 +34,10 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="64.2" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="63.6" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="4" label="Power" units="W" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="46" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="48" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="32" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -168,7 +168,7 @@
</CommandClass>
<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="99" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="48" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -208,7 +208,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<SensorMap index="0" type="46" />
<SensorMap index="0" type="62" />
<SensorMap index="0" type="193" />
@ -216,9 +216,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="64.5" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="63.8" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="50" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="31" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" after_mark="true" innif="true">
@ -350,7 +350,7 @@
</CommandClass>
<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="49" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="30" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -390,7 +390,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<SensorMap index="0" type="255" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1">
@ -415,7 +415,7 @@
<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="1" label="Alarm Level" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="2" label="SourceNodeId" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="9" label="Access Control" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="22" />
<Value type="byte" genre="user" instance="1" index="9" label="Access Control" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="23" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="11" label="Power Management" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
</CommandClass>
@ -574,7 +574,7 @@
</CommandClass>
<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="100" />
<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="99" />
</CommandClass>
<CommandClass id="132" name="COMMAND_CLASS_WAKE_UP" version="2" request_flags="2" innif="true">
<Instance index="1" />
@ -728,9 +728,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="69.2" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="67.9" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="51" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="35" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" innif="true">
@ -984,7 +984,7 @@
</CommandClass>
<CommandClass id="37" name="COMMAND_CLASS_SWITCH_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Switch" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<Value type="bool" genre="user" instance="1" index="0" label="Switch" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
</CommandClass>
<CommandClass id="38" name="COMMAND_CLASS_SWITCH_MULTILEVEL" version="2" innif="true">
<Instance index="1" />
@ -1006,12 +1006,12 @@
</CommandClass>
<CommandClass id="50" name="COMMAND_CLASS_METER" version="3" request_flags="2" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="0" label="Energy" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="51.930" />
<Value type="decimal" genre="user" instance="1" index="1" label="Previous Reading" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="51.923" />
<Value type="decimal" genre="user" instance="1" index="0" label="Energy" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="53.036" />
<Value type="decimal" genre="user" instance="1" index="1" label="Previous Reading" units="kWh" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="52.609" />
<Value type="int" genre="user" instance="1" index="2" label="Interval" units="seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="65535" />
<Value type="decimal" genre="user" instance="1" index="8" label="Power" units="W" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="12.922" />
<Value type="decimal" genre="user" instance="1" index="16" label="Voltage" units="V" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="122.486" />
<Value type="decimal" genre="user" instance="1" index="20" label="Current" units="A" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.114" />
<Value type="decimal" genre="user" instance="1" index="8" label="Power" units="W" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="12.274" />
<Value type="decimal" genre="user" instance="1" index="16" label="Voltage" units="V" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="123.389" />
<Value type="decimal" genre="user" instance="1" index="20" label="Current" units="A" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.179" />
<Value type="bool" genre="user" instance="1" index="32" label="Exporting" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<Value type="button" genre="system" instance="1" index="33" label="Reset" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
</CommandClass>
@ -1190,8 +1190,8 @@
<Item label="Saturday" value="6" />
<Item label="Sunday" value="7" />
</Value>
<Value type="byte" genre="user" instance="1" index="1" label="Hour" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="10" />
<Value type="byte" genre="user" instance="1" index="2" label="Minute" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="33" />
<Value type="byte" genre="user" instance="1" index="1" label="Hour" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="1" />
<Value type="byte" genre="user" instance="1" index="2" label="Minute" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="45" />
</CommandClass>
<CommandClass id="130" name="COMMAND_CLASS_HAIL" version="1" request_flags="4" after_mark="true" innif="true">
<Instance index="1" />
@ -1339,7 +1339,7 @@
</CommandClass>
<CommandClass id="48" name="COMMAND_CLASS_SENSOR_BINARY" version="1" request_flags="4" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
<Value type="bool" genre="user" instance="1" index="0" label="Sensor" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
<SensorMap index="0" type="255" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1">
@ -1369,7 +1369,7 @@
<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="1" label="Alarm Level" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="2" label="SourceNodeId" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="8" />
<Value type="byte" genre="user" instance="1" index="11" label="Power Management" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
</CommandClass>
<CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="4" innif="true">
@ -2038,7 +2038,7 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="7" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="69.62" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="66.02" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="4" innif="true">
<Instance index="1" />
@ -2238,7 +2238,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="31" name="Aeotec Water Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3079" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Node id="31" name="Aeotec Water Sensor" location="" basic="4" generic="7" specific="1" roletype="6" devicetype="3079" nodetype="0" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="86" name="Aeotec">
<Product type="102" id="7a" name="Unknown: type=0102, id=007a" />
</Manufacturer>
@ -2253,7 +2253,7 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" request_flags="1" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="C" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="17.6" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="62.6" />
</CommandClass>
<CommandClass id="90" name="COMMAND_CLASS_DEVICE_RESET_LOCALLY" version="1" request_flags="5" innif="true">
<Instance index="1" />
@ -2405,9 +2405,9 @@
</CommandClass>
<CommandClass id="49" name="COMMAND_CLASS_SENSOR_MULTILEVEL" version="5" innif="true">
<Instance index="1" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="69.8" />
<Value type="decimal" genre="user" instance="1" index="1" label="Temperature" units="F" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="69.4" />
<Value type="decimal" genre="user" instance="1" index="3" label="Luminance" units="lux" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="49" />
<Value type="decimal" genre="user" instance="1" index="5" label="Relative Humidity" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="34" />
<Value type="decimal" genre="user" instance="1" index="27" label="Ultraviolet" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0" />
<Value type="decimal" genre="user" instance="1" index="37" label="Radon Concentration" units="bq/m3" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="60" />
</CommandClass>
@ -2580,7 +2580,7 @@
<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="1" label="Alarm Level" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="2" label="SourceNodeId" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="254" />
</CommandClass>
<CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="4" innif="true">
<Instance index="1" />
@ -2666,7 +2666,7 @@
</CommandClass>
</CommandClasses>
</Node>
<Node id="38" name="" location="" basic="4" generic="7" specific="1" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Session">
<Node id="38" name="" location="" basic="4" generic="7" specific="1" type="Notification Sensor" listening="false" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="CacheLoad">
<Manufacturer id="0" name="">
<Product type="0" id="0" name="" />
</Manufacturer>