diff --git a/packages/door_sensors.yaml b/packages/door_sensors.yaml index f64c786..89d5147 100644 --- a/packages/door_sensors.yaml +++ b/packages/door_sensors.yaml @@ -145,32 +145,32 @@ automation: ((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_') .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }}" - # - 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 }} - # url: > - # {{ '/config/www/downloads/camera/garage/garage_' ~ - # ((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_') - # .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }} - # notify_options: - # - telegram - # - email - # - tv + - 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 }} + url: > + {{ '/config/www/downloads/camera/garage/garage_' ~ + ((state_attr('automation.notify_garage_door_status', 'last_triggered') |string).replace('-','_') + .replace(' ', '_').replace(':','_').replace('.','_').replace('+','_') ~ '.jpg') }} + notify_options: + - telegram + - email + - tv - service: switch.turn_off entity_id: switch.garage diff --git a/packages/notify.yaml b/packages/notify.yaml index 9587124..d012f88 100644 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -123,7 +123,7 @@ script: notify_firestick: sequence: - condition: state - entity_id: input_boolean.firetv_alerts + entity_id: input_boolean.firetv_notifications state: "on" - condition: template value_template: "{{ 'tv' in notify_options }}"