mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fetch timers separately for xiaomi vacuums (#41330)
This commit is contained in:
parent
6065ab118f
commit
46b2c776db
@ -484,14 +484,21 @@ class MiroboVacuum(StateVacuumEntity):
|
|||||||
self.last_clean = self._vacuum.last_clean_details()
|
self.last_clean = self._vacuum.last_clean_details()
|
||||||
self.dnd_state = self._vacuum.dnd_status()
|
self.dnd_state = self._vacuum.dnd_status()
|
||||||
|
|
||||||
self._timers = self._vacuum.timer()
|
|
||||||
|
|
||||||
self._available = True
|
self._available = True
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
_LOGGER.error("Got OSError while fetching the state: %s", exc)
|
_LOGGER.error("Got OSError while fetching the state: %s", exc)
|
||||||
except DeviceException as exc:
|
except DeviceException as exc:
|
||||||
_LOGGER.warning("Got exception while fetching the state: %s", exc)
|
_LOGGER.warning("Got exception while fetching the state: %s", exc)
|
||||||
|
|
||||||
|
# Fetch timers separately, see #38285
|
||||||
|
try:
|
||||||
|
self._timers = self._vacuum.timer()
|
||||||
|
except DeviceException as exc:
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Unable to fetch timers, this may happen on some devices: %s", exc
|
||||||
|
)
|
||||||
|
self._timers = []
|
||||||
|
|
||||||
async def async_clean_zone(self, zone, repeats=1):
|
async def async_clean_zone(self, zone, repeats=1):
|
||||||
"""Clean selected area for the number of repeats indicated."""
|
"""Clean selected area for the number of repeats indicated."""
|
||||||
for _zone in zone:
|
for _zone in zone:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user