Add completed work status

This commit is contained in:
Richard Mitchell
2019-04-18 15:59:50 +01:00
parent 736a3c538b
commit 9f1e6613f8
2 changed files with 5 additions and 2 deletions

View File

@@ -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):

View File

@@ -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: