This commit is contained in:
Mahasri Kalavala 2022-12-04 14:33:29 -05:00
parent 6a55c0f49f
commit 2d312aaf11
2 changed files with 27 additions and 27 deletions

View File

@ -145,32 +145,32 @@ automation:
((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') }}"
# - service: script.notify_family - service: script.notify_family
# data_template: data_template:
# 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.from_state.state != trigger.to_state.state and trigger.to_state.state | lower == "on" %} {% 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!" %} {% 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" %} {% 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!" %} {% set doors = "Your {{ trigger.to_state.attributes.friendly_name }} is now CLOSED!" %}
# {% endif %} {% endif %}
# {% endif %} {% endif %}
# {{ doors }} {{ doors }}
# url: > url: >
# {{ '/config/www/downloads/camera/garage/garage_' ~ {{ '/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 - telegram
# - email - email
# - tv - tv
- service: switch.turn_off - service: switch.turn_off
entity_id: switch.garage entity_id: switch.garage

View File

@ -123,7 +123,7 @@ script:
notify_firestick: notify_firestick:
sequence: sequence:
- condition: state - condition: state
entity_id: input_boolean.firetv_alerts entity_id: input_boolean.firetv_notifications
state: "on" state: "on"
- condition: template - condition: template
value_template: "{{ 'tv' in notify_options }}" value_template: "{{ 'tv' in notify_options }}"