Tweaks to temperature sensor usage

This commit is contained in:
2023-03-05 21:26:45 -05:00
parent 3de510ff6a
commit 9a75fe2cce
2 changed files with 6 additions and 6 deletions

View File

@ -169,7 +169,7 @@ sensor:
'Later Today ',
'For the rest of the day '
] | random }}
expect a high of {{ state_attr('sensor.current_forecast','high_temp') }}
expect a high of {{ states('sensor.todays_high_temp') }}
{%- if states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','off')%}
{{ [
'and sunny. ',
@ -264,7 +264,7 @@ sensor:
'Later tonight expect a low of ',
'Overnight expect a low of '
] | random }}
{{ state_attr('sensor.current_forecast','overnight_low') }} degrees.
{{ states('sensor.tonights_low_temp') }} degrees.
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
@ -518,7 +518,7 @@ sensor:
'Later Today ',
'For the rest of the day '
] | random }}
expect a high of {{ state_attr('sensor.current_forecast','high_temp') }}
expect a high of {{ states('sensor.todays_high_temp') }}
{%- if states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','off')%}
{{ [
'and sunny. ',
@ -611,13 +611,13 @@ sensor:
'Later tonight expect a low of ',
'Overnight expect a low of '
] | random }}
{{ state_attr('sensor.current_forecast','overnight_low') }} degrees.
{{ states('sensor.tonights_low_temp') }} degrees.
{%- else -%}
{{ [
'Tonight expect a low of ',
'Overnight expect a low of '
] | random }}
{{ state_attr('sensor.current_forecast','overnight_low') }} degrees.
{{ states('sensor.tonights_low_temp') }} degrees.
{% endif %}
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}

View File

@ -35,7 +35,7 @@
{% endif %}
</p>
<p>
Today the high temperature will be {{ state_attr('sensor.current_forecast','high_temp') }} degrees.
Today the high temperature will be {{ states('sensor.todays_high_temp') }} degrees.
{{ states('sensor.clothing_forecast_detail') }}
</p>