mirror of
https://github.com/mitchellrj/eufy_robovac.git
synced 2025-11-25 20:52:41 +00:00
Add completed work status
This commit is contained in:
@@ -44,6 +44,7 @@ class WorkStatus(StringEnum):
|
|||||||
STAND_BY = 'standby'
|
STAND_BY = 'standby'
|
||||||
SLEEPING = 'Sleeping'
|
SLEEPING = 'Sleeping'
|
||||||
RECHARGING = 'Recharge'
|
RECHARGING = 'Recharge'
|
||||||
|
COMPLETED = 'completed'
|
||||||
|
|
||||||
|
|
||||||
class CleanSpeed(StringEnum):
|
class CleanSpeed(StringEnum):
|
||||||
|
|||||||
@@ -71,12 +71,12 @@ class EufyVacuum(VacuumDevice):
|
|||||||
self._name = device_config['name']
|
self._name = device_config['name']
|
||||||
|
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Synchronise state from the bulb."""
|
"""Synchronise state from the vacuum."""
|
||||||
await self.robovac.async_get()
|
await self.robovac.async_get()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
"""Return the ID of this light."""
|
"""Return the ID of this vacuum."""
|
||||||
return self._device_id
|
return self._device_id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -127,6 +127,8 @@ class EufyVacuum(VacuumDevice):
|
|||||||
return STATE_DOCKED
|
return STATE_DOCKED
|
||||||
elif self.robovac.work_status == robovac.WorkStatus.STAND_BY:
|
elif self.robovac.work_status == robovac.WorkStatus.STAND_BY:
|
||||||
return STATE_IDLE
|
return STATE_IDLE
|
||||||
|
elif self.robovac.work_status == robovac.WorkStatus.COMPLETED:
|
||||||
|
return STATE_IDLE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
|
|||||||
Reference in New Issue
Block a user