Skip to content

Commit d90bc59

Browse files
committed
Correct typing
1 parent ec9bbc2 commit d90bc59

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugwise/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@
340340
"setpoint",
341341
"setpoint_high",
342342
"setpoint_low",
343+
"solar_irradiance",
343344
"temperature_difference",
344345
"valve_position",
345346
"voltage_phase_one",
@@ -394,7 +395,6 @@
394395
WeatherType = Literal[
395396
"humidity",
396397
"outdoor_temperature",
397-
"solar_irradiance",
398398
"weather_description",
399399
"wind_bearing",
400400
"wind_speed",
@@ -493,6 +493,7 @@ class SmileSensors(TypedDict, total=False):
493493
return_temperature: float
494494
setpoint: float
495495
setpoint_high: float
496+
solar_irradiance: float
496497
setpoint_low: float
497498
temperature_difference: float
498499
valve_position: int
@@ -526,7 +527,6 @@ class WeatherData(TypedDict, total=False):
526527

527528
humidity: int
528529
outdoor_temperature: float
529-
solar_irradiance: float
530530
weather_description: str
531531
wind_bearing: float
532532
wind_speed: float

plugwise/helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,8 @@ def _get_gateway_measurements(self, entity_id: str, data: GwEntityData) -> None:
788788
match measurement:
789789
case "solar_irradiance":
790790
# Not available in HA weather platform -> sensor
791-
key = cast(SensorType, measurement)
792-
data["sensors"][key] = value
791+
sensor = cast(SensorType, measurement)
792+
data["sensors"][sensor] = float(value)
793793
self._count += 1
794794
case "wind_vector":
795795
value_list: list[str] = str(value).split(",")

0 commit comments

Comments
 (0)