Skip to content

Commit 9c0420d

Browse files
author
darkpoet78
committed
template update
1 parent 3ac91e2 commit 9c0420d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

template.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@
3636
In {{ states('sensor.inside_temperature') | float | round(1) }}°C
3737
{%- endif %}
3838
2: >
39-
Out {{ hourly["weather.openweathermap_hourly"].forecast[0].temperature | round(0) | default('NA') }}°C
39+
{%- if hourly["weather.openweathermap"].forecast[0].temperature not in ['unavailable', 'unknown'] -%}
40+
{%- set temp = hourly["weather.openweathermap"].forecast[0].temperature | round(0) | default('NA') %}
41+
{%- else %}
42+
{%- set temp = "NA" %}
43+
{%- endif %}
44+
{%- if temp | string | length > 2 %}
45+
Out{{ temp }}°C
46+
{% else %}
47+
Out {{ temp }}°C
48+
{%- endif %}
4049
4150
# Note that for 1: Inside temperature, it checks to see if it is available, otherwise it is blank - and the clock will skip over blanks!

0 commit comments

Comments
 (0)