From a56488c7fba9ae1daccbb7a3e87cd04a6e759173 Mon Sep 17 00:00:00 2001 From: Leslie Liang Date: Mon, 5 Aug 2024 22:35:37 +0000 Subject: [PATCH] bug fix to for coordinator not updating --- custom_components/nea_sg_weather/nea.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/nea_sg_weather/nea.py b/custom_components/nea_sg_weather/nea.py index e37bc6f995..9be6910924 100644 --- a/custom_components/nea_sg_weather/nea.py +++ b/custom_components/nea_sg_weather/nea.py @@ -1,4 +1,5 @@ """The NEA Singapore Weather API wrapper.""" + from __future__ import annotations from ast import Str import math @@ -155,8 +156,8 @@ def process_data(self): self._resp["items"][0]["forecasts"][i]["area"]: { "forecast": self._resp["items"][0]["forecasts"][i]["forecast"], "location": { - "latitude": self.metadata[i]["label_location"]["latitude"], - "longitude": self.metadata[i]["label_location"]["longitude"], + "latitude": float(self.metadata[i]["label_location"]["latitude"]), + "longitude": float(self.metadata[i]["label_location"]["longitude"]), }, } for i in range(len(self._resp["items"][0]["forecasts"]))