This commit is contained in:
Mahasri Kalavala 2022-12-04 19:02:34 -05:00
parent 2d312aaf11
commit 97c8ced097
29 changed files with 300 additions and 311 deletions

View File

@ -63,15 +63,15 @@ automation:
value_template: "{{ trigger.event.data.new_state.attributes.battery_level | default(999) | int != 999 }}"
action:
- service: input_label.set_value
data_template:
data:
entity_id: "input_label.{{- trigger.event.data.entity_id.split('.')[1] -}}"
value: "{{ trigger.event.data.new_state.attributes.battery_level }}"
- service: input_label.set_name
data_template:
data:
entity_id: "input_label.{{- trigger.event.data.entity_id.split('.')[1] -}}"
value: "{{ trigger.event.data.new_state.attributes.friendly_name }}'s Battery"
- service: input_label.set_icon
data_template:
data:
entity_id: "input_label.{{- trigger.event.data.entity_id.split('.')[1] -}}"
value: >
{% set battery_level = trigger.event.data.new_state.attributes.battery_level | int %}
@ -91,28 +91,28 @@ automation:
topic: "owntracks/+/+"
action:
- service: input_label.set_value
data_template:
data:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_wifi"
value: "{{ 'Yes' if trigger.payload_json.conn == 'w' else 'No' }}"
- service: input_label.set_icon
data_template:
data:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_wifi"
value: "{{ 'mdi:wifi' if trigger.payload_json.conn == 'w' else 'mdi:wifi-off' }}"
- service: input_label.set_name
data_template:
data:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_wifi"
value: "{{trigger.topic.split('/')[-1] | title }}'s phone wifi enabled?"
- service: input_label.set_value
data_template:
data:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_battery"
value: '{{ trigger.payload_json.batt | int }}'
- service: input_label.set_name
data_template:
data:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_battery"
value: "{{trigger.topic.split('/')[-1] | title }}'s Battery"
- service: input_label.set_icon
data_template:
data:
entity_id: "input_label.{{trigger.topic.split('/')[-1]}}_battery"
value: >
{% set battery_level = trigger.payload_json.batt | int %}

View File

