|
15 | 15 | OFF, |
16 | 16 | ActuatorData, |
17 | 17 | DeviceData, |
| 18 | + ZoneData, |
18 | 19 | ) |
19 | 20 | from plugwise.helper import SmileHelper |
20 | 21 | from plugwise.util import remove_empty_platform_dicts |
@@ -151,7 +152,7 @@ def _update_for_cooling(self, device: DeviceData) -> None: |
151 | 152 | self._count += 2 # add 4, remove 2 |
152 | 153 |
|
153 | 154 |
|
154 | | - def _get_location_data(self, loc_id: str) -> DeviceData: |
| 155 | + def _get_location_data(self, loc_id: str) -> ZoneData: |
155 | 156 | """Helper-function for _all_device_data() and async_update(). |
156 | 157 |
|
157 | 158 | Provide device-data, based on Location ID (= loc_id). |
@@ -237,14 +238,19 @@ def _device_data_adam(self, device: DeviceData, data: DeviceData) -> None: |
237 | 238 | self._count += 1 |
238 | 239 |
|
239 | 240 |
|
240 | | - def _device_data_climate(self, location_id: str, device: DeviceData, data: DeviceData) -> None: |
| 241 | + def _device_data_climate( |
| 242 | + self, |
| 243 | + location_id: str, |
| 244 | + device: DeviceData | ZoneData, |
| 245 | + data: DeviceData | ZoneData |
| 246 | + ) -> None: |
241 | 247 | """Helper-function for _get_device_data(). |
242 | 248 |
|
243 | 249 | Determine climate-control device data. |
244 | 250 | """ |
245 | 251 | loc_id = location_id |
246 | | - if (dev_loc := device.get("location")) is not None: |
247 | | - loc_id = dev_loc |
| 252 | + if device.get("location") is not None: |
| 253 | + loc_id = device["location"] |
248 | 254 |
|
249 | 255 | # Presets |
250 | 256 | data["preset_modes"] = None |
@@ -285,7 +291,7 @@ def check_reg_mode(self, mode: str) -> bool: |
285 | 291 | ) |
286 | 292 |
|
287 | 293 | def _get_schedule_states_with_off( |
288 | | - self, location: str, schedules: list[str], selected: str, data: DeviceData |
| 294 | + self, location: str, schedules: list[str], selected: str, data: DeviceData | ZoneData |
289 | 295 | ) -> None: |
290 | 296 | """Collect schedules with states for each thermostat. |
291 | 297 |
|
|
0 commit comments