minor updates

This commit is contained in:
Mahasri Kalavala 2022-11-29 20:48:51 -05:00
parent 3bedcbdc20
commit d534709793
7 changed files with 86 additions and 48 deletions

View File

@ -84,13 +84,13 @@ cards:
title: Kalavala Family
show_header_toggle: false
entities:
- entity: device_tracker.mallika
- entity: device_tracker.life360_mallika
name: Mallika's Location
- entity: device_tracker.suresh
- entity: device_tracker.life360_suresh
name: Suresh's Location
- entity: device_tracker.srinika
- entity: device_tracker.life360_srinika
name: Srinika's Location
- entity: device_tracker.hasika
- entity: device_tracker.life360_hasika
name: Hasika's Location
- entity: input_boolean.home_mode_away
name: Home Away Status

View File

@ -387,10 +387,10 @@
# trigger:
# platform: numeric_state
# entity_id:
# - device_tracker.suresh
# - device_tracker.mallika
# - device_tracker.srinika
# - device_tracker.hasika
# - device_tracker.life360_suresh
# - device_tracker.life360_mallika
# - device_tracker.life360_srinika
# - device_tracker.life360_hasika
# value_template: "{{ state.attributes.battery }}"
# below: 25
# condition:
@ -438,10 +438,10 @@
# trigger:
# - platform: state
# entity_id:
# - device_tracker.mallika
# - device_tracker.suresh
# - device_tracker.srinika
# - device_tracker.hasika
# - device_tracker.life360_mallika
# - device_tracker.life360_suresh
# - device_tracker.life360_srinika
# - device_tracker.life360_hasika
# from: "not_home"
# to: "home"
# for: "00:05:00"

View File

@ -780,7 +780,7 @@ automation:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states('device_tracker.suresh') == 'home' }}"
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
@ -872,7 +872,7 @@ automation:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states('device_tracker.suresh') == 'home' }}"
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Driveway camera!"
@ -962,7 +962,7 @@ automation:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- condition: template
value_template: "{{ states('device_tracker.suresh') == 'home' }}"
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
message: "Check Patio camera!"

View File

@ -164,13 +164,13 @@ automation:
condition:
- condition: template
value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
- condition: template
value_template: >
{%- if state_attr('automation.notify_home_security_status_change', 'last_triggered') -%}
{{ (as_timestamp(now()) - as_timestamp(state_attr('automation.notify_home_security_status_change', 'last_triggered'))) > 90 }}
{%- else -%}
true
{%- endif -%}
# - condition: template
# value_template: >
# {%- if state_attr('automation.notify_home_security_status_change', 'last_triggered') -%}
# {{ (as_timestamp(now()) - as_timestamp(state_attr('automation.notify_home_security_status_change', 'last_triggered'))) > 90 }}
# {%- else -%}
# true
# {%- endif -%}
action:
- service: script.notify_me
data_template:

View File

@ -60,10 +60,10 @@ automation:
trigger:
- platform: state
entity_id:
- device_tracker.mallika
- device_tracker.suresh
- device_tracker.srinika
- device_tracker.hasika
- device_tracker.life360_mallika
- device_tracker.life360_suresh
- device_tracker.life360_srinika
- device_tracker.life360_hasika
from: "not_home"
to: "home"
for: "00:02:00"
@ -77,10 +77,10 @@ automation:
trigger:
- platform: zone
entity_id:
- device_tracker.hasika
- device_tracker.mallika
- device_tracker.srinika
- device_tracker.suresh
- device_tracker.life360_hasika
- device_tracker.life360_mallika
- device_tracker.life360_srinika
- device_tracker.life360_suresh
zone: zone.home
event: enter
condition:

View File

@ -20,7 +20,7 @@ input_boolean:
proximity:
home:
devices: device_tracker.suresh
devices: device_tracker.life360_suresh
tolerance: 50
unit_of_measurement: mi
@ -43,10 +43,10 @@ automation:
trigger:
- platform: zone
entity_id:
- device_tracker.hasika
- device_tracker.mallika
- device_tracker.srinika
- device_tracker.suresh
- device_tracker.life360_hasika
- device_tracker.life360_mallika
- device_tracker.life360_srinika
- device_tracker.life360_suresh
zone: zone.home
event: enter
condition:
@ -68,10 +68,10 @@ automation:
trigger:
- platform: zone
entity_id:
- device_tracker.hasika
- device_tracker.mallika
- device_tracker.srinika
- device_tracker.suresh
- device_tracker.life360_hasika
- device_tracker.life360_mallika
- device_tracker.life360_srinika
- device_tracker.life360_suresh
zone: zone.home
event: leave
condition:
@ -98,10 +98,10 @@ automation:
trigger:
- platform: state
entity_id:
- device_tracker.mallika
- device_tracker.suresh
- device_tracker.srinika
- device_tracker.hasika
- device_tracker.life360_mallika
- device_tracker.life360_suresh
- device_tracker.life360_srinika
- device_tracker.life360_hasika
from: "not_home"
to: "home"
for: "00:02:00"
@ -135,10 +135,10 @@ automation:
seconds: "/30"
action:
- service_template: >-
{%- set suresh = states('device_tracker.suresh') -%}
{%- set mallika = states('device_tracker.mallika') -%}
{%- set srinika = states('device_tracker.srinika') -%}
{%- set hasika = states('device_tracker.hasika') -%}
{%- 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') -%}
{{ 'input_boolean.turn_on' if suresh != "home" and mallika != "home" and srinika != "home" and hasika != "home" else 'input_boolean.turn_off' }}
entity_id: input_boolean.home_mode_away
@ -168,3 +168,41 @@ automation:
- service: script.notify_me
data_template:
message: "Suresh is on his way home, he is within the 5 miles range. Should be home soon!"
####################################################################################
- alias: Srinika Left Home
initial_state: true
trigger:
- platform: state
entity_id: device_tracker.life360_srinika
from: "home"
to: "not_home"
for: "00:02:00"
action:
- service: switch.turn_off
entity_id:
- switch.srinika_bedroom
- switch.srinika_bedroom_fan
- switch.srinika_bedroom_fan_light
- light.srinika_led_dimmer_switch
- switch.srinika_bedroom_closet
- switch.srinika_bedroom_accent_lights
####################################################################################
- alias: Hasika Left Home
initial_state: true
trigger:
- platform: state
entity_id: device_tracker.life360_hasika
from: "home"
to: "not_home"
for: "00:02:00"
action:
- service: switch.turn_off
entity_id:
- switch.hasika_bedroom
- switch.hasika_bedroom_fan
- switch.hasika_bedroom_fan_light
- light.hasika_led_dimmer_switch
- switch.hasika_bedroom_closet
- switch.hasika_bed_accent

View File

@ -164,7 +164,7 @@
{# Drone Flying Weather #}
{%- macro drone_weather() -%}
{% if states('binary_sensor.good_weather_to_fly_drones')| lower == "on" and
states('device_tracker.suresh') == "home" and
states('device_tracker.life360_suresh') == "home" and
states('sun.sun') == "above_horizon" %}
It is now a great weather to fly drone outside.
{% endif %}