@ -34,7 +34,7 @@ automation:
{%- endfor %}
action:
service: group.set_visibility
data_template:
data:
entity_id: '{{- '{{' }} "group_" ~ trigger.entity_id.split(".")[1] {{ '}}' }}'
visible: '{{- '{{' }} trigger.to_state.state | lower == "on" {{ '}}' }}'
```

View File

@ -360,7 +360,7 @@ Hope you find it useful!
entity_id: light.dinette
action:
- service: mqtt.publish
data_template:
data:
topic: '/dump/{{ trigger.platform }}'
retain: false
payload: >-

View File

@ -157,7 +157,7 @@
# from: "Printing"
# action:
# - service: script.notify_me
# data_template:
# data:
# message: "3D Printer Status Changed from 'Printing' to '{{ trigger.to_state.state }}'."
# #
@ -169,7 +169,7 @@
# entity_id: "binary_sensor.octoprint_printing"
# action:
# - service: script.notify_me
# data_template:
# data:
# message: "3D Printer Status changed from '{{ trigger.from_state.state }}' to '{{ trigger.to_state.state }}'."
# #
@ -182,7 +182,7 @@
# to: "on"
# action:
# - service: script.notify_me
# data_template:
# data:
# message: "3D Printer Status changed to 'ERROR'. Please check the printer!"
# #
@ -213,7 +213,7 @@
# from: "off"
# action:
# - service: script.notify_me
# data_template:
# data:
# message: >-
# 3D Printer job is now {{ trigger.to_state.attributes.friendly_name }} complete.
@ -235,7 +235,7 @@
# - service: switch.turn_off
# entity_id: switch.3d_printer
# - service: script.notify_me
# data_template:
# data:
# message: "3D Printer is now switched off!"
# - service_template: input_boolean.turn_off
# entity_id: input_boolean.twenty_five_percent
@ -265,7 +265,7 @@
# entity_id: camera.3d_printer_camera
# filename: "/config/www/downloads/camera/3dprinter/print_latest.jpg"
# - service: notify.telegram
# data_template:
# data:
# title: "3D Printer"
# message: "Print Progress"
# data:

View File

@ -36,7 +36,7 @@ automation:
value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}"
action:
- service: script.notify_family
data_template:
data:
message: "{{ trigger.to_state.attributes.friendly_name | title }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
notify_options:
- telegram
@ -59,7 +59,7 @@ automation:
value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}"
action:
- service: script.notify_family
data_template:
data:
message: >
Sensors with low batteries (<25):
{% set ns = namespace(lowBattery="") -%}

View File

@ -77,7 +77,7 @@ automation:
value_template: "{{ trigger.to_state.state | int > 0 and trigger.to_state.state | int < 30 }}"
action:
- service: script.notify_family
data_template:
data:
message: "{{ trigger.entity_id.split('.')[1].split('_')[0] | title }}'s Birthday is only {{ trigger.to_state.state }} days to go!"
notify_options:
- telegram
@ -100,7 +100,7 @@ automation:
value_template: "{{ trigger.to_state.state | int == 0 }}"
action:
- service: script.notify_family
data_template:
data:
message: "Hurray! Today is {{ trigger.entity_id.split('.')[1].split('_')[0] | title }}'s Birthday!"
notify_options:
- telegram
@ -134,7 +134,7 @@ automation:
value_template: "{{ states('input_label.mallika_birthday_days2go') | int == 0 }}"
action:
- service: script.notify_family
data_template:
data:
message: !include ../templates/birthday_wishes.yaml
notify_options:
- voice
@ -158,7 +158,7 @@ automation:
value_template: "{{ states('input_label.mallika_birthday').split('-') | length > 0 }}"
action:
- service: input_label.set_value
data_template:
data:
entity_id: input_label.srinika_birthday_days2go
value: >
{% set year = states('sensor.date').split('-')[0] %}
@ -177,7 +177,7 @@ automation:
-
{% endif %}
- service: input_label.set_value
data_template:
data:
entity_id: input_label.hasika_birthday_days2go
value: >
{% set year = states('sensor.date').split('-')[0] %}
@ -196,7 +196,7 @@ automation:
-
{% endif %}
- service: input_label.set_value
data_template:
data:
entity_id: input_label.mallika_birthday_days2go
value: >
{% set year = states('sensor.date').split('-')[0] %}

View File

@ -270,14 +270,14 @@ automation:
to: "on"
action:
- service: camera.snapshot
data_template:
data:
entity_id: "camera.porch_camera"
filename:
"{{ '/config/www/downloads/camera/porch/porch_' ~
(states.binary_sensor.porch_motion.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_porch_camera
#
@ -298,10 +298,10 @@ automation:
- condition: template
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_frontdoor_camera
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_driveway_camera
- condition: template
value_template: >-
@ -316,7 +316,7 @@ automation:
{% endif %}
- service: script.voice_notify
data_template:
data:
message: >-
{%- set e_id = "image_processing.doods_frontdoor_camera" -%}
{%- if state_attr(e_id, 'summary') -%}
@ -330,7 +330,7 @@ automation:
greeting: "no"
- service: notify.notify_smtp
data_template:
data:
title: 'Front door motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: >
{%- set e_id = "image_processing.doods_frontdoor_camera" -%}
@ -349,7 +349,7 @@ automation:
- "/config/www/downloads/camera/frontdoor/frontdoor_latest.jpg"
- service: script.notify_family
data_template:
data:
title: "Front Door Motion"
message: >
{%- set e_id = "image_processing.doods_frontdoor_camera" -%}
@ -377,7 +377,7 @@ automation:
False
{% endif %}
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_garage
#
# Scan driveway and frontdoor cameras when motion detected
@ -394,16 +394,16 @@ automation:
- condition: template
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
- service: script.stream2chromecast
data_template:
data:
url: !secret driveway_camera_stream_url
name: "driveway"
- condition: template
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_driveway_camera
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_frontdoor_camera
- condition: template
value_template: >-
@ -418,7 +418,7 @@ automation:
{% endif %}
- service: script.voice_notify
data_template:
data:
message: >-
{%- set e_id = "image_processing.doods_driveway_camera" -%}
{%- if state_attr(e_id, 'summary') -%}
@ -431,7 +431,7 @@ automation:
{%- endif -%}
- service: script.notify_family
data_template:
data:
title: "Driveway Motion"
message: >
{%- set e_id = "image_processing.doods_driveway_camera" -%}
@ -451,7 +451,7 @@ automation:
- tv
- service: notify.notify_smtp
data_template:
data:
title: 'Driveway motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: >
{%- set e_id = "image_processing.doods_driveway_camera" -%}
@ -479,7 +479,7 @@ automation:
{% endif %}
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_garage
#
@ -500,7 +500,7 @@ automation:
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
action:
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_garage
- condition: template
value_template: >
@ -511,10 +511,10 @@ automation:
False
{% endif %}
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_driveway_camera
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_frontdoor_camera
- condition: template
value_template: >-
@ -529,7 +529,7 @@ automation:
{% endif %}
- service: script.voice_notify
data_template:
data:
message: >-
{%- set e_id = "image_processing.doods_garage" -%}
{%- if state_attr(e_id, 'summary') -%}
@ -542,7 +542,7 @@ automation:
{%- endif -%}
- service: script.notify_family
data_template:
data:
title: "Garage Motion"
message: >
{%- set e_id = "image_processing.doods_garage" -%}
@ -562,7 +562,7 @@ automation:
- tv
- service: notify.notify_smtp
data_template:
data:
title: 'Garage motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: >
{%- set e_id = "image_processing.doods_garage" -%}
@ -593,16 +593,16 @@ automation:
- condition: template
value_template: "{{ states('input_boolean.camera_alerts') == 'on' }}"
- service: script.stream2chromecast
data_template:
data:
url: !secret playarea_camera_stream_url
name: "backyard"
- condition: template
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_patio_camera
- service: image_processing.scan
data_template:
data:
entity_id: image_processing.doods_playarea_camera
- condition: template
value_template: >-
@ -617,7 +617,7 @@ automation:
{% endif %}
- service: script.voice_notify
data_template:
data:
message: >-
{%- set e_id = "image_processing.doods_patio_camera" -%}
{%- if state_attr(e_id, 'summary') -%}
@ -630,7 +630,7 @@ automation:
{%- endif -%}
- service: script.notify_family
data_template:
data:
title: "Backyard Motion"
message: >
{%- set e_id = "image_processing.doods_patio_camera" -%}
@ -650,7 +650,7 @@ automation:
- tv
- service: notify.notify_smtp
data_template:
data:
title: 'Backyard motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: >
{%- set e_id = "image_processing.doods_patio_camera" -%}
@ -717,28 +717,28 @@ automation:
action:
- delay: "{{ '00:00:08' if states('binary_sensor.door_window_sensor_158d000424a6d6') == 'on' else '0:0:0' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.frontdoor_camera"
filename:
"{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.porch_camera"
filename:
"{{ '/config/www/downloads/camera/porch/porch_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.driveway_camera"
filename:
"{{ '/config/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.garage"
filename:
"{{ '/config/www/downloads/camera/garage/garage_' ~
@ -746,7 +746,7 @@ automation:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.telegram
data_template:
data:
title: "Front Door Motion"
message: "Motion Detected At Front Door, Check images:"
data:
@ -769,7 +769,7 @@ automation:
caption: Porch
- service: notify.notify_smtp
data_template:
data:
title: 'Front door motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: 'Motion detected at the front door on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") -}}. Please see the images below.'
data:
@ -791,7 +791,7 @@ automation:
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
data:
message: "Check Front Door camera!"
data:
push:
@ -823,21 +823,21 @@ automation:
value_template: "{{ states('alarm_control_panel.home') == 'armed_home' or states('alarm_control_panel.home') == 'armed_away' }}"
action:
- service: camera.snapshot
data_template:
data:
entity_id: "camera.frontdoor_camera"
filename:
"{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.driveway_camera"
filename:
"{{ '/config/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024e57fb.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.garage"
filename:
"{{ '/config/www/downloads/camera/garage/garage_' ~
@ -845,7 +845,7 @@ automation:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.telegram
data_template:
data:
title: "Driveway Motion"
message: "Motion Detected At Driveway, Check images:"
data:
@ -864,7 +864,7 @@ automation:
caption: "Garage"
- service: notify.notify_smtp
data_template:
data:
title: 'Driveway motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: 'Motion detected at the Driveway on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") }}. Please see the images below.'
data:
@ -882,7 +882,7 @@ automation:
- condition: template
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
data:
message: "Check Driveway camera!"
data:
push:
@ -926,7 +926,7 @@ automation:
{% endif %}
- service: camera.snapshot
data_template:
data:
entity_id: "camera.patio_camera"
filename:
"{{ '/config/www/downloads/camera/patio/patio_' ~
@ -934,7 +934,7 @@ automation:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.playarea_camera"
filename:
"{{ '/config/www/downloads/camera/playarea/playarea_' ~
@ -942,7 +942,7 @@ automation:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.telegram
data_template:
data:
title: "Backyard Motion"
message: "Motion Detected in the Backyard, Check images:"
data:
@ -957,7 +957,7 @@ automation:
caption: "Playarea"
- service: notify.notify_smtp
data_template:
data:
title: 'Backyard motion {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: 'Motion detected in the Backyard on {{ now().strftime("%d %h %Y, at %I:%M:%S %p") }}. Please see the images below.'
data:
@ -972,7 +972,7 @@ automation:
- condition: template
value_template: "{{ states('device_tracker.life360_suresh') == 'home' }}"
- service: notify.ios_devices
data_template:
data:
message: "Check Patio camera!"
data:
push:
@ -1012,28 +1012,28 @@ automation:
{% endif %}
action:
- service: script.frontdoor_camera_text_overlay
data_template:
data:
text: >
{{ '* ' if states('alarm_control_panel.home') == 'armed_home' or
states('alarm_control_panel.home') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.driveway_camera_text_overlay
data_template:
data:
text: >
{{ '* ' if states('alarm_control_panel.home') == 'armed_home' or
states('alarm_control_panel.home') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.playarea_camera_text_overlay
data_template:
data:
text: >
{{ '* ' if states('alarm_control_panel.home') == 'armed_home' or
states('alarm_control_panel.home') == 'armed_away' -}}
{{- states('sensor.dark_sky_temperature')|int}} °F, Feels like
{{- ' ' ~ states('sensor.dark_sky_apparent_temperature') |int -}}
- service: script.patio_camera_text_overlay
data_template:
data:
text: >
{{ '* ' if states('alarm_control_panel.home') == 'armed_home' or
states('alarm_control_panel.home') == 'armed_away' -}}
@ -1073,7 +1073,7 @@ automation:
media_content_id: !secret frontdoor_camera_stream_url
media_content_type: video
- service: input_label.set_value
data_template:
data:
entity_id: input_label.current_stream
value: "frontyard"
@ -1110,31 +1110,31 @@ script:
frontdoor_cam:
sequence:
- service: script.stream2chromecast
data_template:
data:
url: !secret frontdoor_camera_stream_url
name: "frontyard"
driveway_cam:
sequence:
- service: script.stream2chromecast
data_template:
data:
url: !secret driveway_camera_stream_url
name: "driveway"
patio_cam:
sequence:
- service: script.stream2chromecast
data_template:
data:
url: !secret patio_camera_stream_url
name: "patio"
playarea_cam:
sequence:
- service: script.stream2chromecast
data_template:
data:
url: !secret playarea_camera_stream_url
name: "playarea"
porch_cam:
sequence:
- service: script.stream2chromecast
data_template:
data:
url: !secret porch_camera_stream_url
name: "porch"
@ -1152,7 +1152,7 @@ script:
- condition: template
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
- service: script.stream2chromecast
data_template:
data:
url: !secret frontdoor_camera_stream_url
name: "frontyard"
@ -1161,7 +1161,7 @@ script:
- condition: template
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
- service: script.stream2chromecast
data_template:
data:
url: !secret driveway_camera_stream_url
name: "driveway"
@ -1170,7 +1170,7 @@ script:
- condition: template
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
- service: script.stream2chromecast
data_template:
data:
url: !secret patio_camera_stream_url
name: "patio"
@ -1179,7 +1179,7 @@ script:
- condition: template
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
- service: script.stream2chromecast
data_template:
data:
url: !secret playarea_camera_stream_url
name: "playarea"
@ -1188,7 +1188,7 @@ script:
- condition: template
value_template: "{{ states('input_boolean.stream_camera2chromecast') == 'on' }}"
- service: script.stream2chromecast
data_template:
data:
url: !secret porch_camera_stream_url
name: "porch"
@ -1207,25 +1207,25 @@ script:
frontdoor_camera_text_overlay:
sequence:
- service: rest_command.set_frontdoor_camera_text_left_bottom
data_template:
data:
message: "{{text}}"
driveway_camera_text_overlay:
sequence:
- service: rest_command.set_driveway_camera_text_left_bottom
data_template:
data:
message: "{{text}}"
patio_camera_text_overlay:
sequence:
- service: rest_command.set_patio_camera_text_left_bottom
data_template:
data:
message: "{{text}}"
playarea_camera_text_overlay:
sequence:
- service: rest_command.set_playarea_camera_text_left_bottom
data_template:
data:
message: "{{text}}"
###############################################################################
@ -1239,11 +1239,11 @@ script:
- condition: template
value_template: "{{ states('input_label.current_stream') != name }}"
- service: media_player.play_media
data_template:
data:
entity_id: media_player.attic_tv
media_content_id: "{{ url }}"
media_content_type: "video"
- service: input_label.set_value
data_template:
data:
entity_id: input_label.current_stream
value: "{{ name }}"

View File

@ -109,44 +109,26 @@ automation:
entity_id:
- binary_sensor.door_window_sensor_158d0004248d5b # Single car garage
- binary_sensor.door_window_sensor_158d0004231f7b # 2 Car Garage
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: switch.turn_on
entity_id: switch.garage
- service: script.notify_family
data_template:
message: >
{% set doors = "" %}
{% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" %}
{% set doors = "Attention! Both Garage Doors are OPEN" %}
{% elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" %}
{% set doors = "Both Garage Doors are now CLOSED" %}
{% else %}
{% if trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "on" %}
{% set doors = "Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED!" %}
{% elif trigger.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "off" %}
{% set doors = "Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED!" %}
{% endif %}
{% endif %}
{{ doors }} - {{ trigger.to_state.attributes.friendly_name }}: from '{{trigger.from_state.state}}'', to: '{{ trigger.to_state.state }}'
notify_options:
- voice
- led
- tv
- email
- telegram
- delay: "00:00:05"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.garage"
filename: "{{ '/config/www/downloads/camera/garage/garage_' ~
((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}"
- delay: "00:00:05"
- service: script.notify_family
data_template:
title: "Garage Door Status"
message: >
{% set doors = "" %}
{% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
@ -163,21 +145,29 @@ automation:
{% endif %}
{% endif %}
{{ doors }}
url: >
{{ '/config/www/downloads/camera/garage/garage_' ~
((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}
url: !secret garage_camera_snapshot_url
path: >
"{{ '/config/www/downloads/camera/garage/garage_' ~
((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}"
notify_options:
- telegram
- email
- tv
- led
- service: notify.telegram
data_template:
title: "Camera Images"
message: "Check the garage photo below:"
data:
photo:
- url: !secret garage_camera_snapshot_url
caption: "Garage"
- service: switch.turn_off
entity_id: switch.garage
###############################################################################
# Notify Entry Door Status
###############################################################################
- alias: Voice Notify Entry Door Status
- alias: Notify Entry Door Status
initial_state: true
trigger:
platform: state
@ -192,7 +182,7 @@ automation:
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action:
- service: script.notify_family
data_template:
data:
message: >
{% if trigger.to_state.state | lower == "on" %}
Your {{ trigger.to_state.attributes.friendly_name.replace('Sensor', '') }} is OPEN,
@ -350,7 +340,7 @@ automation:
state: "on"
action:
- service: switch.turn_off
data_template:
data:
entity_id: switch.master_bathroom_toilet_light
###############################################################################

View File

@ -60,7 +60,7 @@ automation:
message: "Today is {{ states('sensor.holiday') }}."
title: "{{ states('sensor.holiday') }}"
- service: script.notify_family
data_template:
data:
message: "Today is: {{states('sensor.holiday') }}"
notify_options:
- telegram
@ -96,7 +96,7 @@ automation:
{%- endif -%}
action:
- service: script.notify_family
data_template:
data:
message: >-
{%- set days2NextEvent = 0 -%}
{%- if now().year == strptime(states.calendar.holidays_in_india.attributes.start_time, '%Y-%m-%d %H:%M:%S').year -%}

View File

@ -72,7 +72,7 @@ automation:
value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
action:
- service: script.notify_family
data_template:
data:
message: >
{% set ns = namespace(openDoorCount=0, doorNames="") %}
{%- set sensors = [
@ -99,38 +99,38 @@ automation:
- voice
- service: camera.snapshot
data_template:
data:
entity_id: "camera.frontdoor_camera"
filename: "{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.driveway_camera"
filename: "{{ '/config/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.garage"
filename: "{{ '/config/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.patio_camera"
filename: "{{ '/config/www/downloads/camera/patio/patio_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.playarea_camera"
filename: "{{ '/config/www/downloads/camera/playarea/playarea_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.telegram
data_template:
data:
title: "Camera Snapshots"
message: "Please check the camera images just to be sure!"
data:
@ -176,7 +176,7 @@ automation:
{%- endif -%}
action:
- service: script.notify_family
data_template:
data:
message: >
{% if states('alarm_control_panel.home') == "armed_home" %}
Your home is now secured!
@ -300,11 +300,11 @@ automation:
- service: switch.turn_on
entity_id: switch.garage
- service: camera.snapshot
data_template:
data:
entity_id: "camera.garage"
filename: "{{ '/config/www/downloads/camera/garage/garage_' ~ (state_attr('automation.home_security_system_and_garage_door_check','last_updated') ~ '').replace('-','_').replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: script.notify_family
data_template:
data:
message: >
Attention! Your home Security system is set to {{ states('alarm_control_panel.home').split('_')[1] | upper }} mode. BUT THE {% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" -%}DOUBLE CAR {%- else %}SINGLE CAR {% endif %}GARAGE DOOR IS STILL OPEN!
url: "{{ '/config/www/downloads/camera/garage/garage_' ~

View File

@ -11,53 +11,53 @@ automation:
entity_id: sensor.dark_sky_apparent_temperature, sensor.dark_sky_hourly_summary
action:
- service: script.notify_family
data_template:
data:
message: >
{{ states('sensor.dark_sky_apparent_temperature') |int }} degrees, {{ states('sensor.dark_sky_hourly_summary') }}
notify_options:
- tv
- led
###############################################################################
# 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_template:
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
# ###############################################################################
# # 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
###############################################################################
# Display Zone based Messages on LED Screen
@ -76,7 +76,7 @@ automation:
for: "00:02:00"
action:
- service: script.notify_family
data_template:
data:
message: "Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[1] | title }}"
notify_options:
- tv
@ -98,7 +98,7 @@ automation:
value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}"
action:
- service: script.notify_family
data_template:
data:
message: >
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
notify_options:

View File

@ -234,7 +234,7 @@ automation:
action:
- service: light.turn_on
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
data_template:
data:
brightness: >
{% if states('binary_sensor.sharp_tv') == "on" %}
25

View File

@ -48,7 +48,7 @@ automation:
entity_id: sensor.dining_room_thermostat_operation_mode
action:
- service: script.notify_family
data_template:
data:
message: "Nest Thermostat changed from '{{ trigger.from_state.state }}' to '{{ trigger.to_state.state }}'."
notify_options:
- telegram
@ -63,6 +63,6 @@ script:
toggle_climate:
sequence:
- service: climate.set_away_mode
data_template:
data:
entity_id: climate.dining_room
away_mode: "{{ false if state_attr('climate.dining_room', 'away_mode') == 'on' else true }}"

View File

@ -82,32 +82,33 @@ script:
value_template: '{{ message | trim != "" }}'
- service: script.notify_on_led_screen
data_template:
data:
message: "{{ message }}"
notify_options: "{{ notify_options }}"
- service: script.notify_firestick
data_template:
url: "{{ url }}"
data:
url: "{{ url }}" # local url
path: "{{ file }}" # local path
title: "{{ title }}"
message: "{{ message }}"
notify_options: "{{ notify_options }}"
- service: script.notify_telegram
data_template:
data:
file: "{{ url }}"
title: "{{ title }}"
message: "{{ message }}"
notify_options: "{{ notify_options }}"
- service: script.notify_email
data_template:
data:
title: "{{ title }}"
message: "{{ message }}"
notify_options: "{{ notify_options }}"
- service: script.notify_voice
data_template:
data:
message: "{{ message }}"
notify_options: "{{ notify_options }}"
@ -134,7 +135,9 @@ script:
data:
color: red
duration: 7
image:
url:
path: "{{ url }}" #/config/www/downloads/camera/driveway/driveway_20220604_185216.jpg
file:
path: "{{ url }}" #/config/www/downloads/camera/driveway/driveway_20220604_185216.jpg
icon:
path: >
@ -150,14 +153,10 @@ script:
state: "on"
- condition: template
value_template: "{{ 'telegram' in notify_options }}"
- service: telegram_bot.send_message
- service: notify.telegram
data:
title: "{{- title -}}"
message: "{{- message -}}"
data:
photo:
- file: "{{- file -}}"
caption: "{{- title -}}"
message: "{{ message }}"
title: "{{ title }}"
notify_email:
sequence:
@ -167,9 +166,12 @@ script:
- condition: template
value_template: "{{ 'email' in notify_options }}"
- service: notify.notify_smtp
data_template:
data:
title: "{{ title }}"
message: "{{ message }}"
data:
images:
- "{{- path -}}"
notify_voice:
sequence:
@ -179,7 +181,7 @@ script:
- condition: template
value_template: "{{ 'voice' in notify_options }}"
- service: script.voice_notify
data_template:
data:
message: "{{ message }}"
notify_on_led_screen:
@ -190,7 +192,7 @@ script:
- condition: template
value_template: "{{ 'led' in notify_options }}"
- service: mqtt.publish
data_template:
data:
topic: messageboard/messages
payload: "{{ message }}"
@ -223,7 +225,7 @@ script:
{% endif %}
- service: media_player.volume_set
entity_id: media_player.living_room, media_player.upstairs
data_template:
data:
volume_level: >
{% if states('input_boolean.emergency_mode') == "on" %}
{{ states('input_number.tts_volume_level_alert') }}
@ -238,7 +240,7 @@ script:
{% endif %}
- service: tts.amazon_polly_say
entity_id: media_player.living_room, media_player.upstairs
data_template:
data:
cache: true
message: >
{% set msg = "" %}
@ -273,7 +275,7 @@ script:
sequence:
- service: tts.amazon_polly_say
entity_id: media_player.living_room, media_player.upstairs
data_template:
data:
cache: true
message: >
{% set msg = "" %}

View File

@ -65,7 +65,7 @@ automation:
from: "off"
action:
- service: input_label.set_value
data_template:
data:
entity_id: input_label.pill_taken_at
value: "{{ as_timestamp(now()) | timestamp_custom('%m/%d/%Y %I:%M %p') }}"
- delay:
@ -143,7 +143,7 @@ script:
- service: input_boolean.turn_on
entity_id: input_boolean.pill_taken
- service: script.notify_family
data_template:
data:
message: >
Thank you for taking tablets.
{%- if state_attr('sensor.allergy_index_today', 'rating') != None %}

View File

@ -119,7 +119,7 @@ automation:
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action:
- service: script.notify_family
data_template:
data:
message: "NAS Status changed to: {{ trigger.to_state.state| upper }}"
notify_options:
- telegram
@ -139,7 +139,7 @@ automation:
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action:
- service: script.notify_family
data_template:
data:
message: "NAS Drive state changed to: {{ trigger.to_state.state| upper }} from '{{ trigger.from_state.state| upper }}'"
notify_options:
- telegram
@ -153,7 +153,7 @@ automation:
above: 125
action:
- service: script.notify_family
data_template:
data:
message: "NAS CPU temperature is going crazy hot, needs your attention!!! Current cpu temp is: {{ trigger.to_state.state }}"
notify_options:
- telegram
@ -167,7 +167,7 @@ automation:
above: 80
action:
- service: script.notify_family
data_template:
data:
message: "Attention! NAS disk usage is above 80 percent. Time to clean up?"
notify_options:
- telegram
@ -182,7 +182,7 @@ automation:
for: "00:05:00"
action:
- service: script.notify_family
data_template:
data:
message: "FYI - NAS Memory is above 80 percent for more than 5 minutes."
notify_options:
- telegram
@ -197,7 +197,7 @@ automation:
for: "00:05:00"
action:
- service: script.notify_family
data_template:
data:
message: "FYI - NAS CPU is above 80 percent for more than 5 minutes."
notify_options:
- telegram

View File

@ -209,7 +209,7 @@ automation:
entity_id: input_select.trash_pickup_day
action:
- service: mqtt.publish
data_template:
data:
topic: "/home/trashpickupday"
retain: true
payload: "{{ states.input_select.trash_pickup_day.state }}"
@ -221,7 +221,7 @@ automation:
entity_id: input_select.recycle_pickup_day
action:
- service: mqtt.publish
data_template:
data:
topic: "/home/recyclepickupday"
retain: true
payload: "{{ states.input_select.recycle_pickup_day.state }}"
@ -233,7 +233,7 @@ automation:
entity_id: input_select.recycle_pickup_week
action:
- service: mqtt.publish
data_template:
data:
topic: "/home/recyclepickupweek"
retain: true
payload: "{{ states.input_select.recycle_pickup_week.state }}"
@ -247,15 +247,15 @@ automation:
- delay:
minutes: 1
- service: input_select.select_option
data_template:
data:
entity_id: input_select.trash_pickup_day
option: "{{states.sensor.trash_pickup_day.state}}"
- service: input_select.select_option
data_template:
data:
entity_id: input_select.recycle_pickup_day
option: "{{states.sensor.recycle_pickup_day.state}}"
- service: input_select.select_option
data_template:
data:
entity_id: input_select.recycle_pickup_week
option: "{{states.sensor.recycle_pickup_week.state}}"
@ -295,7 +295,7 @@ automation:
state: "yes"
action:
- service: script.notify_family
data_template:
data:
message: >
{% if states.sensor.trash_day.state == "yes" and states.sensor.recycle_day.state == "yes" %}
Tomorrow is the Trash AND Recycle Pickup day!
@ -318,14 +318,14 @@ automation:
- service: input_boolean.turn_on
entity_id: input_boolean.trash_alerts
- service: input_select.select_option
data_template:
data:
entity_id: input_select.trash_pickup_day
option: "{{states.sensor.trash_pickup_day.state}}"
- service: input_select.select_option
data_template:
data:
entity_id: input_select.recycle_pickup_day
option: "{{states.sensor.recycle_pickup_day.state}}"
- service: input_select.select_option
data_template:
data:
entity_id: input_select.recycle_pickup_week
option: "{{states.sensor.recycle_pickup_week.state}}"

View File

@ -97,7 +97,7 @@ script:
all_indoor_lights_off:
sequence:
- service: light.turn_off
data_template:
data:
entity_id:
- light.family_room_lights
- light.hue_color_lamp_1
@ -108,7 +108,7 @@ script:
- light.master_bedroom_lights
- service: switch.turn_off
data_template:
data:
entity_id:
- switch.basement_left
- switch.basement_right
@ -155,7 +155,7 @@ script:
home_status:
sequence:
- service: script.notify_family
data_template:
data:
message: !include ../templates/home_status.yaml
notify_options:
- voice
@ -163,7 +163,7 @@ script:
good_night_tts:
sequence:
- service: script.notify_family
data_template:
data:
message: !include ../templates/goodnight.yaml
notify_options:
- voice

View File

@ -30,7 +30,7 @@ automation:
value_template: '{{ trigger.from_state.state | lower != "unknown" }}'
action:
- service: script.notify_family
data_template:
data:
message: >
Good bye {{ trigger.from_state.state }}, and Say Hello to {{ trigger.to_state.state }}!
notify_options:

View File

@ -341,7 +341,7 @@ automation:
entity_id: input_boolean.do_not_disturb
action:
- service: script.notify_family
data_template:
data:
message: "The Do Not Disturb Mode is {{ trigger.to_state.state |upper }}."
notify_options:
- led

View File

@ -1,23 +1,23 @@
homeassistant:
automation:
# this automation runs every day at 9:00 AM, 12 PM, 5PM, and at 10:00 PM
# and sends an email - only when we are away from the house.
# this automation runs every day at 9:00 AM, 12 PM, 5PM, and at 10:00 PM
# and sends an email - only when we are away from the house.
- alias: Notify Home Status When Away
trigger:
- platform: time
at: '09:00:00'
at: "09:00:00"
- platform: time
at: '12:00:00'
at: "12:00:00"
- platform: time
at: '17:00:00'
at: "17:00:00"
- platform: time
at: '10:00:00'
at: "10:00:00"
condition:
- condition: template
value_template: "{{ states('input_boolean.home_mode_away') == 'on' }}"
action:
- service: notify.notify_smtp
data_template:
data:
title: 'Home Status {{ now().strftime("%d %h %Y, %I:%M:%S %p") }}'
message: !include ../templates/away_status.yaml
message: !include ../templates/away_status.yaml

View File

@ -47,7 +47,7 @@
# {% endif %}
# - delay: '00:00:01'
# - service: script.light_set_color
# data_template:
# data:
# entity_id: >-
# {%- macro get_next_entity_id() -%}
# {%- for item in states.group.input_labels.attributes.entity_id if is_state(item, "no") -%}
@ -72,12 +72,12 @@
# - condition: template
# value_template: '{{ brightness | trim != "" }}'
# - service: light.turn_on
# data_template:
# data:
# entity_id: '{{ entity_id }}'
# brightness: '{{ brightness }}'
# rgb_color: ['{{"{0:d}".format(range(210, 238)|random)|int}}', '{{"{0:d}".format(range(210, 238)|random)|int}}', '{{"{0:d}".format(range(210, 238)|random)|int}}']
# - service: input_label.set_value
# data_template:
# data:
# entity_id: "input_label.{{- entity_id.split('.')[1] -}}_random_color"
# value: 'yes'
# - delay: '00:00:01'
@ -102,7 +102,7 @@
# event_type: my_test_event
# action:
# - service: script.notify_me
# data_template:
# data:
# message: "Test Event Captured with data foo: {{ trigger.event.data.foo }}"
#########################################################################################################
@ -122,7 +122,7 @@
# - binary_sensor.den_motion
# action:
# - service_template: 'switch.turn_{{ trigger.to_state.state }}'
# data_template:
# data:
# entity_id: '{{ trigger.entity_id.replace("binary_sensor", "group") }}'
#########################################################################################################
@ -142,7 +142,7 @@
# before: '02:00:00'
# action:
# - service_template: scene.turn_on
# data_template:
# data:
# entity_id: >-
# {%set elevation = states.sun.sun.attributes.elevation | int %}
# {% if elevation > -10 and elevation | int < 5 %}
@ -194,7 +194,7 @@
# seconds: 30
# action:
# - service: mqtt.publish
# data_template:
# data:
# payload: '{"state": "open"}'
# topic: >-
# {% set mapping = '{ "hallway": "985335", "livingroom": "854267", "kitchen": "699555" }' %}
@ -220,7 +220,7 @@
# test_script:
# sequence:
# - service_template: light.turn_on
# data_template:
# data:
# entity_id: >
# {% for e in entities_list %}
# {%- if loop.first %}{% elif loop.last %}, {% else %}, {% endif -%}
@ -295,7 +295,7 @@
# alias: Text to Enter on Remote
# sequence:
# - service_template: script.text_loop
# data_template:
# data:
# text: "Netflix"
# text_loop:
@ -304,7 +304,7 @@
# - condition: template
# value_template: "{{ 'true' if (states.input_number.text_index.state |int < text|length | int) else 'false' }}"
# - service_template: script.key_input
# data_template:
# data:
# command: >-
# {%- set index = states.input_number.text_index.state | int -%}
# {{ text[index:index+1] }}
@ -314,16 +314,16 @@
# alias: Send Key Input
# sequence:
# - service: media_player.firetv_adb_shell
# data_template:
# data:
# entity_id: media_player.televisione_camera
# cmd: "input keyevent {{ command | upper }}"
# - delay: '00:00:01'
# - service: input_number.set_value
# data_template:
# data:
# entity_id: input_number.text_index
# value: "{{ (states.input_number.text_index.state | int + 1) }}"
# - service: script.text_loop
# data_template:
# data:
# text: "{{ text }}"
#########################################################################################################
@ -341,7 +341,7 @@
# {{ ns.lowBattery }}
# action:
# - service: script.voice_notify
# data_template:
# data:
# message: >
# {% set ns = namespace(lowBattery) %}
# {%- for x in states if x.attributes and x.attributes.battery_level and x.attributes.battery_level |int <= 24 %}
@ -367,11 +367,11 @@
# alias: Run X Times
# sequence:
# - service: input_number.set_value
# data_template:
# data:
# entity_id: input_number.loop_index
# value: 0
# - service_template: script.loop_one
# data_template:
# data:
# count: "{{ count }}"
# loop_one:
@ -380,13 +380,13 @@
# - condition: template
# value_template: "{{ 'true' if (states.input_number.loop_index.state |int < count | int) else 'false' }}"
# - service: mqtt.publish
# data_template:
# data:
# topic: "/loop/test"
# payload: "{{ states.input_number.loop_index.state | int }}"
# retain: false
# - delay: '00:00:00'
# - service: script.loop_two
# data_template:
# data:
# count: "{{ count |int}}"
# loop_two:
@ -394,11 +394,11 @@
# sequence:
# - delay: '00:00:00'
# - service: input_number.set_value
# data_template:
# data:
# entity_id: input_number.loop_index
# value: "{{ (states.input_number.loop_index.state | int + 1) |int }}"
# - service: script.loop_one
# data_template:
# data:
# count: "{{ count|int }}"
#######################################################################
@ -781,7 +781,7 @@
# # topic: "robotic_mower/control/mode"
# # action:
# # - service: input_select.select_option
# # data_template:
# # data:
# # entity_id: input_select.bob_command
# # option: "{{ trigger.payload }}"
@ -794,7 +794,7 @@
# to: 'Front Collision'
# action:
# - service: notify.leandro
# data_template:
# data:
# message: "Robotgräsklippare har kolliderat"
# data:
# priority: '1'
@ -807,7 +807,7 @@
# data:
# volume_level: '0.7'
# - service: notify.alexa_media
# data_template:
# data:
# data:
# type: announce
# method: speak
@ -1003,7 +1003,7 @@
# alias: Push Ecobee target temp to the other thermostats
# sequence:
# - service: climate.set_temperature
# data_template:
# data:
# entity_id: climate.cooler_fan
# temperature: "{{ states.climate.main_floor.temperature |float }}"
@ -1045,14 +1045,14 @@
# - service: input_boolean.toggle
# entity_id: input_boolean.dummy
# - service: camera.record
# data_template:
# data:
# entity_id: camera.fremme
# filename: "/tmp/{{- trigger.entity_id.split('.')[1].split('_')[1] -}}_{{- states.input_boolean.dummy_fremme.last_updated.strftime('%Y%m%d-%H%M%S') -}}.mp4"
# duration: 20
# lookback: 10
# - delay: "00:00:20"
# - service: notify.eirikz_telegram
# data_template:
# data:
# title: "Doods"
# message: "fremme"
# data:
@ -1081,20 +1081,19 @@
# - service: input_boolean.toggle
# entity_id: input_boolean.dummy
# - service: input_label.set_value
# data_template:
# data:
# entity_id: "input_label.file_1"
# value: "/tmp/{{- trigger.entity_id.split('.')[1] -}}_{{- states.input_boolean.dummy.last_updated.strftime('%Y%m%d-%H%M%S') -}}.mp4"
# - delay: "00:00:05"
# - service: input_label.set_value
# data_template:
# data:
# entity_id: "input_label.file_2"
# value: "/tmp/{{- trigger.entity_id.split('.')[1] -}}_{{- states.input_boolean.dummy.last_updated.strftime('%Y%m%d-%H%M%S') -}}.mp4"
# {% for x in states if 'sensor.illumination_' in x.entity_id %}
# {{ x.name}} - {{ x.attributes.battery_level }}
# {%- endfor %}
# {% for x in states if 'sensor.battery_' in x.entity_id %}
# {{ x.name}} - {{ x.state }}
# {%- endfor %}
# {%- endfor %}

View File

@ -44,6 +44,6 @@ automation:
entity_id: input_text.tts
action:
- service: script.voice_notify
data_template:
data:
message: "{{ trigger.to_state.state }}"
greeting: "{{ 'yes' if states('input_boolean.greeting') == 'on' else 'no' }}"

View File

@ -22,7 +22,6 @@ binary_sensor:
#
###############################################################################
automation:
- alias: TV Status ON
initial_state: true
trigger:
@ -31,7 +30,7 @@ automation:
to: "on"
action:
- service: mqtt.publish
data_template:
data:
topic: "/home/sharptv"
payload: "on"
retain: true
@ -44,12 +43,11 @@ automation:
to: "unavailable"
action:
- service: mqtt.publish
data_template:
data:
topic: "/home/sharptv"
payload: "off"
retain: true
# Dim Family Room Lights When TV is Turned ON
###############################################################################
- alias: TV Dim Indoor Lights when TV is ON

View File

@ -60,12 +60,12 @@ automation:
state: "off"
- condition: template
value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}"
- condition: state
entity_id: input_boolean.light_automations
state: "on"
# - condition: state
# entity_id: input_boolean.light_automations
# state: "on"
action:
- service: script.notify_family
data_template:
data:
message: >
Your {{ trigger.to_state.attributes.friendly_name }} is OPEN for more than 5 minutes!
notify_options:
@ -96,10 +96,10 @@ automation:
state: "on"
action:
- service: switch.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- service: script.notify_family
data_template:
data:
message: >
{{ trigger.to_state.attributes.friendly_name }} is ON during the day time. Saving power by turning it off!
notify_options:
@ -140,7 +140,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Guest Bathroom Lights WatchDog
@ -158,7 +158,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Master Bathroom Lights WatchDog
@ -176,7 +176,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Garage Lights WatchDog
@ -194,7 +194,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Garage Shop Lights WatchDog
@ -212,7 +212,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Guest Bathroom Exhaust WatchDog
@ -230,7 +230,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Master Bathroom Shower Exhaust WatchDog
@ -248,7 +248,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Master Bathroom Toilet Exhaust WatchDog
@ -266,7 +266,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
#############################################################################
@ -288,7 +288,7 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Hasika Bedroom Closet WatchDog
@ -306,5 +306,5 @@ automation:
state: "on"
action:
- service: homeassistant.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"

View File

@ -193,7 +193,7 @@ automation:
value_template: "{% if states.sensor.dark_sky_wind_speed.state | round < 8 %} false {% else %} true {% endif %}"
action:
- service: script.notify_family
data_template:
data:
message: >
{% set windspeed = states.sensor.dark_sky_wind_speed.state | round %}
{% if ( windspeed > 7 and ( windspeed <= 15 ) and (states.input_boolean.nice_breeze_alert.state == 'off')) %}
@ -212,7 +212,7 @@ automation:
- tv
- led
- service: input_boolean.turn_on
data_template:
data:
entity_id: >-
{%- set windspeed = states.sensor.dark_sky_wind_speed.state | round -%}
{%- if ( windspeed > 7 and ( windspeed <= 15 ) ) -%}
@ -234,7 +234,7 @@ automation:
entity_id: sensor.dark_sky_wind_speed
action:
- service: input_boolean.turn_on
data_template:
data:
entity_id: >-
{%- set windspeed = states.sensor.dark_sky_wind_speed.state | round -%}
{%- if ( windspeed > 7 and ( windspeed <= 15 ) ) -%}
@ -270,7 +270,7 @@ automation:
minutes: 15
action:
- service: input_boolean.turn_off
data_template:
data:
entity_id: "{{ trigger.entity_id }}"
- alias: Alert Super Heavy Winds
@ -288,7 +288,7 @@ automation:
{%- endif -%}
action:
- service: script.notify_family
data_template:
data:
message: >
{% set windspeed = states.sensor.dark_sky_wind_speed.state | round %}
{% if ( windspeed > 40 ) and ( windspeed <= 60 ) and (states.input_boolean.super_heavy_wind_alert.state == 'off') %}
@ -318,14 +318,14 @@ automation:
value_template: "{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}"
action:
- service: script.notify_family
data_template:
data:
message: "{{ trigger.to_state.state | title }} with intensity {{ states.sensor.dark_sky_precip_intensity.state | float }} inches per hour"
notify_options:
- telegram
- tv
- led
- service: input_boolean.turn_on
data_template:
data:
entity_id: >
{% set curState = trigger.to_state.state | lower %}
{%- if curState == "rain" -%}
@ -349,7 +349,7 @@ automation:
value_template: "{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}"
action:
- service: script.notify_family
data_template:
data:
message: "{{ trigger.to_state.state | title }} with intensity {{ states.sensor.dark_sky_precip_intensity.state | float }} inches per hour"
notify_options:
- telegram
@ -357,7 +357,7 @@ automation:
- tv
- led
- service: input_boolean.turn_on
data_template:
data:
entity_id: >
{% set curState = trigger.to_state.state | lower %}
{%- if curState == "snow" %}

View File

@ -92,7 +92,7 @@ automation:
state: "on"
action:
- service: light.turn_on
data_template:
data:
entity_id: light.hue_color_lamp_1, light.hue_color_lamp_2, light.hue_color_lamp_3
rgb_color:
- "{{ range(0,255) |random }}"
@ -370,14 +370,14 @@ automation:
state: "on"
action:
- service: light.turn_on
data_template:
data:
entity_id: light.master_bedroom_1
rgb_color:
- "{{ range(0,255) |random }}"
- "{{ range(0,255) |random }}"
- "{{ range(0,255) |random }}"
- service: light.turn_on
data_template:
data:
entity_id: light.master_bedroom_2
rgb_color:
- "{{ range(0,255) |random }}"
@ -482,21 +482,21 @@ script:
- tv
- led
- service: camera.snapshot
data_template:
data:
entity_id: "camera.frontdoor_camera"
filename:
"{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
(state_attr('script.doorbell_camera_pics', 'last_triggered') ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot
data_template:
data:
entity_id: "camera.driveway_camera"
filename:
"{{ '/config/www/downloads/camera/driveway/driveway_' ~
(state_attr('script.doorbell_camera_pics', 'last_triggered') ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.telegram
data_template:
data:
title: "Door Bell"
message: "Someone rang door bell!"
data:
@ -510,7 +510,7 @@ script:
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
caption: "Someone rang door bell!"
- service: script.notify_family
data_template:
data:
message: Someone rang door bell!
url: "{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
(state_attr('script.doorbell_camera_pics', 'last_triggered') ~ '').replace('-','_')

View File

@ -54,7 +54,7 @@ automation:
value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}"
action:
- service: script.notify_family
data_template:
data:
message: >
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
notify_options:
@ -79,7 +79,7 @@ automation:
value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}"
action:
- service: script.notify_family
data_template:
data:
message: "{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just left {{ trigger.zone.attributes.friendly_name }}."
notify_options:
- telegram
@ -108,7 +108,7 @@ automation:
state: "on"
action:
- service: script.notify_family
data_template:
data:
message: >
Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[1] | title }}!
notify_options:
@ -162,7 +162,7 @@ automation:
value_template: '{{ states.proximity.home.attributes.dir_of_travel == "towards" }}'
action:
- service: script.notify_family
data_template:
data:
message: "Suresh is on his way home, he is within the 5 miles range. Should be home soon!"
notify_options:
- telegram

View File

@ -47,7 +47,7 @@ except Exception as ex:
value_template: "{{ trigger.event.data.new_state.attributes.battery_level | default(999) | int != 999 }}"
action:
- service: python_script.batteries
data_template:
data:
entity_id: "input_label.{{- trigger.event.data.entity_id.split('.')[1] -}}"
battery_value: '{{ trigger.event.data.new_state.attributes.battery_level }}'
"""