fix: parse glance weather gust as float via gjson
toFloat erwartet eine Zahl, der HA-State kommt aber als String -> Template- Fehler. Boee jetzt direkt per (.Subrequest "gust").JSON.Float "state" lesen, gjson parst den numerischen String korrekt fuer den Schwellenvergleich. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -157,7 +157,7 @@
|
||||
{{ $solar := (.Subrequest "solar").JSON.String "state" }}
|
||||
{{ $uv := (.Subrequest "uv").JSON.String "state" }}
|
||||
{{ $press := (.Subrequest "pressure").JSON.String "state" }}
|
||||
{{ $gustF := toFloat $gust }}
|
||||
{{ $gustF := (.Subrequest "gust").JSON.Float "state" }}
|
||||
{{ $divider := "border-left: 1px solid hsla(220, 40%, 70%, 0.14);" }}
|
||||
<div class="text-center" style="margin-bottom: 12px;">
|
||||
<div class="color-highlight size-h2" style="font-weight: 700;">{{ $temp }}°C</div>
|
||||
|
||||
Reference in New Issue
Block a user