Figured out the 'Recharge' status.

This commit is contained in:
Richard Mitchell
2019-04-19 08:50:36 +01:00
parent 08d311dd06
commit 022250dddd
2 changed files with 5 additions and 4 deletions

View File

@@ -47,8 +47,8 @@ class WorkStatus(StringEnum):
STAND_BY = 'standby' STAND_BY = 'standby'
# Not in the dock - goes into this state after being paused for a while # Not in the dock - goes into this state after being paused for a while
SLEEPING = 'Sleeping' SLEEPING = 'Sleeping'
# ? Not sure how this differs from charging # Going home because battery is depleted
RECHARGING = 'Recharge' RECHARGE_NEEDED = 'Recharge'
# In the dock, full charged # In the dock, full charged
COMPLETED = 'completed' COMPLETED = 'completed'

View File

@@ -121,8 +121,9 @@ class EufyVacuum(VacuumDevice):
return STATE_CLEANING return STATE_CLEANING
elif self.robovac.work_status == robovac.WorkStatus.CHARGING: elif self.robovac.work_status == robovac.WorkStatus.CHARGING:
return STATE_DOCKED return STATE_DOCKED
elif self.robovac.work_status == robovac.WorkStatus.RECHARGING: elif self.robovac.work_status == robovac.WorkStatus.RECHARGE_NEEDED:
return STATE_DOCKED # Should be captured by `go_home` above, but just in case
return STATE_RETURNING
elif self.robovac.work_status == robovac.WorkStatus.SLEEPING: elif self.robovac.work_status == robovac.WorkStatus.SLEEPING:
return STATE_IDLE return STATE_IDLE
elif self.robovac.work_status == robovac.WorkStatus.STAND_BY: elif self.robovac.work_status == robovac.WorkStatus.STAND_BY: