#1488 - pLUS REMOVED THE wAZE automations #1463

This commit is contained in:
CCOSTAN 2024-09-03 15:33:20 +00:00
parent 92c4553a38
commit 02efd9ae3d
7 changed files with 401 additions and 388 deletions

View File

@ -1 +1 @@
2024.9.0.dev202408050222 2024.9.0.dev202408230221

View File

@ -22,11 +22,15 @@ automation:
above: 34 above: 34
condition: condition:
- condition: or - condition: time
conditions: after: '08:00:00'
- condition: time before: '20:30:00'
after: '08:00:00' weekday:
before: '20:30:00' - mon
- tue
- wed
- thu
- fri
action: action:
- service: script.notify_engine - service: script.notify_engine

View File

@ -203,10 +203,6 @@
[Include a fact about something that happened in the past on this day at the end of the message] [Include a fact about something that happened in the past on this day at the end of the message]
{% endmacro %} {% endmacro %}
{%- macro traffic_time() -%}
Travel Time to Spectrum: {{ states.sensor.waze_travel_time.state }} minutes.
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text and replaces underscores with spaces #} {# a macro that removes all newline characters, empty spaces, and returns formatted text and replaces underscores with spaces #}
{%- macro cleanup(data) -%} {%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%} {%- for item in data.split("\n") if item | trim != "" -%}
@ -230,12 +226,12 @@
{% set year = current_date.strftime('%Y') %} {% set year = current_date.strftime('%Y') %}
{% set time = current_date.strftime('%I:%M %p') %} {% set time = current_date.strftime('%I:%M %p') %}
Current date time: {{ month }} {{ day }}, {{ year }} {{ time }} Current date time: {{ month }} {{ day }}, {{ year }} {{ time }}
Residents: Residents: Location
- Carlo (Dad): {{ states('person.carlo') }} - Carlo (Dad): {{ states('device_tracker.life360_carlo_costanzo') }} at {{ state_attr('device_tracker.life360_carlo_costanzo', 'place') | replace(' (Costanzo Family)', '') | replace(' (Desantis Family)', '') if state_attr('device_tracker.life360_carlo_costanzo', 'place') != None else 'Away' }}
- Stacey (Mom): {{ states('person.stacey') }} - Stacey (Mom): {{ states('device_tracker.life360_stacey_costanzo')}} at {{ state_attr('device_tracker.life360_stacey_costanzo', 'place') | replace(' (Costanzo Family)', '') | replace(' (Desantis Family)', '') if state_attr('device_tracker.life360_stacey_costanzo', 'place') != None else 'Away' }}
- Justin (Son): {{ states('person.justin') }} - Justin (Son): {{ states('device_tracker.life360_justin_costanzo') }} at {{ state_attr('device_tracker.life360_justin_costanzo', 'place') | replace(' (Costanzo Family)', '') | replace(' (Desantis Family)', '') if state_attr('device_tracker.life360_justin_costanzo', 'place') != None else 'Away' }}
- Paige (Daughter): {{ states('person.paige') }} - Paige (Daughter): {{ states('device_tracker.life360_paige_costanzo') }} at {{ state_attr('device_tracker.life360_paige_costanzo', 'place') | replace(' (Costanzo Family)', '') | replace(' (Desantis Family)', '') if state_attr('device_tracker.life360_paige_costanzo', 'place') != None else 'Away' }}
and our cat Molly: Always home. and our cat Molly: Always home.
Previous broadcast: "{{ state_attr('sensor.openai_response', 'response') }}" Previous broadcast: "{{ state_attr('sensor.openai_response', 'response') }}"
[Avoid repeating information from the previous broadcast if it was within the hour] [Avoid repeating information from the previous broadcast if it was within the hour]
@ -310,10 +306,6 @@
{{ medicine() }} {{ medicine() }}
{% endif %} {% endif %}
{% if day_of_week in ['Mon', 'Wed', 'Sun'] and (hour in [7, 8, 13, 14] or 17 <= hour <= 21) %}
{{ traffic_time() }}
{% endif %}
{% if value1 is not none %} {% if value1 is not none %}
{{ value1 | default }} {{ value1 | default }}
{% endif %} {% endif %}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long