Revert "Fix the missing error key"

This reverts commit 8e6e311bfc.
This commit is contained in:
Luke Morrigan 2024-03-22 00:30:57 +00:00 committed by GitHub
parent 6e50fd95f8
commit 6cf2274e50
1 changed files with 2 additions and 4 deletions

View File

@ -357,13 +357,11 @@ class RoboVacEntity(StateVacuumEntity):
CONSUMABLE_CODE in self.tuyastatus
and self.tuyastatus.get(CONSUMABLE_CODE) is not None
):
consumables = ast.literal_eval(
self._attr_consumables = ast.literal_eval(
base64.b64decode(self.tuyastatus.get(CONSUMABLE_CODE)).decode(
"ascii"
)
)
if "consumable" in consumables and "duration" in consumables:
self._attr_consumables = consumables["consumable"]["duration"]
)["consumable"]["duration"]
async def async_locate(self, **kwargs):
"""Locate the vacuum cleaner."""