miio.integrations.vacuum.roborock.vacuumcontainers module

class miio.integrations.vacuum.roborock.vacuumcontainers.CarpetModeStatus(data)[source]

Bases: miio.device.DeviceStatus

Container for carpet mode status.

property current_high: int
property current_integral: int
property current_low: int
property enabled: bool

True if carpet mode is enabled.

property stall_time: int
class miio.integrations.vacuum.roborock.vacuumcontainers.CleaningDetails(data: Union[List[Any], Dict[str, Any]])[source]

Bases: miio.device.DeviceStatus

Contains details about a specific cleaning run.

property area: float

Total cleaned area.

property complete: bool

Return True if the cleaning run was complete (e.g. without errors).

see also error().

property duration: datetime.timedelta

Total duration of the cleaning run.

property end: datetime.datetime

When cleaning was finished.

property error: str

Error state of this cleaning run.

property error_code: int

Error code.

property start: datetime.datetime

When cleaning was started.

class miio.integrations.vacuum.roborock.vacuumcontainers.CleaningSummary(data: Union[List[Any], Dict[str, Any]])[source]

Bases: miio.device.DeviceStatus

Contains summarized information about available cleaning runs.

property count: int

Number of cleaning runs.

property dust_collection_count: Optional[int]

Total number of dust collections.

property ids: List[int]

A list of available cleaning IDs, see also CleaningDetails.

property total_area: float

Total cleaned area.

property total_duration: datetime.timedelta

Total cleaning duration.

class miio.integrations.vacuum.roborock.vacuumcontainers.ConsumableStatus(data: Dict[str, Any])[source]

Bases: miio.device.DeviceStatus

Container for consumable status information, including information about brushes and duration until they should be changed. The methods returning time left are based on the following lifetimes:

  • Sensor cleanup time: XXX FIXME

  • Main brush: 300 hours

  • Side brush: 200 hours

  • Filter: 150 hours

property filter: datetime.timedelta

Filter usage time.

property filter_left: datetime.timedelta

How long until the filter should be changed.

property main_brush: datetime.timedelta

Main brush usage time.

property main_brush_left: datetime.timedelta

How long until the main brush should be changed.

property sensor_dirty: datetime.timedelta

Return sensor_dirty_time

property sensor_dirty_left: datetime.timedelta
property side_brush: datetime.timedelta

Side brush usage time.

property side_brush_left: datetime.timedelta

How long until the side brush should be changed.

class miio.integrations.vacuum.roborock.vacuumcontainers.DNDStatus(data: Dict[str, Any])[source]

Bases: miio.device.DeviceStatus

A container for the do-not-disturb status.

property enabled: bool

True if DnD is enabled.

property end: datetime.time

End time of DnD.

property start: datetime.time

Start time of DnD.

class miio.integrations.vacuum.roborock.vacuumcontainers.SoundInstallState(value)[source]

Bases: enum.IntEnum

An enumeration.

Downloading = 1
Error = 4
Installed = 3
Installing = 2
Unknown = 0
class miio.integrations.vacuum.roborock.vacuumcontainers.SoundInstallStatus(data)[source]

Bases: miio.device.DeviceStatus

Container for sound installation status.

property error: int

Error code, 0 is no error, other values unknown.

property is_errored: bool

True if the state has an error, use error to access it.

property is_installing: bool

True if install is in progress.

property progress: int

Progress in percentages.

property sid: int

Sound ID for the sound being installed.

property state: miio.integrations.vacuum.roborock.vacuumcontainers.SoundInstallState

Installation state.

class miio.integrations.vacuum.roborock.vacuumcontainers.SoundStatus(data)[source]

Bases: miio.device.DeviceStatus

Container for sound status.

property being_installed
property current
class miio.integrations.vacuum.roborock.vacuumcontainers.Timer(data: List[Any], timezone: datetime.tzinfo)[source]

Bases: miio.device.DeviceStatus

A container for scheduling.

The timers are accessed using an integer ID, which is based on the unix timestamp of the creation time.

property action: str

The action to be taken on the given time.

Note, this seems to be always ‘start’.

property cron: str

Cron-formated timer string.

property enabled: bool

True if the timer is active.

property id: str

Unique identifier for timer.

Usually a unix timestamp of when the timer was created, but it is not guaranteed. For example, valetudo apparently allows using arbitrary strings for this.

property next_schedule: datetime.datetime

Next schedule for the timer.

property ts: Optional[datetime.datetime]

Timer creation time, if the id is a unix timestamp.

class miio.integrations.vacuum.roborock.vacuumcontainers.VacuumStatus(data: Dict[str, Any])[source]

Bases: miio.device.DeviceStatus

Container for status reports from the vacuum.

property battery: int

Remaining battery in percentage.

property clean_area: float

Cleaned area in m2.

property clean_time: datetime.timedelta

Time used for cleaning (if finished, shows how long it took).

property error: str

Human readable error description, see also error_code().

property error_code: int

Error code as returned by the device.

property fanspeed: int

Current fan speed.

property got_error: bool

True if an error has occured.

property in_segment_cleaning: bool

Return True if the vacuum is in segment cleaning mode.

property in_zone_cleaning: bool

Return True if the vacuum is in zone cleaning mode.

property is_on: bool

True if device is currently cleaning in any mode.

property is_paused: bool

Return True if vacuum is paused.

property is_water_box_attached: Optional[bool]

Return True is water box is installed.

property is_water_box_carriage_attached: Optional[bool]

Return True if water box carriage (mop) is installed, None if sensor not present.

property is_water_shortage: Optional[bool]

Returns True if water is low in the tank, None if sensor not present.

property map: bool

Map token.

property state: str

Human readable state description, see also state_code().

property state_code: int

State code as returned by the device.

miio.integrations.vacuum.roborock.vacuumcontainers.pretty_area(x: float) float[source]