Fix issue in locking attribute updates
This commit is contained in:
parent
17d73cdeb8
commit
26bc35c8a6
1 changed files with 3 additions and 2 deletions
|
@ -169,9 +169,9 @@ class HonAppliance:
|
||||||
self.sync_params_to_command("settings")
|
self.sync_params_to_command("settings")
|
||||||
|
|
||||||
async def load_attributes(self) -> None:
|
async def load_attributes(self) -> None:
|
||||||
self._attributes = await self.api.load_attributes(self)
|
attributes = await self.api.load_attributes(self)
|
||||||
for name, values in (
|
for name, values in (
|
||||||
self._attributes.pop("shadow", {}).get("parameters", {}).items()
|
attributes.pop("shadow", {}).get("parameters", {}).items()
|
||||||
):
|
):
|
||||||
if name in self._attributes.get("parameters", {}):
|
if name in self._attributes.get("parameters", {}):
|
||||||
self._attributes["parameters"][name].update(values)
|
self._attributes["parameters"][name].update(values)
|
||||||
|
@ -179,6 +179,7 @@ class HonAppliance:
|
||||||
self._attributes.setdefault("parameters", {})[name] = HonAttribute(
|
self._attributes.setdefault("parameters", {})[name] = HonAttribute(
|
||||||
values
|
values
|
||||||
)
|
)
|
||||||
|
self._attributes |= attributes
|
||||||
if self._extra:
|
if self._extra:
|
||||||
self._attributes = self._extra.attributes(self._attributes)
|
self._attributes = self._extra.attributes(self._attributes)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue