Compare commits

...

3 Commits

Author SHA1 Message Date
github-actions[bot]
536e352b1a Update HA version badge to 2025.5.3 2025-06-11 18:46:47 +00:00
Carlo Costanzo
c5ab958dbf Enhance UV index reporting by adding weather-related tips and improving sensor data display 2025-06-11 14:46:18 -04:00
Carlo Costanzo
571b964dd3 Refactor speech briefing template to improve formatting for resident location display 2025-06-11 14:46:18 -04:00
2 changed files with 28 additions and 15 deletions

View File

@@ -162,12 +162,25 @@
{%- endmacro -%}
{%- macro uv() -%}
{% if states.sensor.pirateweather_uv_index.state|int(9999)>= 6 and states.sensor.pirateweather_uv_index.state|int(9999)<= 7.9 %}
Today's UV index is {{ states.sensor.pirateweather_uv_index.state }}. You should wear sunscreen if going outside.
{% elif states.sensor.pirateweather_uv_index.state|int(9999)>= 8 and states.sensor.pirateweather_uv_index.state|int(9999)<=10.9 %}
Today's UV index is {{ states.sensor.pirateweather_uv_index.state }}. This is VERY HIGH. Be sure wear sunscreen and re-apply.
{% elif states.sensor.pirateweather_uv_index.state|int(9999)>= 11 %}
Today's UV index is {{ states.sensor.pirateweather_uv_index.state }}. This is EXTREME. You should be very cautious going outside.
{% if states.sensor.pirateweather_uv_index.state|int(9999)>= 6 %}
Today's UV index is {{ states.sensor.pirateweather_uv_index.state }}.
{%- for entity in states.sensor if 'pirateweather' in entity.entity_id %}
{%- set state = entity.state %}
{%- set unit = entity.attributes.unit_of_measurement if 'unit_of_measurement' in entity.attributes else '' %}
{%- set friendly_name = ' '.join(entity.attributes.friendly_name.split(' ')[1:]) %}
{%- if state not in ['0', '0.0', 'none'] and 'UV Index' not in friendly_name %}
{%- if 'Temperature' in friendly_name -%}
{{ friendly_name }}: {{ state }} {{ unit }}
{%- elif 'Minutely' in friendly_name -%}
{{ friendly_name }}: {{ state }} {{ unit }}
{%- elif 'Cloud Coverage' in friendly_name and state | float > 75 -%}
{{ friendly_name }}: {{ state }} {{ unit }}
{%- elif 'Humidity' in friendly_name and (state | float < 50 or state | float > 85) -%}
{{ friendly_name }}: {{ state }} {{ unit }}
{%- endif -%}
{%- endif %}
{% endfor -%}
[Give helpful tip based on the current UV index and weather conditions]
{% endif %}
{%- endmacro -%}
@@ -239,26 +252,26 @@
{% set time = current_date.strftime('%I:%M %p') %}
Current date time: {{ month }} {{ day }}, {{ year }} {{ time }}
Residents: Location
- Carlo: {{ states('person.carlo') }} at
Resident: Location
- Carlo:
{%- if states('sensor.carlo_place') != 'unknown' %}
{{ states('sensor.carlo_place') }}
{% else -%}
Away
{% endif -%}
- Stacey: {{ states('person.stacey') }} at
- Stacey:
{%- if states('sensor.stacey_place') != 'unknown' %}
{{ states('sensor.stacey_place') }}
{% else -%}
Away
{% endif -%}
- Justin: {{ states('person.justin') }} at
- Justin:
{%- if states('sensor.justin_place') != 'unknown' %}
{{ states('sensor.justin_place') }}
{% else -%}
Away
{% endif -%}
- Paige: {{ states('person.paige') }} at
- Paige:
{%- if states('sensor.paige_place') != 'unknown' %}
{{ states('sensor.paige_place') }}
{% else -%}

View File

@@ -1,13 +1,13 @@
<svg width="61.5" height="20" viewBox="0 0 615 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="2025.5.3">
<title>2025.5.3</title>
<linearGradient id="gdSJn" x2="0" y2="100%">
<linearGradient id="AnVJX" x2="0" y2="100%">
<stop offset="0" stop-opacity=".1" stop-color="#EEE"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="pGBBy"><rect width="615" height="200" rx="30" fill="#FFF"/></mask>
<g mask="url(#pGBBy)">
<mask id="LNqdx"><rect width="615" height="200" rx="30" fill="#FFF"/></mask>
<g mask="url(#LNqdx)">
<rect width="615" height="200" fill="#08C" x="0"/>
<rect width="615" height="200" fill="url(#gdSJn)"/>
<rect width="615" height="200" fill="url(#AnVJX)"/>
</g>
<g aria-hidden="true" fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="110">
<text x="65" y="148" textLength="500" fill="#000" opacity="0.25">2025.5.3</text>

Before

Width:  |  Height:  |  Size: 811 B

After

Width:  |  Height:  |  Size: 811 B