miio.integrations.roborock.vacuum.vacuumcontainers module

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

Bases: DeviceStatus

Container for carpet mode status.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

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.roborock.vacuum.vacuumcontainers.CleaningDetails(data: List[Any] | Dict[str, Any])[source]

Bases: DeviceStatus

Contains details about a specific cleaning run.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

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

Total duration of the cleaning run.

property end: datetime

When cleaning was finished.

property error: str

Error state of this cleaning run.

property error_code: int

Error code.

property map_id: int

Map id used (multi map feature) during the cleaning run.

property start: datetime

When cleaning was started.

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

Bases: DeviceStatus

Contains summarized information about available cleaning runs.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property count: int

Number of cleaning runs.

property dust_collection_count: int | None

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

Total cleaning duration.

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

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

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property cleaning_brush_cleaned_count: int | None

Return cleaning brush cleaned count.

property dustbin_auto_empty_used: int | None

Return dust_collection_work_times

property filter: timedelta

Filter usage time.

property filter_left: timedelta

How long until the filter should be changed.

property main_brush: timedelta

Main brush usage time.

property main_brush_left: timedelta

How long until the main brush should be changed.

property sensor_dirty: timedelta

Return sensor_dirty_time

property sensor_dirty_left: timedelta
property side_brush: timedelta

Side brush usage time.

property side_brush_left: timedelta

How long until the side brush should be changed.

property strainer_cleaned_count: int | None

Return strainer cleaned count.

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

Bases: DeviceStatus

A container for the do-not-disturb status.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property enabled: bool

True if DnD is enabled.

property end: time

End time of DnD.

property start: time

Start time of DnD.

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

Bases: DeviceStatus

Contains a information about the maps/floors of the vacuum.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property map_count: int

Amount of maps stored.

property map_id_list: List[int]

List of map ids.

property map_list: List[Dict[str, Any]]

List of map info.

property map_name_dict: Dict[str, int]

Dictionary of map names (keys) with there ids (values).

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

Bases: DeviceStatus

Container for mop dryer add-on.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property dry_time: timedelta

Return mop dry time.

property enabled: bool

Return if mop dryer is enabled.

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

Bases: IntEnum

An enumeration.

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

Bases: DeviceStatus

Container for sound installation status.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

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

Installation state.

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

Bases: DeviceStatus

Container for sound status.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

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

Bases: DeviceStatus

A container for scheduling.

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

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

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

Next schedule for the timer.

Note, this value will not be updated after the Timer object has been created.

property ts: datetime | None

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

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

Bases: DeviceStatus

Container for status reports from the vacuum.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property auto_dust_collection: bool | None

Returns True if auto dust collection is enabled, None if sensor not present.

property battery: int

Remaining battery in percentage.

property clean_area: float

Cleaned area in m2.

property clean_percent: int | None

Return progress of the current clean.

property clean_time: timedelta

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

property current_map_id: int | None

The id of the current map with regards to the multi map feature,

[3,7,11,15] -> [0,1,2,3].

property dock_error: str | None

Human readable dock error description, see also dock_error_code().

property dock_error_code: int | None

Dock error status as returned by the device.

property error: str

Human readable error description, see also error_code().

property error_code: int

Error code as returned by the device.

property fan_speed_preset
property fanspeed: int | None

Current fan speed.

property got_error: bool

True if an error has occurred.

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_mop_drying: bool | None

Return if mop drying is running.

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: bool | None

Return True is water box is installed.

property is_water_box_carriage_attached: bool | None

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

property is_water_shortage: bool | None

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

property map: bool

Map token.

property mop_dryer_remaining_seconds: timedelta | None

Return remaining mop drying seconds.

property mop_intensity: int | None

Current mop intensity.

property mop_route: int | None

Current mop route.

property state: str

Human readable state description, see also state_code().

property state_code: int

State code as returned by the device.

property vacuum_state: VacuumState

Return vacuum state.

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