mysmarthome/packages/led_notify.yaml

106 lines
4.1 KiB
YAML
Raw Normal View History

2020-03-14 00:10:10 +00:00
homeassistant:
automation:
###############################################################################
# Display Weather Information on LED Screen
###############################################################################
2022-12-03 16:28:12 +00:00
- alias: Notify Weather Changes
2020-03-14 00:10:10 +00:00
initial_state: true
trigger:
- platform: state
entity_id: sensor.dark_sky_apparent_temperature, sensor.dark_sky_hourly_summary
action:
2022-12-03 16:28:12 +00:00
- service: script.notify_family
2022-12-05 00:02:34 +00:00
data:
2022-12-03 02:44:37 +00:00
message: >
{{ states('sensor.dark_sky_apparent_temperature') |int }} degrees, {{ states('sensor.dark_sky_hourly_summary') }}
2022-12-03 16:28:12 +00:00
notify_options:
- tv
- led
2020-03-14 00:10:10 +00:00
2022-12-05 00:02:34 +00:00
# ###############################################################################
# # Display Garage Door Status on LED Screen
# ###############################################################################
# - alias: Notify Garage Door Status on LED Screen
# initial_state: true
# trigger:
# platform: state
# entity_id:
# - binary_sensor.door_window_sensor_158d0004231f7b
# - binary_sensor.door_window_sensor_158d0004248d5b
# condition:
# - condition: template
# value_template: "{{ trigger.from_state.state not in ['unavailable', 'unknown'] }}"
# - condition: template
# value_template: "{{ trigger.to_state.state not in ['unavailable', 'unknown'] }}"
# - condition: template
# value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}"
# action:
# - service: script.notify_family
# data:
# message: >
# {% set doors = "" %}
# {% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
# states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" %}
# {% set doors = "Attention! Both Garage Doors are OPEN" %}
# {% elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
# states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" %}
# {% set doors = "Both Garage Doors are now CLOSED" %}
# {% else %}
# {% if trigger.to_state.state | lower == "on" %}
# Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED!
# {% elif trigger.to_state.state | lower == "off" %}
# Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED!
# {% endif %}
# {% endif %}
# {{ doors }}
# notify_options:
# - telegram
# - tv
# - led
2020-03-14 00:10:10 +00:00
###############################################################################
# Display Zone based Messages on LED Screen
###############################################################################
- alias: Welcome Family on LED Screen
initial_state: true
trigger:
- platform: state
entity_id:
2022-11-30 01:48:51 +00:00
- device_tracker.life360_mallika
- device_tracker.life360_suresh
- device_tracker.life360_srinika
- device_tracker.life360_hasika
2020-03-14 00:10:10 +00:00
from: "not_home"
to: "home"
for: "00:02:00"
action:
2022-12-03 16:28:12 +00:00
- service: script.notify_family
2022-12-05 00:02:34 +00:00
data:
2022-12-03 02:44:37 +00:00
message: "Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[1] | title }}"
2022-12-03 16:28:12 +00:00
notify_options:
- tv
- led
2020-03-14 00:10:10 +00:00
2022-12-04 19:20:32 +00:00
- alias: Alert When Someone Enters Home
2020-03-14 00:10:10 +00:00
initial_state: true
trigger:
- platform: zone
entity_id:
2022-11-30 01:48:51 +00:00
- device_tracker.life360_hasika
- device_tracker.life360_mallika
- device_tracker.life360_srinika
- device_tracker.life360_suresh
2020-03-14 00:10:10 +00:00
zone: zone.home
event: enter
condition:
- condition: template
value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}"
action:
2022-12-04 17:38:48 +00:00
- service: script.notify_family
2022-12-05 00:02:34 +00:00
data:
2020-03-14 00:10:10 +00:00
message: >
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
2022-12-04 17:38:48 +00:00
notify_options:
- led