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

View File

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

View File

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

View File

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

View File

@ -36,7 +36,7 @@ automation:
value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}" value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "{{ trigger.to_state.attributes.friendly_name | title }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%." message: "{{ trigger.to_state.attributes.friendly_name | title }}'s phone battery is : {{ trigger.to_state.attributes.battery }}%."
notify_options: notify_options:
- telegram - telegram
@ -59,7 +59,7 @@ automation:
value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}" value_template: "{{ states('input_boolean.battery_alerts') == 'on' }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
Sensors with low batteries (<25): Sensors with low batteries (<25):
{% set ns = namespace(lowBattery="") -%} {% 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 }}" value_template: "{{ trigger.to_state.state | int > 0 and trigger.to_state.state | int < 30 }}"
action: action:
- service: script.notify_family - 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!" message: "{{ trigger.entity_id.split('.')[1].split('_')[0] | title }}'s Birthday is only {{ trigger.to_state.state }} days to go!"
notify_options: notify_options:
- telegram - telegram
@ -100,7 +100,7 @@ automation:
value_template: "{{ trigger.to_state.state | int == 0 }}" value_template: "{{ trigger.to_state.state | int == 0 }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "Hurray! Today is {{ trigger.entity_id.split('.')[1].split('_')[0] | title }}'s Birthday!" message: "Hurray! Today is {{ trigger.entity_id.split('.')[1].split('_')[0] | title }}'s Birthday!"
notify_options: notify_options:
- telegram - telegram
@ -134,7 +134,7 @@ automation:
value_template: "{{ states('input_label.mallika_birthday_days2go') | int == 0 }}" value_template: "{{ states('input_label.mallika_birthday_days2go') | int == 0 }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: !include ../templates/birthday_wishes.yaml message: !include ../templates/birthday_wishes.yaml
notify_options: notify_options:
- voice - voice
@ -158,7 +158,7 @@ automation:
value_template: "{{ states('input_label.mallika_birthday').split('-') | length > 0 }}" value_template: "{{ states('input_label.mallika_birthday').split('-') | length > 0 }}"
action: action:
- service: input_label.set_value - service: input_label.set_value
data_template: data:
entity_id: input_label.srinika_birthday_days2go entity_id: input_label.srinika_birthday_days2go
value: > value: >
{% set year = states('sensor.date').split('-')[0] %} {% set year = states('sensor.date').split('-')[0] %}
@ -177,7 +177,7 @@ automation:
- -
{% endif %} {% endif %}
- service: input_label.set_value - service: input_label.set_value
data_template: data:
entity_id: input_label.hasika_birthday_days2go entity_id: input_label.hasika_birthday_days2go
value: > value: >
{% set year = states('sensor.date').split('-')[0] %} {% set year = states('sensor.date').split('-')[0] %}
@ -196,7 +196,7 @@ automation:
- -
{% endif %} {% endif %}
- service: input_label.set_value - service: input_label.set_value
data_template: data:
entity_id: input_label.mallika_birthday_days2go entity_id: input_label.mallika_birthday_days2go
value: > value: >
{% set year = states('sensor.date').split('-')[0] %} {% set year = states('sensor.date').split('-')[0] %}

View File

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

View File

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

View File

