Skip to content

Commit 5561f35

Browse files
committed
Add typing
1 parent 5735dd2 commit 5561f35

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

plugwise/constants.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,15 @@
391391
"cooling_enabled": "cooling_ena_switch",
392392
"domestic_hot_water_comfort_mode": "dhw_cm_switch",
393393
}
394+
WeatherType = Literal[
395+
"humidity",
396+
"outdoor_temperature",
397+
"solar_irradiance",
398+
"weather_description",
399+
"wind_bearing",
400+
"wind_speed",
401+
]
402+
WEATHER: Final[tuple[str, ...]] = get_args(WeatherType)
394403

395404
ZONE_THERMOSTATS: Final[tuple[str, ...]] = (
396405
"thermostat",
@@ -512,6 +521,18 @@ class ThermoLoc(TypedDict, total=False):
512521
secondary: list[str]
513522

514523

524+
@dataclass
525+
class WeatherData:
526+
"""Smile Weather data class."""
527+
528+
humidity: int
529+
outdoor_temperature: float
530+
solar_irradiance: float
531+
weather_description: str
532+
wind_bearing: float
533+
wind_speed: float
534+
535+
515536
class ActuatorData(TypedDict, total=False):
516537
"""Actuator data for thermostat types."""
517538

@@ -583,6 +604,7 @@ class GwEntityData(TypedDict, total=False):
583604
switches: SmileSwitches
584605
temperature_offset: ActuatorData
585606
thermostat: ActuatorData
607+
weather: WeatherData
586608

587609

588610
@dataclass

0 commit comments

Comments
 (0)