Allow serializing and passing of credentials_hashes in DeviceConfig (#607)

* Allow passing of credentials_hashes in DeviceConfig

* Update following review
This commit is contained in:
sdb9696
2024-01-03 21:46:08 +00:00
committed by GitHub
parent 3692e4812f
commit e9bf9f58ee
13 changed files with 183 additions and 34 deletions

View File

@@ -38,8 +38,8 @@ class TapoDevice(SmartDevice):
async def update(self, update_children: bool = True):
"""Update the device."""
if self.credentials is None:
raise AuthenticationException("Device requires authentication.")
if self.credentials is None and self.credentials_hash is None:
raise AuthenticationException("Tapo plug requires authentication.")
if self._components_raw is None:
resp = await self.protocol.query("component_nego")