diff --git a/miio/integrations/roborock/vacuum/vacuumcontainers.py b/miio/integrations/roborock/vacuum/vacuumcontainers.py index 7af2afce8..65a5963a3 100644 --- a/miio/integrations/roborock/vacuum/vacuumcontainers.py +++ b/miio/integrations/roborock/vacuum/vacuumcontainers.py @@ -204,6 +204,14 @@ def vacuum_state(self) -> VacuumState: """Return vacuum state.""" return STATE_CODE_TO_VACUUMSTATE.get(self.state_code, VacuumState.Unknown) + @property + @sensor("Cleaning Progress", icon="mdi:progress-check", unit="%") + def clean_percent(self) -> Optional[int]: + """Return progress of the current clean.""" + if "clean_percent" in self.data: + return int(self.data["clean_percent"]) + return None + @property @sensor( "Error code",