From 29a69215ca92cb69458ee1c0044335b2630efddd Mon Sep 17 00:00:00 2001 From: Luke Bonaccorsi Date: Mon, 11 Sep 2023 17:25:23 +0100 Subject: [PATCH] Write state when async_update is called --- custom_components/robovac/vacuum.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/robovac/vacuum.py b/custom_components/robovac/vacuum.py index 2a530e8..2efe899 100644 --- a/custom_components/robovac/vacuum.py +++ b/custom_components/robovac/vacuum.py @@ -346,6 +346,8 @@ class RoboVacEntity(StateVacuumEntity): self.tuyastatus.get(CONSUMABLE_CODE) ).decode("ascii") )["consumable"]["duration"] + + self.async_write_ha_state() except TuyaException as e: self.update_failures += 1 _LOGGER.debug("Update errored. Current failure count: {}. Reason: {}".format(self.update_failures, e))