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'
SLEEPING = 'Sleeping'
RECHARGING = 'Recharge'
COMPLETED = 'completed'
class CleanSpeed(StringEnum):

View File

@@ -71,12 +71,12 @@ class EufyVacuum(VacuumDevice):
self._name = device_config['name']
async def async_update(self):
"""Synchronise state from the bulb."""
"""Synchronise state from the vacuum."""
await self.robovac.async_get()
@property
def unique_id(self):
"""Return the ID of this light."""
"""Return the ID of this vacuum."""
return self._device_id
@property
@@ -127,6 +127,8 @@ class EufyVacuum(VacuumDevice):
return STATE_DOCKED
elif self.robovac.work_status == robovac.WorkStatus.STAND_BY:
return STATE_IDLE
elif self.robovac.work_status == robovac.WorkStatus.COMPLETED:
return STATE_IDLE
@property
def available(self) -> bool: