mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 11:13:34 +00:00
Fix update errors on hubs with unsupported children (#1344)
This commit is contained in:
parent
7e8b83edb9
commit
5465b66dee
@ -167,7 +167,14 @@ class SmartDevice(Device):
|
|||||||
self._last_update, "get_child_device_list", {}
|
self._last_update, "get_child_device_list", {}
|
||||||
):
|
):
|
||||||
for info in child_info["child_device_list"]:
|
for info in child_info["child_device_list"]:
|
||||||
self._children[info["device_id"]]._update_internal_state(info)
|
child_id = info["device_id"]
|
||||||
|
if child_id not in self._children:
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Skipping child update for %s, probably unsupported device",
|
||||||
|
child_id,
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
self._children[child_id]._update_internal_state(info)
|
||||||
|
|
||||||
def _update_internal_info(self, info_resp: dict) -> None:
|
def _update_internal_info(self, info_resp: dict) -> None:
|
||||||
"""Update the internal device info."""
|
"""Update the internal device info."""
|
||||||
|
@ -68,7 +68,14 @@ class SmartCamDevice(SmartDevice):
|
|||||||
self._last_update, "getChildDeviceList", {}
|
self._last_update, "getChildDeviceList", {}
|
||||||
):
|
):
|
||||||
for info in child_info["child_device_list"]:
|
for info in child_info["child_device_list"]:
|
||||||
self._children[info["device_id"]]._update_internal_state(info)
|
child_id = info["device_id"]
|
||||||
|
if child_id not in self._children:
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Skipping child update for %s, probably unsupported device",
|
||||||
|
child_id,
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
self._children[child_id]._update_internal_state(info)
|
||||||
|
|
||||||
async def _initialize_smart_child(
|
async def _initialize_smart_child(
|
||||||
self, info: dict, child_components: dict
|
self, info: dict, child_components: dict
|
||||||
|
Loading…
Reference in New Issue
Block a user