micor changes and clean up.
This commit is contained in:
parent
a3c869e9e8
commit
87961b393c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
# # @package : APC UPS Backup
|
||||
# # @description : UPS Backup
|
||||
# ###############################################################################
|
||||
apcupsd:
|
||||
apcupsd:
|
||||
host: 127.0.0.1
|
||||
port: 3551
|
||||
|
||||
sensor:
|
||||
sensor:
|
||||
- platform: apcupsd
|
||||
# name: Network Backup UPS
|
||||
resources:
|
||||
|
@ -31,8 +31,7 @@
|
|||
#
|
||||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
automation:
|
||||
- alias: UPS State Change
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -45,34 +44,34 @@
|
|||
to {{ trigger.to_state.state }}
|
||||
at {{ as_timestamp(now()) | timestamp_custom('%I:%M:%S %p, %B %d,%Y', true) }}."
|
||||
|
||||
# # Power Failure Notification
|
||||
# ###############################################################################
|
||||
# # Power Failure Notification
|
||||
# ###############################################################################
|
||||
- alias: Power Failure
|
||||
initial_state: true
|
||||
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
|
||||
# ###############################################################################
|
||||
# # Power Restored Notification
|
||||
# ###############################################################################
|
||||
- alias: Power Restored
|
||||
initial_state: true
|
||||
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.
|
||||
|
|
|
@ -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,17 +26,16 @@ timer:
|
|||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
#
|
||||
# Automations to start timer when they are switched ON
|
||||
#
|
||||
#
|
||||
# Automations to start timer when they are switched ON
|
||||
#
|
||||
- alias: Bathroom Aroma Timer Start
|
||||
initial_state: true
|
||||
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,15 +89,15 @@ 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
|
||||
|
||||
#
|
||||
# Timer Elapsed Events
|
||||
#
|
||||
#
|
||||
# Timer Elapsed Events
|
||||
#
|
||||
- alias: Bathroom Aroma Timer Elapsed
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -132,15 +131,15 @@ automation:
|
|||
- service: switch.turn_off
|
||||
entity_id: switch.upstairs_fragrance
|
||||
|
||||
#
|
||||
# Turn ON fragrance outlets automatically at specific times of the day
|
||||
#
|
||||
#
|
||||
# Turn ON fragrance outlets automatically at specific times of the day
|
||||
#
|
||||
- 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
|
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
homeassistant:
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "Master Bed Sensor"
|
||||
|
|
|
@ -61,10 +61,9 @@ input_label:
|
|||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
###############################################################################
|
||||
# Build the excitement
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Build the excitement
|
||||
###############################################################################
|
||||
- alias: Birthday Countdown 30 Days
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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:
|
||||
|
@ -84,9 +83,9 @@ automation:
|
|||
data_template:
|
||||
message: "{{ trigger.entity_id.split('.')[1].split('_')[0] | title }}'s Birthday is only {{ trigger.to_state.state }} days to go!"
|
||||
|
||||
###############################################################################
|
||||
# Celebrate Birthday!!!
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Celebrate Birthday!!!
|
||||
###############################################################################
|
||||
- alias: Today is the Birthday
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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:
|
||||
|
@ -106,14 +105,14 @@ automation:
|
|||
data_template:
|
||||
message: "Hurray! Today is {{ trigger.entity_id.split('.')[1].split('_')[0] | title }}'s Birthday!"
|
||||
|
||||
###############################################################################
|
||||
# Announce Happy Birthday message every hour starting 7 am until 9 PM
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Announce Happy Birthday message every hour starting 7 am until 9 PM
|
||||
###############################################################################
|
||||
- alias: Random Birthday Wishes
|
||||
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 }}
|
||||
|
|
|
@ -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!"
|
||||
|
|
|
@ -1,409 +1,409 @@
|
|||
#
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# # 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:
|
||||
# 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
|
||||
# ##
|
||||
# #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:
|
||||
# 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:
|
||||
# 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:
|
||||
# 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
|
||||
# - 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.
|
||||
# ###########################################################################################################################
|
||||
# # ###########################################################################################################################
|
||||
# # # 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.
|
||||
# # ###########################################################################################################################
|
||||
|
||||
# - 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
|
||||
# # - 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
|
||||
|
||||
# - 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:
|
||||
# # 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:
|
||||
# # 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:
|
||||
# # 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
|
||||
# # - 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:
|
||||
# automation:
|
||||
|
||||
- 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 }}.
|
||||
# - 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 }}.
|
||||
|
||||
# - 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 }}.
|
||||
# # - 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.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"
|
||||
# #
|
||||
# # 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"
|
||||
# # - service: image_processing.scan
|
||||
# # data_template:
|
||||
# # entity_id: "image_processing.tagbox_{{- trigger.entity_id.split('.')[1].split('_')[0] -}}_camera"
|
||||
|
|
|
@ -6,64 +6,63 @@
|
|||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
# ÛÛÛÛÛÛ ÛÛÛÛÛÛ ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ ÛÛÛÛÛÛ °°°
|
||||
# °ÛÛÛ°ÛÛÛÛÛ°ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ
|
||||
# °ÛÛÛ°°ÛÛÛ °ÛÛÛ ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ °°ÛÛÛ °°ÛÛÛ°°ÛÛÛ ÛÛÛ°°ÛÛÛ
|
||||
# °ÛÛÛ °°° °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °°° °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# ÛÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛÛ
|
||||
# °°°°° °°°°° °°°°°° °°°°° °°°° °°°°° °°°°° °°°° °°°°° °°°°°ÛÛÛ
|
||||
# ÛÛÛ °ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ
|
||||
# °°°°°°
|
||||
###############################################################################
|
||||
# Turn Indoor lights ON only during weekdays
|
||||
###############################################################################
|
||||
# ÛÛÛÛÛÛ ÛÛÛÛÛÛ ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ ÛÛÛÛÛÛ °°°
|
||||
# °ÛÛÛ°ÛÛÛÛÛ°ÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ
|
||||
# °ÛÛÛ°°ÛÛÛ °ÛÛÛ ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ °°ÛÛÛ °°ÛÛÛ°°ÛÛÛ ÛÛÛ°°ÛÛÛ
|
||||
# °ÛÛÛ °°° °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °°° °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# ÛÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛÛ
|
||||
# °°°°° °°°°° °°°°°° °°°°° °°°° °°°°° °°°°° °°°° °°°°° °°°°°ÛÛÛ
|
||||
# ÛÛÛ °ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ
|
||||
# °°°°°°
|
||||
###############################################################################
|
||||
# Turn Indoor lights ON only during weekdays
|
||||
###############################################################################
|
||||
- alias: Morning Indoor Lights ON
|
||||
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:
|
||||
entity_id: switch.kitchen
|
||||
|
||||
###############################################################################
|
||||
# Turn ON Master Bedroom lights ON in the morning
|
||||
# Turn On Bedroom Lights 10 minutes after wake up time
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Turn ON Master Bedroom lights ON in the morning
|
||||
# Turn On Bedroom Lights 10 minutes after wake up time
|
||||
###############################################################################
|
||||
- alias: Morning Master Bedroom Lights ON (Mallika)
|
||||
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,113 +75,113 @@ 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:
|
||||
entity_id: light.master_bedroom_2
|
||||
|
||||
###############################################################################
|
||||
# Turn off outdoor lights 15 minutes after sunrise
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Turn off outdoor lights 15 minutes after sunrise
|
||||
###############################################################################
|
||||
- alias: Morning Outdoor Lights OFF
|
||||
initial_state: true
|
||||
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
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.wemobackyardlightswitch
|
||||
|
||||
###############################################################################
|
||||
# Turn OF Kitchen Lights after 3 hours of wake up time during school/work days
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Turn OF Kitchen Lights after 3 hours of wake up time during school/work days
|
||||
###############################################################################
|
||||
- alias: Morning Kitchen Light OFF
|
||||
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
|
||||
|
||||
# ÛÛÛÛÛÛÛÛÛÛ ÛÛÛ
|
||||
# °°ÛÛÛ°°°°°Û °°°
|
||||
# °ÛÛÛ Û ° ÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ
|
||||
# °ÛÛÛÛÛÛ °°ÛÛÛ °°ÛÛÛ ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ °°ÛÛÛ °°ÛÛÛ°°ÛÛÛ ÛÛÛ°°ÛÛÛ
|
||||
# °ÛÛÛ°°Û °ÛÛÛ °ÛÛÛ °ÛÛÛÛÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# °ÛÛÛ ° Û °°ÛÛÛ ÛÛÛ °ÛÛÛ°°° °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# ÛÛÛÛÛÛÛÛÛÛ °°ÛÛÛÛÛ °°ÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛÛ
|
||||
# °°°°°°°°°° °°°°° °°°°°° °°°° °°°°° °°°°° °°°° °°°°° °°°°°ÛÛÛ
|
||||
# ÛÛÛ °ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ
|
||||
# °°°°°°
|
||||
###############################################################################
|
||||
# Turn outdoor lights on 15 minutes before sunset
|
||||
###############################################################################
|
||||
# ÛÛÛÛÛÛÛÛÛÛ ÛÛÛ
|
||||
# °°ÛÛÛ°°°°°Û °°°
|
||||
# °ÛÛÛ Û ° ÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ
|
||||
# °ÛÛÛÛÛÛ °°ÛÛÛ °°ÛÛÛ ÛÛÛ°°ÛÛÛ°°ÛÛÛ°°ÛÛÛ °°ÛÛÛ °°ÛÛÛ°°ÛÛÛ ÛÛÛ°°ÛÛÛ
|
||||
# °ÛÛÛ°°Û °ÛÛÛ °ÛÛÛ °ÛÛÛÛÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# °ÛÛÛ ° Û °°ÛÛÛ ÛÛÛ °ÛÛÛ°°° °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# ÛÛÛÛÛÛÛÛÛÛ °°ÛÛÛÛÛ °°ÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛÛ
|
||||
# °°°°°°°°°° °°°°° °°°°°° °°°° °°°°° °°°°° °°°° °°°°° °°°°°ÛÛÛ
|
||||
# ÛÛÛ °ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ
|
||||
# °°°°°°
|
||||
###############################################################################
|
||||
# Turn outdoor lights on 15 minutes before sunset
|
||||
###############################################################################
|
||||
- alias: Evening Outdoor Lights ON (At Sunset)
|
||||
initial_state: true
|
||||
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
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.wemobackyardlightswitch
|
||||
|
||||
###############################################################################
|
||||
# Turn indoor lights on 30 minutes before sunset
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Turn indoor lights on 30 minutes before sunset
|
||||
###############################################################################
|
||||
- alias: Evening Indoor Lights ON Before Sunset
|
||||
initial_state: true
|
||||
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:
|
||||
|
@ -220,37 +219,37 @@ automation:
|
|||
- service: switch.turn_on
|
||||
entity_id: switch.kids_bed_accent
|
||||
|
||||
# ÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ °°ÛÛÛ °°° °°ÛÛÛ °°ÛÛÛ
|
||||
# °ÛÛÛ°ÛÛÛ °ÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛ °ÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ
|
||||
# °ÛÛÛ°°ÛÛÛ°ÛÛÛ °°ÛÛÛ ÛÛÛ°°ÛÛÛ °ÛÛÛ°°ÛÛÛ °°°ÛÛÛ°
|
||||
# °ÛÛÛ °°ÛÛÛÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# °ÛÛÛ °°ÛÛÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ ÛÛÛ
|
||||
# ÛÛÛÛÛ °°ÛÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ °°ÛÛÛÛÛ
|
||||
# °°°°° °°°°° °°°°° °°°°°ÛÛÛ°°°° °°°°° °°°°°
|
||||
# ÛÛÛ °ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ
|
||||
# °°°°°°
|
||||
###############################################################################
|
||||
# Set the mood for bed time - Dim Family Room lights if they are ON
|
||||
###############################################################################
|
||||
# ÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ °°ÛÛÛ °°° °°ÛÛÛ °°ÛÛÛ
|
||||
# °ÛÛÛ°ÛÛÛ °ÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛ °ÛÛÛÛÛÛÛ ÛÛÛÛÛÛÛ
|
||||
# °ÛÛÛ°°ÛÛÛ°ÛÛÛ °°ÛÛÛ ÛÛÛ°°ÛÛÛ °ÛÛÛ°°ÛÛÛ °°°ÛÛÛ°
|
||||
# °ÛÛÛ °°ÛÛÛÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ
|
||||
# °ÛÛÛ °°ÛÛÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ °ÛÛÛ ÛÛÛ
|
||||
# ÛÛÛÛÛ °°ÛÛÛÛÛ ÛÛÛÛÛ°°ÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ °°ÛÛÛÛÛ
|
||||
# °°°°° °°°°° °°°°° °°°°°ÛÛÛ°°°° °°°°° °°°°°
|
||||
# ÛÛÛ °ÛÛÛ
|
||||
# °°ÛÛÛÛÛÛ
|
||||
# °°°°°°
|
||||
###############################################################################
|
||||
# Set the mood for bed time - Dim Family Room lights if they are ON
|
||||
###############################################################################
|
||||
- alias: Night Dim TV Lights
|
||||
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:
|
||||
|
@ -259,41 +258,41 @@ automation:
|
|||
color_temp: 154
|
||||
transition: 15
|
||||
|
||||
###############################################################################
|
||||
# TURN INDOOR LIGHTS OFF AFTER BED TIME
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# TURN INDOOR LIGHTS OFF AFTER BED TIME
|
||||
###############################################################################
|
||||
- alias: Night Turn Lights Off
|
||||
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
|
||||
data:
|
||||
message: "It is bed time, turned lights off!"
|
||||
|
||||
###############################################################################
|
||||
# Provide Bed time Report via TTS
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Provide Bed time Report via TTS
|
||||
###############################################################################
|
||||
- alias: Night Bedtime Report
|
||||
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:
|
||||
|
|
|
@ -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,22 +120,22 @@ 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
|
||||
|
||||
################################################################################
|
||||
# Notifies when either of the garage door is opened or closed
|
||||
# When the garage is opened, it sends an actionable ios notification with an
|
||||
# option to close the garage door. This iso actionable notification only occurs
|
||||
# when garage door is open and not when it is closed.
|
||||
###############################################################################
|
||||
################################################################################
|
||||
# Notifies when either of the garage door is opened or closed
|
||||
# When the garage is opened, it sends an actionable ios notification with an
|
||||
# option to close the garage door. This iso actionable notification only occurs
|
||||
# when garage door is open and not when it is closed.
|
||||
###############################################################################
|
||||
- alias: Notify Garage Door Status
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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:
|
||||
|
@ -219,18 +219,18 @@ automation:
|
|||
data:
|
||||
entity_id: switch.garage
|
||||
|
||||
################################################################################
|
||||
# When I open the garage door
|
||||
# if it is dark outside, OR
|
||||
# both the garage doors are closed
|
||||
# ==> turn the Garage lights ON, and start timer!
|
||||
################################################################################
|
||||
################################################################################
|
||||
# When I open the garage door
|
||||
# if it is dark outside, OR
|
||||
# both the garage doors are closed
|
||||
# ==> turn the Garage lights ON, and start timer!
|
||||
################################################################################
|
||||
- alias: Garage Lights On When Door is Opened
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.garage_door_sensor_sensor
|
||||
to: 'on'
|
||||
to: "on"
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
|
@ -239,17 +239,17 @@ 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
|
||||
- service: timer.start
|
||||
entity_id: timer.timer_garage
|
||||
|
||||
# Notify Entry Door Status
|
||||
###############################################################################
|
||||
# Notify Entry Door Status
|
||||
###############################################################################
|
||||
- alias: Notify Entry Door Status
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -266,33 +266,33 @@ 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
|
||||
{% endif %}
|
||||
|
||||
# Turn ON and OFF basement ambient lights
|
||||
###############################################################################
|
||||
# Turn ON and OFF basement ambient lights
|
||||
###############################################################################
|
||||
- alias: Basement Accent Lights ON When Basement Door Opened
|
||||
initial_state: true
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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') }}'
|
||||
|
|
|
@ -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 -%}
|
||||
|
|
|
@ -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,9 +86,8 @@ sensor:
|
|||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
# Notify me when I get a new public IP from my ISP
|
||||
######################################################
|
||||
# Notify me when I get a new public IP from my ISP
|
||||
######################################################
|
||||
|
||||
- alias: Notify Of New External IP
|
||||
initial_state: true
|
||||
|
@ -127,7 +115,7 @@ automation:
|
|||
entity_id: updater.updater
|
||||
action:
|
||||
- service: script.notify_me
|
||||
data: {"message":"New HASS update is available. Please update!"}
|
||||
data: { "message": "New HASS update is available. Please update!" }
|
||||
|
||||
- alias: Remind domain renewal
|
||||
initial_state: true
|
||||
|
@ -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."
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
homeassistant:
|
||||
customize_domain:
|
||||
|
||||
alarm_control_panel:
|
||||
homebridge_hidden: true
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
###############################################################################
|
||||
homeassistant:
|
||||
customize:
|
||||
|
||||
switch.frontyard_light:
|
||||
icon: mdi:lightbulb
|
||||
friendly_name: Front Porch Lights
|
||||
|
@ -123,8 +122,7 @@ hue:
|
|||
tplink:
|
||||
discovery: false
|
||||
switch:
|
||||
|
||||
# In-wall switches
|
||||
# In-wall switches
|
||||
- host: !secret tplink_kids_bedroom
|
||||
- host: !secret tplink_guest_bedroom_1
|
||||
- host: !secret tplink_guest_bedroom_2
|
||||
|
@ -134,7 +132,7 @@ tplink:
|
|||
- host: !secret tplink_kitchen
|
||||
- host: !secret tplink_office_room
|
||||
|
||||
# Smart Outlets
|
||||
# Smart Outlets
|
||||
- host: !secret tplink_smart_outlet1
|
||||
#name: Downstairs Fragrance Outlet
|
||||
- host: !secret tplink_smart_outlet2
|
||||
|
@ -146,40 +144,40 @@ tplink:
|
|||
|
||||
switch:
|
||||
# RF Switches
|
||||
# - platform: mqtt
|
||||
# name: RF Switch One
|
||||
# command_topic: '/home/rfswitches/switch_one'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
# - platform: mqtt
|
||||
# name: RF Switch One
|
||||
# command_topic: '/home/rfswitches/switch_one'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Two
|
||||
# command_topic: '/home/rfswitches/switch_two'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Two
|
||||
# command_topic: '/home/rfswitches/switch_two'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Three
|
||||
# command_topic: '/home/rfswitches/switch_three'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Three
|
||||
# command_topic: '/home/rfswitches/switch_three'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Four
|
||||
# command_topic: '/home/rfswitches/switch_four'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Four
|
||||
# command_topic: '/home/rfswitches/switch_four'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Five
|
||||
# command_topic: '/home/rfswitches/switch_five'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
# - platform: mqtt
|
||||
# name: RF Switch Five
|
||||
# command_topic: '/home/rfswitches/switch_five'
|
||||
# payload_on: "on"
|
||||
# payload_off: "off"
|
||||
# retain: true
|
||||
|
||||
wemo:
|
||||
discovery: false
|
||||
|
@ -210,7 +208,7 @@ script:
|
|||
data:
|
||||
entity_id: light.gateway_light_34ce008ad65d
|
||||
brightness: 255
|
||||
rgb_color: [255,0,0]
|
||||
rgb_color: [255, 0, 0]
|
||||
|
||||
xiaomi_blue:
|
||||
sequence:
|
||||
|
@ -218,7 +216,7 @@ script:
|
|||
data:
|
||||
entity_id: light.gateway_light_34ce008ad65d
|
||||
brightness: 255
|
||||
rgb_color: [0,0,255]
|
||||
rgb_color: [0, 0, 255]
|
||||
|
||||
xiaomi_green:
|
||||
sequence:
|
||||
|
@ -226,7 +224,7 @@ script:
|
|||
data:
|
||||
entity_id: light.gateway_light_34ce008ad65d
|
||||
brightness: 255
|
||||
rgb_color: [0,255,0]
|
||||
rgb_color: [0, 255, 0]
|
||||
|
||||
# start_colorloop:
|
||||
# sequence:
|
||||
|
@ -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
|
||||
###############################################################################
|
||||
# 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,45 +274,48 @@ 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
|
||||
###############################################################################
|
||||
# Restore Master Bedroom Lights
|
||||
###############################################################################
|
||||
- alias: Restore Masterbedroom Lights
|
||||
initial_state: true
|
||||
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:
|
||||
entity_id: group.master_bedroom_lights
|
||||
transition: 5
|
||||
rgb_color: [224,175,102]
|
||||
rgb_color: [224, 175, 102]
|
||||
brightness: 10
|
||||
color_temp: 366
|
||||
|
||||
# Animate Familyroom Lights
|
||||
###############################################################################
|
||||
# Animate Familyroom Lights
|
||||
###############################################################################
|
||||
- alias: Animate Familyroom Lights
|
||||
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,22 +324,25 @@ 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
|
||||
###############################################################################
|
||||
# Restore Familyroom Lights
|
||||
###############################################################################
|
||||
- alias: Restore Familyroom Lights
|
||||
initial_state: true
|
||||
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:
|
||||
|
@ -350,8 +352,8 @@ automation:
|
|||
brightness: 255
|
||||
color_temp: 162
|
||||
|
||||
# Animate Kitchen Lights ON
|
||||
###############################################################################
|
||||
# Animate Kitchen Lights ON
|
||||
###############################################################################
|
||||
# - alias: Animate Kitchen Lights ON
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
|
@ -371,8 +373,8 @@ automation:
|
|||
# brightness: 255
|
||||
# transition: '{{ (range(1, 2)|random) }}'
|
||||
|
||||
# Animate Kitchen Lights OFF
|
||||
###############################################################################
|
||||
# Animate Kitchen Lights OFF
|
||||
###############################################################################
|
||||
# - alias: Animate Kitchen Lights OFF
|
||||
# initial_state: true
|
||||
# trigger:
|
||||
|
@ -387,19 +389,19 @@ automation:
|
|||
# brightness: 255
|
||||
# color_temp: 155
|
||||
|
||||
# Long Flash All Lights
|
||||
###############################################################################
|
||||
# Long Flash All Lights
|
||||
###############################################################################
|
||||
- alias: Long Flash All Lights
|
||||
initial_state: true
|
||||
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:
|
||||
|
@ -409,19 +411,19 @@ automation:
|
|||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.long_flash
|
||||
|
||||
# Short Flash All Lights
|
||||
###############################################################################
|
||||
# Short Flash All Lights
|
||||
###############################################################################
|
||||
- alias: Short Flash All Lights
|
||||
initial_state: true
|
||||
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:
|
||||
|
|
|
@ -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") }}'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,107 +48,75 @@ timer:
|
|||
###############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
# Office Room:
|
||||
# Motion Detected - Turn ON the light and extend timer
|
||||
###############################################################################
|
||||
# Office Room:
|
||||
# Motion Detected - Turn ON the light and extend timer
|
||||
###############################################################################
|
||||
- alias: Officeroom Motion & Timer
|
||||
initial_state: true
|
||||
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
|
||||
|
||||
# Front Room:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
# Front Room:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
- 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
|
||||
###############################################################################
|
||||
# Kitchen:
|
||||
# Motion Detected - Turn ON the light and extend timer
|
||||
###############################################################################
|
||||
- alias: Kitchen Motion & Timer
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -157,21 +125,20 @@ 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
|
||||
###############################################################################
|
||||
# Kitchen:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
- alias: Kitchen Timer Elapsed
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -182,19 +149,19 @@ 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
|
||||
###############################################################################
|
||||
# Family Room:
|
||||
# Motion Detected - When TV is OFF, turn ON the light 100% and extend timer
|
||||
###############################################################################
|
||||
- alias: Family Room Motion & Timer
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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,120 +191,114 @@ automation:
|
|||
transition: 5
|
||||
- service: timer.start
|
||||
entity_id: timer.timer_familyroom
|
||||
|
||||
# Family Room:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
# Family Room:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
- alias: Family Room Timer Elapsed
|
||||
initial_state: true
|
||||
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
|
||||
###############################################################################
|
||||
# Master Bedroom:
|
||||
# Motion Detected - Turn ON the lights and extend timer
|
||||
###############################################################################
|
||||
- alias: Master Bedroom Motion & Timer
|
||||
initial_state: true
|
||||
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:
|
||||
entity_id: light.master_bedroom_1
|
||||
rgb_color: [224,175,102]
|
||||
rgb_color: [224, 175, 102]
|
||||
brightness: 10
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id: light.master_bedroom_2
|
||||
rgb_color: [224,175,102]
|
||||
rgb_color: [224, 175, 102]
|
||||
brightness: 10
|
||||
- service: timer.start
|
||||
entity_id: timer.timer_masterbedroom
|
||||
|
||||
# Master Bedroom:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
# Master Bedroom:
|
||||
# Timer Elapsed - Turn OFF lights
|
||||
###############################################################################
|
||||
- alias: Master Bedroom Timer Elapsed
|
||||
initial_state: true
|
||||
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
|
||||
#
|
||||
# Added a condition - if the lights were just turn off in the last 30 seconds,
|
||||
# do not turn ON the lights again
|
||||
###############################################################################
|
||||
# Garage:
|
||||
# Motion Detected - Turn ON the light and extend timer
|
||||
#
|
||||
# Added a condition - if the lights were just turn off in the last 30 seconds,
|
||||
# do not turn ON the lights again
|
||||
###############################################################################
|
||||
- alias: Garage Motion & Timer
|
||||
initial_state: true
|
||||
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
|
||||
###############################################################################
|
||||
# Start the timer when the lights are ON
|
||||
###############################################################################
|
||||
- alias: Garage Timer Start When Garage Lights ON
|
||||
initial_state: true
|
||||
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"
|
||||
###############################################################################
|
||||
# Garage:
|
||||
# Timer Elapsed - Turn OFF lights, when "I am not working"
|
||||
###############################################################################
|
||||
- alias: Garage Timer Elapsed
|
||||
initial_state: true
|
||||
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
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
###############################################################################
|
||||
homeassistant:
|
||||
customize:
|
||||
|
||||
group.tts_announcements:
|
||||
order: 52
|
||||
|
||||
|
@ -67,15 +66,14 @@ 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
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Notify Related Scripts
|
||||
###############################################################################
|
||||
ifttt_notify:
|
||||
sequence:
|
||||
- condition: template
|
||||
|
@ -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
|
||||
|
@ -112,38 +110,38 @@ script:
|
|||
data_template:
|
||||
message: !include ../templates/goodnight.yaml
|
||||
|
||||
###############################################################################
|
||||
# Voice Notify
|
||||
# Conditions:
|
||||
# => Only Announce when people are home. Except in emergency mode!
|
||||
# => Only Announce when Music is NOT being played
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Voice Notify
|
||||
# Conditions:
|
||||
# => Only Announce when people are home. Except in emergency mode!
|
||||
# => Only Announce when Music is NOT being played
|
||||
###############################################################################
|
||||
voice_notify:
|
||||
sequence:
|
||||
- condition: template
|
||||
value_template: '{{ states.input_boolean.voice_notifications.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
|
||||
|
@ -196,9 +194,9 @@ script:
|
|||
{% set msg = msg + " </speak>" %}
|
||||
{{ msg }}
|
||||
|
||||
###############################################################################
|
||||
# Greeting
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Greeting
|
||||
###############################################################################
|
||||
voice_greeting:
|
||||
sequence:
|
||||
- service: tts.amazon_polly_say
|
||||
|
@ -224,9 +222,9 @@ script:
|
|||
{% set msg = msg + " </speak>" %}
|
||||
{{ msg }}
|
||||
|
||||
###############################################################################
|
||||
# Status around the house
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# Status around the house
|
||||
###############################################################################
|
||||
home_status:
|
||||
sequence:
|
||||
- service: script.voice_notify
|
||||
|
|
|
@ -56,8 +56,7 @@ input_select:
|
|||
icon: mdi:pig
|
||||
|
||||
sensor:
|
||||
|
||||
## WiFi Information related sensors
|
||||
## WiFi Information related sensors
|
||||
- platform: mqtt
|
||||
state_topic: "/wifi/pi_basement"
|
||||
name: Basement Pi Signal Level
|
||||
|
@ -148,7 +147,7 @@ sensor:
|
|||
name: Master Bedroom Pi Link Quality
|
||||
value_template: '{{ value_json["Link Quality"]}}'
|
||||
|
||||
## Disk Information related Sensors
|
||||
## Disk Information related Sensors
|
||||
- platform: mqtt
|
||||
state_topic: "/disk/pi_basement"
|
||||
name: Basement Pi Available Disk
|
||||
|
@ -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,160 +330,160 @@ 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
|
||||
|
||||
# Script to Query Disk Information - Publishes message 'CMD_REPORT_WIFI_DETAILS'
|
||||
# to MQTT, so that the message gets received by individual Raspberry Pi
|
||||
###############################################################################
|
||||
# Script to Query Disk Information - Publishes message 'CMD_REPORT_WIFI_DETAILS'
|
||||
# to MQTT, so that the message gets received by individual Raspberry Pi
|
||||
###############################################################################
|
||||
query_wifi_info:
|
||||
sequence:
|
||||
- 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'
|
||||
# to MQTT, so that the message gets received by individual Raspberry Pi
|
||||
###############################################################################
|
||||
# Script to Query Disk Information - Publishes message 'CMD_REPORT_DISK_DETAILS'
|
||||
# to MQTT, so that the message gets received by individual Raspberry Pi
|
||||
###############################################################################
|
||||
query_disk_info:
|
||||
sequence:
|
||||
- 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,35 +499,34 @@ 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
|
||||
###############################################################################
|
||||
# Queries WiFi Signal Level and Link Quality - it loads during startup, and
|
||||
# updates once every 30 minutes
|
||||
###############################################################################
|
||||
- alias: Query RPi Wifi Data
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: '/30'
|
||||
minutes: "/30"
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: script.query_wifi_info
|
||||
|
||||
# Queries Disk Available and % Used - it loads during startup, and
|
||||
# updates once every 30 minutes
|
||||
###############################################################################
|
||||
# Queries Disk Available and % Used - it loads during startup, and
|
||||
# updates once every 30 minutes
|
||||
###############################################################################
|
||||
- alias: Query RPi Disk Data
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: '/30'
|
||||
minutes: "/30"
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: script.query_disk_info
|
||||
|
||||
# Issues commands to Raspberry Pi via MQTT - On Demand
|
||||
###############################################################################
|
||||
# Issues commands to Raspberry Pi via MQTT - On Demand
|
||||
###############################################################################
|
||||
- alias: Raspberry Pi Command
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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
|
||||
|
|
|
@ -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 }}"
|
||||
|
||||
###############################################################################
|
||||
# _ _ _
|
||||
|
|
|
@ -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') }}'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1007,4 +1007,3 @@
|
|||
# data_template:
|
||||
# entity_id: climate.cooler_fan
|
||||
# temperature: "{{ states.climate.main_floor.temperature |float }}"
|
||||
|
||||
|
|
|
@ -37,10 +37,9 @@ input_number:
|
|||
step: 0.1
|
||||
|
||||
automation:
|
||||
|
||||
###############################################################################
|
||||
# The text entered in the text box will be announced in the house
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# The text entered in the text box will be announced in the house
|
||||
###############################################################################
|
||||
- alias: Text Changed Event
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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' }}"
|
||||
|
|
|
@ -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,9 +38,8 @@ camera:
|
|||
#
|
||||
###############################################################################
|
||||
automation:
|
||||
|
||||
# Notify USPS mails via TTS, and iOS notification with attachment
|
||||
###############################################################################
|
||||
# Notify USPS mails via TTS, and iOS notification with attachment
|
||||
###############################################################################
|
||||
- alias: Notify USPS Mail
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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
|
||||
|
@ -71,8 +72,8 @@ automation:
|
|||
url: "{{ state_attr('camera.usps_mail_pictures', 'entity_picture') }}"
|
||||
content-type: jpg
|
||||
|
||||
# Notify USPS packages via TTS. Usually there are no pictures for packages
|
||||
###############################################################################
|
||||
# Notify USPS packages via TTS. Usually there are no pictures for packages
|
||||
###############################################################################
|
||||
- alias: Notify USPS Packages
|
||||
initial_state: true
|
||||
trigger:
|
||||
|
@ -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 -%}
|
|
@ -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 }}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
homeassistant:
|
||||
customize:
|
||||
|
||||
# ZWave Binary Sensors
|
||||
# ZWave Binary Sensors
|
||||
binary_sensor.aeotec_water_sensor_sensor:
|
||||
friendly_name: Aeotec Water Sensor
|
||||
## <<: *not_exposed
|
||||
|
@ -58,7 +57,7 @@ homeassistant:
|
|||
friendly_name: Upstairs Multi Sensor
|
||||
## <<: *not_exposed
|
||||
|
||||
# ZWave Sensors
|
||||
# ZWave Sensors
|
||||
sensor.aeotec_water_sensor_alarm_level:
|
||||
friendly_name: Aeotec Water Sensor Alarm Level
|
||||
# <<: *not_exposed
|
||||
|
@ -402,7 +401,7 @@ homeassistant:
|
|||
friendly_name: ZWave Smart Switch Voltage
|
||||
# <<: *not_exposed
|
||||
|
||||
# ZWave Switches
|
||||
# ZWave Switches
|
||||
|
||||
switch.kitchen_siren_switch:
|
||||
friendly_name: Kitchen Siren Switch 1
|
||||
|
@ -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"
|
||||
|
|
|
@ -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 -%}
|
||||
|
|
|
@ -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 -%}
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
{%- endmacro %}
|
||||
|
||||
{# Birthday notifications #}
|
||||
{%- macro birthday_countdown( name, days2go ) -%}
|
||||
{%- if days2go == 0 -%}
|
||||
{%- macro birthday_countdown(name, days2go) -%}
|
||||
{%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 #}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue