python-kasa 0.8.0__py3-none-any.whl → 0.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
kasa/smart/smartdevice.py CHANGED
@@ -167,7 +167,14 @@ class SmartDevice(Device):
167
167
  self._last_update, "get_child_device_list", {}
168
168
  ):
169
169
  for info in child_info["child_device_list"]:
170
- self._children[info["device_id"]]._update_internal_state(info)
170
+ child_id = info["device_id"]
171
+ if child_id not in self._children:
172
+ _LOGGER.debug(
173
+ "Skipping child update for %s, probably unsupported device",
174
+ child_id,
175
+ )
176
+ continue
177
+ self._children[child_id]._update_internal_state(info)
171
178
 
172
179
  def _update_internal_info(self, info_resp: dict) -> None:
173
180
  """Update the internal device info."""
@@ -68,7 +68,14 @@ class SmartCamDevice(SmartDevice):
68
68
  self._last_update, "getChildDeviceList", {}
69
69
  ):
70
70
  for info in child_info["child_device_list"]:
71
- self._children[info["device_id"]]._update_internal_state(info)
71
+ child_id = info["device_id"]
72
+ if child_id not in self._children:
73
+ _LOGGER.debug(
74
+ "Skipping child update for %s, probably unsupported device",
75
+ child_id,
76
+ )
77
+ continue
78
+ self._children[child_id]._update_internal_state(info)
72
79
 
73
80
  async def _initialize_smart_child(
74
81
  self, info: dict, child_components: dict
@@ -200,6 +207,7 @@ class SmartCamDevice(SmartDevice):
200
207
  "mac": basic_info["mac"],
201
208
  "hwId": basic_info.get("hw_id"),
202
209
  "oem_id": basic_info["oem_id"],
210
+ "device_id": basic_info["dev_id"],
203
211
  }
204
212
 
205
213
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-kasa
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Python API for TP-Link Kasa and Tapo devices
5
5
  Project-URL: Homepage, https://github.com/python-kasa/python-kasa
6
6
  Project-URL: Bug Tracker, https://github.com/python-kasa/python-kasa/issues
@@ -70,7 +70,7 @@ kasa/protocols/smartprotocol.py,sha256=U3jGamJXm7n6hNwQ5p7MSU5BoX7d0PEFsX98rM2eY
70
70
  kasa/smart/__init__.py,sha256=gdmi-Doe7dnv7e8ab_892lr9IdOXeFa3XlU3u_CePCk,198
71
71
  kasa/smart/effects.py,sha256=J_mkX2L-7IJSaL5K4CpBaOdk-humx3cVxg7yioGhtF4,11498
72
72
  kasa/smart/smartchilddevice.py,sha256=QjqYLnZ4eU2rF7fgKchhHSeU_VbIN7_a6M40-2sars4,4619
73
- kasa/smart/smartdevice.py,sha256=XqhwPcvAPXEFsm2hAeNVjEcQn6YhOTk2LyJsfB2QWxA,30808
73
+ kasa/smart/smartdevice.py,sha256=SPZ4-LCM0xQGurzAxgj97UmDKsclksBg2w48es_DQME,31100
74
74
  kasa/smart/smartmodule.py,sha256=mkreazfW3a4tQ5lvw7ee1zKYpspo3KRJTQKU7bpCwAc,7371
75
75
  kasa/smart/modules/__init__.py,sha256=8hwnGFmgPiu4G3zK8_mL2VeU_SAglyPxS0SBMrua7y0,1750
76
76
  kasa/smart/modules/alarm.py,sha256=Vqnbrc_E9l6Elai3r1tyUyMBeYGXioJW31b58AGDV9Y,4411
@@ -104,7 +104,7 @@ kasa/smart/modules/time.py,sha256=g7wEYeYBqX5RPshwzzcr-6GsrxzOx2klQ-Tslma6f-k,31
104
104
  kasa/smart/modules/triggerlogs.py,sha256=_8-138YuVNDbXsNmbmRn4_a_efE2N4OR_nKCYSRk-zk,897
105
105
  kasa/smart/modules/waterleaksensor.py,sha256=866GzJxGq1NzDPzRMOXdVQx5dW-cc6fQWbufR4-bmfI,2691
106
106
  kasa/smartcam/__init__.py,sha256=tG_BnP81GuC2Y--6sJ7U2-1pyWFt0K0o-pazyAf-Pj8,125
107
- kasa/smartcam/smartcamdevice.py,sha256=Tr3i_ydG_ojzhUTWNgnHUkH-eB1nfP7uga7GMi7iiYg,9483
107
+ kasa/smartcam/smartcamdevice.py,sha256=-DB6vJfvoUQ4-ugZcGJzznhcd3eH1hCfrpNHcfn0HbQ,9822
108
108
  kasa/smartcam/smartcammodule.py,sha256=RzJgaFH0H0M1pIYT4nYxtoij_v0ewutvL64p5nBmSSo,3346
109
109
  kasa/smartcam/modules/__init__.py,sha256=f3PtcZvr415OeLB99qmQ4RxNyGgCKPjv9StoF33eswk,351
110
110
  kasa/smartcam/modules/alarm.py,sha256=OZu0Vfi8sBwK9Z1IF2UwhrgkTfGBq9sk7EODtCId9kc,5336
@@ -120,8 +120,8 @@ kasa/transports/basetransport.py,sha256=h4RJkPUBEzEZu_Ycv2UDTN1lnda2YdVYFZF692L5
120
120
  kasa/transports/klaptransport.py,sha256=Nh59aTV7X7ck6aTrOPOAvbPll6ZfZ2qzstTcXwMMqT0,19108
121
121
  kasa/transports/sslaestransport.py,sha256=LsaByD3qEeF-WX8MacyYYEtmLu8J4OrUC9veyGGvTfo,17583
122
122
  kasa/transports/xortransport.py,sha256=c7atJtCrKzqVaLov8TROHRa_HRfgI0kRYaI0lT895aU,8339
123
- python_kasa-0.8.0.dist-info/METADATA,sha256=2iwJfqxyfGsBGIVrOCgBbWDPjMxjapPj3eDGXmUS51c,11551
124
- python_kasa-0.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
125
- python_kasa-0.8.0.dist-info/entry_points.txt,sha256=gTVS_oUcmt4q77WSkppQofMelqufh0zeXvvUkmBPRJA,47
126
- python_kasa-0.8.0.dist-info/licenses/LICENSE,sha256=Klt9aEsei738epLgYqeikhpdBWwMvU1VAli14Bxlc5c,33218
127
- python_kasa-0.8.0.dist-info/RECORD,,
123
+ python_kasa-0.8.1.dist-info/METADATA,sha256=lGQj9v-BOj-wweqRkdFNicHGpWDkvXvN1WimPYePHYA,11551
124
+ python_kasa-0.8.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
125
+ python_kasa-0.8.1.dist-info/entry_points.txt,sha256=gTVS_oUcmt4q77WSkppQofMelqufh0zeXvvUkmBPRJA,47
126
+ python_kasa-0.8.1.dist-info/licenses/LICENSE,sha256=Klt9aEsei738epLgYqeikhpdBWwMvU1VAli14Bxlc5c,33218
127
+ python_kasa-0.8.1.dist-info/RECORD,,