From 10f2695cb0d72174fa5e38a37b54a2a281ce9306 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 5 Dec 2024 10:59:15 +0000 Subject: handle missing temperatures --- forecast.html.tt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/forecast.html.tt b/forecast.html.tt index 5012799..56beb56 100644 --- a/forecast.html.tt +++ b/forecast.html.tt @@ -124,7 +124,7 @@ [% cur.icon %]
Temperature:
-
[% cur.temperature|round %]°
+
[% (cur.temperature || 0) | round %]°
Summary:
[% cur.summary %]
@@ -160,9 +160,9 @@
Summary:
[% today.summary %]
Min temperature:
-
[% today.temperatureMin|round %]° [% time(today.temperatureMinTime) %]
+
[% (today.temperatureMin || 0) | round %]° [% time(today.temperatureMinTime) %]
Max temperature:
-
[% today.temperatureMax|round %]° [% time(today.temperatureMaxTime) %]
+
[% (today.temperatureMax || 0) | round %]° [% time(today.temperatureMaxTime) %]
Sunrise:
[% time(today.sunriseTime) %]
Sunset:
@@ -192,7 +192,7 @@ [% h.summary %] [% time(h.time) %] - [% h.temperature|round %]° + [% (h.temperature || 0) | round %]° [% END %] -- cgit v1.2.3