@@ -63,7 +63,6 @@ def __init__(
6363 )
6464
6565 self ._cooling_present = False
66- self ._devices : dict [str , GwEntityData ] = {}
6766 self ._elga = False
6867 self ._is_thermostat = False
6968 self ._last_active : dict [str , str | None ] = {}
@@ -93,11 +92,6 @@ def cooling_present(self) -> bool:
9392 return self ._smile_props ["cooling_present" ]
9493 return False
9594
96- @property
97- def devices (self ) -> dict [str , GwEntityData ]:
98- """Return all devices and their data."""
99- return self ._devices
100-
10195 @property
10296 def gateway_id (self ) -> str :
10397 """Return the gateway-id."""
@@ -344,13 +338,16 @@ def get_all_gateway_entities(self) -> None:
344338 """Collect the Plugwise Gateway entities and their data and states from the received raw XML-data."""
345339 self ._smile_api .get_all_gateway_entities ()
346340
347- async def async_update (self ) -> None :
341+ async def async_update (self ) -> dict [ str , GwEntityData ] :
348342 """Update the Plughwise Gateway entities and their data and states."""
343+ data : dict [str , GwEntityData ] = {}
349344 try :
350- self . _devices = await self ._smile_api .async_update ()
345+ data = await self ._smile_api .async_update ()
351346 except (DataMissingError , KeyError ) as err :
352347 raise PlugwiseError ("No Plugwise data received" ) from err
353348
349+ return data
350+
354351 ########################################################################################################
355352 ### API Set and HA Service-related Functions ###
356353 ########################################################################################################
0 commit comments