@ -60,7 +60,7 @@ automation:
message: "Today is {{ states('sensor.holiday') }}." message: "Today is {{ states('sensor.holiday') }}."
title: "{{ states('sensor.holiday') }}" title: "{{ states('sensor.holiday') }}"
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "Today is: {{states('sensor.holiday') }}" message: "Today is: {{states('sensor.holiday') }}"
notify_options: notify_options:
- telegram - telegram
@ -96,7 +96,7 @@ automation:
{%- endif -%} {%- endif -%}
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: >- message: >-
{%- set days2NextEvent = 0 -%} {%- set days2NextEvent = 0 -%}
{%- if now().year == strptime(states.calendar.holidays_in_india.attributes.start_time, '%Y-%m-%d %H:%M:%S').year -%} {%- 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' }}" value_template: "{{ states('input_boolean.security_system_alerts') == 'on' }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
{% set ns = namespace(openDoorCount=0, doorNames="") %} {% set ns = namespace(openDoorCount=0, doorNames="") %}
{%- set sensors = [ {%- set sensors = [
@ -99,38 +99,38 @@ automation:
- voice - voice
- service: camera.snapshot - service: camera.snapshot
data_template: data:
entity_id: "camera.frontdoor_camera" entity_id: "camera.frontdoor_camera"
filename: "{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~ filename: "{{ '/config/www/downloads/camera/frontdoor/frontdoor_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_') (states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}" .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot - service: camera.snapshot
data_template: data:
entity_id: "camera.driveway_camera" entity_id: "camera.driveway_camera"
filename: "{{ '/config/www/downloads/camera/driveway/driveway_' ~ filename: "{{ '/config/www/downloads/camera/driveway/driveway_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_') (states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}" .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot - service: camera.snapshot
data_template: data:
entity_id: "camera.garage" entity_id: "camera.garage"
filename: "{{ '/config/www/downloads/camera/garage/garage_' ~ filename: "{{ '/config/www/downloads/camera/garage/garage_' ~
(states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_') (states.binary_sensor.motion_sensor_158d00024ee084.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}" .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot - service: camera.snapshot
data_template: data:
entity_id: "camera.patio_camera" entity_id: "camera.patio_camera"
filename: "{{ '/config/www/downloads/camera/patio/patio_' ~ filename: "{{ '/config/www/downloads/camera/patio/patio_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_') (states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}" .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: camera.snapshot - service: camera.snapshot
data_template: data:
entity_id: "camera.playarea_camera" entity_id: "camera.playarea_camera"
filename: "{{ '/config/www/downloads/camera/playarea/playarea_' ~ filename: "{{ '/config/www/downloads/camera/playarea/playarea_' ~
(states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_') (states.binary_sensor.motion_sensor_158d00024e842c.last_updated ~ '').replace('-','_')
.replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}" .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg' }}"
- service: notify.telegram - service: notify.telegram
data_template: data:
title: "Camera Snapshots" title: "Camera Snapshots"
message: "Please check the camera images just to be sure!" message: "Please check the camera images just to be sure!"
data: data:
@ -176,7 +176,7 @@ automation:
{%- endif -%} {%- endif -%}
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
{% if states('alarm_control_panel.home') == "armed_home" %} {% if states('alarm_control_panel.home') == "armed_home" %}
Your home is now secured! Your home is now secured!
@ -300,11 +300,11 @@ automation:
- service: switch.turn_on - service: switch.turn_on
entity_id: switch.garage entity_id: switch.garage
- service: camera.snapshot - service: camera.snapshot
data_template: data:
entity_id: "camera.garage" 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' }}" 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 - service: script.notify_family
data_template: data:
message: > 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! 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_' ~ 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 entity_id: sensor.dark_sky_apparent_temperature, sensor.dark_sky_hourly_summary
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
{{ states('sensor.dark_sky_apparent_temperature') |int }} degrees, {{ states('sensor.dark_sky_hourly_summary') }} {{ states('sensor.dark_sky_apparent_temperature') |int }} degrees, {{ states('sensor.dark_sky_hourly_summary') }}
notify_options: notify_options:
- tv - tv
- led - led
############################################################################### # ###############################################################################
# Display Garage Door Status on LED Screen # # Display Garage Door Status on LED Screen
############################################################################### # ###############################################################################
- alias: Notify Garage Door Status on LED Screen # - alias: Notify Garage Door Status on LED Screen
initial_state: true # initial_state: true
trigger: # trigger:
platform: state # platform: state
entity_id: # entity_id:
- binary_sensor.door_window_sensor_158d0004231f7b # - binary_sensor.door_window_sensor_158d0004231f7b
- binary_sensor.door_window_sensor_158d0004248d5b # - binary_sensor.door_window_sensor_158d0004248d5b
condition: # condition:
- condition: template # - condition: template
value_template: "{{ trigger.from_state.state not in ['unavailable', 'unknown'] }}" # value_template: "{{ trigger.from_state.state not in ['unavailable', 'unknown'] }}"
- condition: template # - condition: template
value_template: "{{ trigger.to_state.state not in ['unavailable', 'unknown'] }}" # value_template: "{{ trigger.to_state.state not in ['unavailable', 'unknown'] }}"
- condition: template # - condition: template
value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}" # value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}"
action: # action:
- service: script.notify_family # - service: script.notify_family
data_template: # data:
message: > # message: >
{% set doors = "" %} # {% set doors = "" %}
{% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and # {% if states('binary_sensor.door_window_sensor_158d0004231f7b') == "on" and
states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" %} # states('binary_sensor.door_window_sensor_158d0004248d5b') == "on" %}
{% set doors = "Attention! Both Garage Doors are OPEN" %} # {% set doors = "Attention! Both Garage Doors are OPEN" %}
{% elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and # {% elif states('binary_sensor.door_window_sensor_158d0004231f7b') == "off" and
states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" %} # states('binary_sensor.door_window_sensor_158d0004248d5b') == "off" %}
{% set doors = "Both Garage Doors are now CLOSED" %} # {% set doors = "Both Garage Doors are now CLOSED" %}
{% else %} # {% else %}
{% if trigger.to_state.state | lower == "on" %} # {% if trigger.to_state.state | lower == "on" %}
Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED! # Attention! Your {{ trigger.to_state.attributes.friendly_name }} is now OPENED!
{% elif trigger.to_state.state | lower == "off" %} # {% elif trigger.to_state.state | lower == "off" %}
Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED! # Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED!
{% endif %} # {% endif %}
{% endif %} # {% endif %}
{{ doors }} # {{ doors }}
notify_options: # notify_options:
- telegram # - telegram
- tv # - tv
- led # - led
############################################################################### ###############################################################################
# Display Zone based Messages on LED Screen # Display Zone based Messages on LED Screen
@ -76,7 +76,7 @@ automation:
for: "00:02:00" for: "00:02:00"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[1] | title }}" message: "Welcome home, {{ trigger.entity_id.split('.')[1].split('_')[1] | title }}"
notify_options: notify_options:
- tv - tv
@ -98,7 +98,7 @@ automation:
value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}" value_template: "{{ states('input_boolean.zone_alerts') == 'on' }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
{{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}! {{ trigger.entity_id.split('.')[1].split('_')[1] | title}} just entered {{ trigger.zone.attributes.friendly_name }}!
notify_options: notify_options:

View File

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

View File

@ -48,7 +48,7 @@ automation:
entity_id: sensor.dining_room_thermostat_operation_mode entity_id: sensor.dining_room_thermostat_operation_mode
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "Nest Thermostat changed from '{{ trigger.from_state.state }}' to '{{ trigger.to_state.state }}'." message: "Nest Thermostat changed from '{{ trigger.from_state.state }}' to '{{ trigger.to_state.state }}'."
notify_options: notify_options:
- telegram - telegram
@ -63,6 +63,6 @@ script:
toggle_climate: toggle_climate:
sequence: sequence:
- service: climate.set_away_mode - service: climate.set_away_mode
data_template: data:
entity_id: climate.dining_room entity_id: climate.dining_room
away_mode: "{{ false if state_attr('climate.dining_room', 'away_mode') == 'on' else true }}" 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 != "" }}' value_template: '{{ message | trim != "" }}'
- service: script.notify_on_led_screen - service: script.notify_on_led_screen
data_template: data:
message: "{{ message }}" message: "{{ message }}"
notify_options: "{{ notify_options }}" notify_options: "{{ notify_options }}"
- service: script.notify_firestick - service: script.notify_firestick
data_template: data:
url: "{{ url }}" url: "{{ url }}" # local url
path: "{{ file }}" # local path
title: "{{ title }}" title: "{{ title }}"
message: "{{ message }}" message: "{{ message }}"
notify_options: "{{ notify_options }}" notify_options: "{{ notify_options }}"
- service: script.notify_telegram - service: script.notify_telegram
data_template: data:
file: "{{ url }}" file: "{{ url }}"
title: "{{ title }}" title: "{{ title }}"
message: "{{ message }}" message: "{{ message }}"
notify_options: "{{ notify_options }}" notify_options: "{{ notify_options }}"
- service: script.notify_email - service: script.notify_email
data_template: data:
title: "{{ title }}" title: "{{ title }}"
message: "{{ message }}" message: "{{ message }}"
notify_options: "{{ notify_options }}" notify_options: "{{ notify_options }}"
- service: script.notify_voice - service: script.notify_voice
data_template: data:
message: "{{ message }}" message: "{{ message }}"
notify_options: "{{ notify_options }}" notify_options: "{{ notify_options }}"
@ -134,7 +135,9 @@ script:
data: data:
color: red color: red
duration: 7 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 path: "{{ url }}" #/config/www/downloads/camera/driveway/driveway_20220604_185216.jpg
icon: icon:
path: > path: >
@ -150,14 +153,10 @@ script:
state: "on" state: "on"
- condition: template - condition: template
value_template: "{{ 'telegram' in notify_options }}" value_template: "{{ 'telegram' in notify_options }}"
- service: telegram_bot.send_message - service: notify.telegram
data: data:
title: "{{- title -}}" message: "{{ message }}"
message: "{{- message -}}" title: "{{ title }}"
data:
photo:
- file: "{{- file -}}"
caption: "{{- title -}}"
notify_email: notify_email:
sequence: sequence:
@ -167,9 +166,12 @@ script:
- condition: template - condition: template
value_template: "{{ 'email' in notify_options }}" value_template: "{{ 'email' in notify_options }}"
- service: notify.notify_smtp - service: notify.notify_smtp
data_template: data:
title: "{{ title }}" title: "{{ title }}"
message: "{{ message }}" message: "{{ message }}"
data:
images:
- "{{- path -}}"
notify_voice: notify_voice:
sequence: sequence:
@ -179,7 +181,7 @@ script:
- condition: template - condition: template
value_template: "{{ 'voice' in notify_options }}" value_template: "{{ 'voice' in notify_options }}"
- service: script.voice_notify - service: script.voice_notify
data_template: data:
message: "{{ message }}" message: "{{ message }}"
notify_on_led_screen: notify_on_led_screen:
@ -190,7 +192,7 @@ script:
- condition: template - condition: template
value_template: "{{ 'led' in notify_options }}" value_template: "{{ 'led' in notify_options }}"
- service: mqtt.publish - service: mqtt.publish
data_template: data:
topic: messageboard/messages topic: messageboard/messages
payload: "{{ message }}" payload: "{{ message }}"
@ -223,7 +225,7 @@ script:
{% endif %} {% endif %}
- service: media_player.volume_set - service: media_player.volume_set
entity_id: media_player.living_room, media_player.upstairs entity_id: media_player.living_room, media_player.upstairs
data_template: data:
volume_level: > volume_level: >
{% if states('input_boolean.emergency_mode') == "on" %} {% if states('input_boolean.emergency_mode') == "on" %}
{{ states('input_number.tts_volume_level_alert') }} {{ states('input_number.tts_volume_level_alert') }}
@ -238,7 +240,7 @@ script:
{% endif %} {% endif %}
- service: tts.amazon_polly_say - service: tts.amazon_polly_say
entity_id: media_player.living_room, media_player.upstairs entity_id: media_player.living_room, media_player.upstairs
data_template: data:
cache: true cache: true
message: > message: >
{% set msg = "" %} {% set msg = "" %}
@ -273,7 +275,7 @@ script:
sequence: sequence:
- service: tts.amazon_polly_say - service: tts.amazon_polly_say
entity_id: media_player.living_room, media_player.upstairs entity_id: media_player.living_room, media_player.upstairs
data_template: data:
cache: true cache: true
message: > message: >
{% set msg = "" %} {% set msg = "" %}

View File

@ -65,7 +65,7 @@ automation:
from: "off" from: "off"
action: action:
- service: input_label.set_value - service: input_label.set_value
data_template: data:
entity_id: input_label.pill_taken_at entity_id: input_label.pill_taken_at
value: "{{ as_timestamp(now()) | timestamp_custom('%m/%d/%Y %I:%M %p') }}" value: "{{ as_timestamp(now()) | timestamp_custom('%m/%d/%Y %I:%M %p') }}"
- delay: - delay:
@ -143,7 +143,7 @@ script:
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.pill_taken entity_id: input_boolean.pill_taken
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
Thank you for taking tablets. Thank you for taking tablets.
{%- if state_attr('sensor.allergy_index_today', 'rating') != None %} {%- 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 }}" value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "NAS Status changed to: {{ trigger.to_state.state| upper }}" message: "NAS Status changed to: {{ trigger.to_state.state| upper }}"
notify_options: notify_options:
- telegram - telegram
@ -139,7 +139,7 @@ automation:
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}" value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "NAS Drive state changed to: {{ trigger.to_state.state| upper }} from '{{ trigger.from_state.state| upper }}'" message: "NAS Drive state changed to: {{ trigger.to_state.state| upper }} from '{{ trigger.from_state.state| upper }}'"
notify_options: notify_options:
- telegram - telegram
@ -153,7 +153,7 @@ automation:
above: 125 above: 125
action: action:
- service: script.notify_family - 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 }}" message: "NAS CPU temperature is going crazy hot, needs your attention!!! Current cpu temp is: {{ trigger.to_state.state }}"
notify_options: notify_options:
- telegram - telegram
@ -167,7 +167,7 @@ automation:
above: 80 above: 80
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "Attention! NAS disk usage is above 80 percent. Time to clean up?" message: "Attention! NAS disk usage is above 80 percent. Time to clean up?"
notify_options: notify_options:
- telegram - telegram
@ -182,7 +182,7 @@ automation:
for: "00:05:00" for: "00:05:00"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "FYI - NAS Memory is above 80 percent for more than 5 minutes." message: "FYI - NAS Memory is above 80 percent for more than 5 minutes."
notify_options: notify_options:
- telegram - telegram
@ -197,7 +197,7 @@ automation:
for: "00:05:00" for: "00:05:00"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: "FYI - NAS CPU is above 80 percent for more than 5 minutes." message: "FYI - NAS CPU is above 80 percent for more than 5 minutes."
notify_options: notify_options:
- telegram - telegram

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -60,12 +60,12 @@ automation:
state: "off" state: "off"
- condition: template - condition: template
value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}" value_template: "{{ states('input_boolean.garage_door_notifications') == 'on' }}"
- condition: state # - condition: state
entity_id: input_boolean.light_automations # entity_id: input_boolean.light_automations
state: "on" # state: "on"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
Your {{ trigger.to_state.attributes.friendly_name }} is OPEN for more than 5 minutes! Your {{ trigger.to_state.attributes.friendly_name }} is OPEN for more than 5 minutes!
notify_options: notify_options:
@ -96,10 +96,10 @@ automation:
state: "on" state: "on"
action: action:
- service: switch.turn_off - service: switch.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
{{ trigger.to_state.attributes.friendly_name }} is ON during the day time. Saving power by turning it off! {{ trigger.to_state.attributes.friendly_name }} is ON during the day time. Saving power by turning it off!
notify_options: notify_options:
@ -140,7 +140,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Guest Bathroom Lights WatchDog - alias: Guest Bathroom Lights WatchDog
@ -158,7 +158,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Master Bathroom Lights WatchDog - alias: Master Bathroom Lights WatchDog
@ -176,7 +176,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Garage Lights WatchDog - alias: Garage Lights WatchDog
@ -194,7 +194,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Garage Shop Lights WatchDog - alias: Garage Shop Lights WatchDog
@ -212,7 +212,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Guest Bathroom Exhaust WatchDog - alias: Guest Bathroom Exhaust WatchDog
@ -230,7 +230,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Master Bathroom Shower Exhaust WatchDog - alias: Master Bathroom Shower Exhaust WatchDog
@ -248,7 +248,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Master Bathroom Toilet Exhaust WatchDog - alias: Master Bathroom Toilet Exhaust WatchDog
@ -266,7 +266,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
############################################################################# #############################################################################
@ -288,7 +288,7 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Hasika Bedroom Closet WatchDog - alias: Hasika Bedroom Closet WatchDog
@ -306,5 +306,5 @@ automation:
state: "on" state: "on"
action: action:
- service: homeassistant.turn_off - service: homeassistant.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" 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 %}" value_template: "{% if states.sensor.dark_sky_wind_speed.state | round < 8 %} false {% else %} true {% endif %}"
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
{% set windspeed = states.sensor.dark_sky_wind_speed.state | round %} {% 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')) %} {% if ( windspeed > 7 and ( windspeed <= 15 ) and (states.input_boolean.nice_breeze_alert.state == 'off')) %}
@ -212,7 +212,7 @@ automation:
- tv - tv
- led - led
- service: input_boolean.turn_on - service: input_boolean.turn_on
data_template: data:
entity_id: >- entity_id: >-
{%- set windspeed = states.sensor.dark_sky_wind_speed.state | round -%} {%- set windspeed = states.sensor.dark_sky_wind_speed.state | round -%}
{%- if ( windspeed > 7 and ( windspeed <= 15 ) ) -%} {%- if ( windspeed > 7 and ( windspeed <= 15 ) ) -%}
@ -234,7 +234,7 @@ automation:
entity_id: sensor.dark_sky_wind_speed entity_id: sensor.dark_sky_wind_speed
action: action:
- service: input_boolean.turn_on - service: input_boolean.turn_on
data_template: data:
entity_id: >- entity_id: >-
{%- set windspeed = states.sensor.dark_sky_wind_speed.state | round -%} {%- set windspeed = states.sensor.dark_sky_wind_speed.state | round -%}
{%- if ( windspeed > 7 and ( windspeed <= 15 ) ) -%} {%- if ( windspeed > 7 and ( windspeed <= 15 ) ) -%}
@ -270,7 +270,7 @@ automation:
minutes: 15 minutes: 15
action: action:
- service: input_boolean.turn_off - service: input_boolean.turn_off
data_template: data:
entity_id: "{{ trigger.entity_id }}" entity_id: "{{ trigger.entity_id }}"
- alias: Alert Super Heavy Winds - alias: Alert Super Heavy Winds
@ -288,7 +288,7 @@ automation:
{%- endif -%} {%- endif -%}
action: action:
- service: script.notify_family - service: script.notify_family
data_template: data:
message: > message: >
{% set windspeed = states.sensor.dark_sky_wind_speed.state | round %} {% 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') %} {% 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 }}" value_template: "{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}"
action: action:
- service: script.notify_family - 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" message: "{{ trigger.to_state.state | title }} with intensity {{ states.sensor.dark_sky_precip_intensity.state | float }} inches per hour"
notify_options: notify_options:
- telegram - telegram
- tv - tv
- led - led
- service: input_boolean.turn_on - service: input_boolean.turn_on
data_template: data:
entity_id: > entity_id: >
{% set curState = trigger.to_state.state | lower %} {% set curState = trigger.to_state.state | lower %}
{%- if curState == "rain" -%} {%- if curState == "rain" -%}
@ -349,7 +349,7 @@ automation:
value_template: "{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}" value_template: "{{ states.sensor.dark_sky_precip_probability.state | int == 1 }}"
action: action:
- service: script.notify_family - 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" message: "{{ trigger.to_state.state | title }} with intensity {{ states.sensor.dark_sky_precip_intensity.state | float }} inches per hour"
notify_options: notify_options:
- telegram - telegram
@ -357,7 +357,7 @@ automation:
- tv - tv
- led - led
- service: input_boolean.turn_on - service: input_boolean.turn_on
data_template: data:
entity_id: > entity_id: >
{% set curState = trigger.to_state.state | lower %} {% set curState = trigger.to_state.state | lower %}
{%- if curState == "snow" %} {%- if curState == "snow" %}

View File

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

View File

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