Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum Class Reference
Inheritance diagram for homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum:
[legend]
Collaboration diagram for homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum:
[legend]

Public Member Functions

None __init__ (self, device, entry, unique_id, DataUpdateCoordinator[VacuumCoordinatorData] coordinator)
 
None async_added_to_hass (self)
 
None async_clean_segment (self, segments)
 
None async_clean_spot (self, **Any kwargs)
 
None async_clean_zone (self, list[Any] zone, int repeats=1)
 
None async_goto (self, int x_coord, int y_coord)
 
None async_locate (self, **Any kwargs)
 
None async_pause (self)
 
None async_remote_control_move (self, int rotation=0, float velocity=0.3, int duration=1500)
 
None async_remote_control_move_step (self, int rotation=0, float velocity=0.2, int duration=1500)
 
None async_remote_control_start (self)
 
None async_remote_control_stop (self)
 
None async_return_to_base (self, **Any kwargs)
 
None async_send_command (self, str command, dict[str, Any]|list[Any]|None params=None, **Any kwargs)
 
None async_set_fan_speed (self, str fan_speed, **Any kwargs)
 
None async_start (self)
 
None async_stop (self, **Any kwargs)
 
int battery_level (self)
 
dict[str, Any] extra_state_attributes (self)
 
str fan_speed (self)
 
list[strfan_speed_list (self)
 
str|None state (self)
 
list[dict[str, Any]] timers (self)
 
- Public Member Functions inherited from homeassistant.helpers.update_coordinator.DataUpdateCoordinator
None __init__ (self, HomeAssistant hass, logging.Logger logger, *config_entries.ConfigEntry|None|UndefinedType config_entry=UNDEFINED, str name, timedelta|None update_interval=None, Callable[[], Awaitable[_DataT]]|None update_method=None, Callable[[], Awaitable[None]]|None setup_method=None, Debouncer[Coroutine[Any, Any, None]]|None request_refresh_debouncer=None, bool always_update=True)
 
Callable[[], None] async_add_listener (self, CALLBACK_TYPE update_callback, Any context=None)
 
None async_config_entry_first_refresh (self)
 
Generator[Any] async_contexts (self)
 
None async_refresh (self)
 
None async_register_shutdown (self)
 
None async_request_refresh (self)
 
None async_set_update_error (self, Exception err)
 
None async_set_updated_data (self, _DataT data)
 
None async_shutdown (self)
 
None async_update_listeners (self)
 
timedelta|None update_interval (self)
 
None update_interval (self, timedelta|None value)
 
- Public Member Functions inherited from homeassistant.components.vacuum.StateVacuumEntity
str battery_icon (self)
 
dict[str, Any]|None capability_attributes (self)
 
None clean_spot (self, **Any kwargs)
 
None locate (self, **Any kwargs)
 
None pause (self)
 
None return_to_base (self, **Any kwargs)
 
None send_command (self, str command, dict[str, Any]|list[Any]|None params=None, **Any kwargs)
 
None set_fan_speed (self, str fan_speed, **Any kwargs)
 
None start (self)
 
dict[str, Any] state_attributes (self)
 
None stop (self, **Any kwargs)
 
VacuumEntityFeature supported_features (self)
 
VacuumEntityFeature supported_features_compat (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_will_remove_from_hass (self)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
bool available (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 

Private Member Functions

None _handle_coordinator_update (self)
 
def _try_command (self, mask_error, func, *args, **kwargs)
 

Private Attributes

 _state
 

Static Private Attributes

 _attr_name = None
 
tuple _attr_supported_features
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.helpers.update_coordinator.DataUpdateCoordinator
 always_update
 
 config_entry
 
 data
 
 hass
 
 last_exception
 
 last_update_success
 
 logger
 
 name
 
 setup_method
 
 update_interval
 
 update_method
 
- Public Attributes inherited from homeassistant.components.vacuum.StateVacuumEntity
 state
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 
- Static Public Attributes inherited from homeassistant.components.vacuum.StateVacuumEntity
 None
 
 VacuumEntityFeature
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

Representation of a Xiaomi Vacuum cleaner robot.

Definition at line 185 of file vacuum.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.__init__ (   self,
  device,
  entry,
  unique_id,
DataUpdateCoordinator[VacuumCoordinatorData]  coordinator 
)
Initialize the Xiaomi vacuum cleaner robot handler.

Definition at line 205 of file vacuum.py.

Member Function Documentation

◆ _handle_coordinator_update()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum._handle_coordinator_update (   self)
private

Definition at line 417 of file vacuum.py.

◆ _try_command()

def homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum._try_command (   self,
  mask_error,
  func,
args,
**  kwargs 
)
private
Call a vacuum command handling error messages.

Definition at line 279 of file vacuum.py.

◆ async_added_to_hass()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_added_to_hass (   self)
Run when entity is about to be added to hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 216 of file vacuum.py.

◆ async_clean_segment()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_clean_segment (   self,
  segments 
)
Clean the specified segments(s).

Definition at line 394 of file vacuum.py.

◆ async_clean_spot()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_clean_spot (   self,
**Any  kwargs 
)
Perform a spot clean-up.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 325 of file vacuum.py.

◆ async_clean_zone()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_clean_zone (   self,
list[Any]  zone,
int   repeats = 1 
)
Clean selected area for the number of repeats indicated.

Definition at line 405 of file vacuum.py.

◆ async_goto()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_goto (   self,
int  x_coord,
int  y_coord 
)
Goto the specified coordinates.

Definition at line 385 of file vacuum.py.

◆ async_locate()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_locate (   self,
**Any  kwargs 
)
Locate the vacuum cleaner.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 331 of file vacuum.py.

◆ async_pause()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_pause (   self)
Pause the cleaning task.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 295 of file vacuum.py.

◆ async_remote_control_move()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_remote_control_move (   self,
int   rotation = 0,
float   velocity = 0.3,
int   duration = 1500 
)
Move vacuum with remote control mode.

Definition at line 361 of file vacuum.py.

◆ async_remote_control_move_step()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_remote_control_move_step (   self,
int   rotation = 0,
float   velocity = 0.2,
int   duration = 1500 
)
Move vacuum one step with remote control mode.

Definition at line 373 of file vacuum.py.

◆ async_remote_control_start()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_remote_control_start (   self)
Start remote control mode.

Definition at line 349 of file vacuum.py.

◆ async_remote_control_stop()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_remote_control_stop (   self)
Stop remote control mode.

Definition at line 355 of file vacuum.py.

◆ async_return_to_base()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_return_to_base (   self,
**Any  kwargs 
)
Set the vacuum cleaner to return to the dock.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 321 of file vacuum.py.

◆ async_send_command()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_send_command (   self,
str  command,
dict[str, Any] | list[Any] | None   params = None,
**Any  kwargs 
)
Send raw command.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 335 of file vacuum.py.

◆ async_set_fan_speed()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_set_fan_speed (   self,
str  fan_speed,
**Any  kwargs 
)
Set fan speed.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 303 of file vacuum.py.

◆ async_start()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_start (   self)
Start or resume the cleaning task.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 289 of file vacuum.py.

◆ async_stop()

None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.async_stop (   self,
**Any  kwargs 
)
Stop the vacuum cleaner.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 299 of file vacuum.py.

◆ battery_level()

int homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.battery_level (   self)
Return the battery level of the vacuum cleaner.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 232 of file vacuum.py.

◆ extra_state_attributes()

dict[str, Any] homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.extra_state_attributes (   self)
Return the specific state attributes of this vacuum cleaner.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 267 of file vacuum.py.

◆ fan_speed()

str homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.fan_speed (   self)
Return the fan speed of the vacuum cleaner.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 237 of file vacuum.py.

◆ fan_speed_list()

list[str] homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.fan_speed_list (   self)
Get the list of available fan speed steps of the vacuum cleaner.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 248 of file vacuum.py.

◆ state()

str | None homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.state (   self)
Return the status of the vacuum cleaner.

Reimplemented from homeassistant.components.vacuum.StateVacuumEntity.

Definition at line 222 of file vacuum.py.

◆ timers()

list[dict[str, Any]] homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum.timers (   self)
Get the list of added timers of the vacuum cleaner.

Definition at line 255 of file vacuum.py.

Member Data Documentation

◆ _attr_name

homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum._attr_name = None
staticprivate

Definition at line 191 of file vacuum.py.

◆ _attr_supported_features

tuple homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum._attr_supported_features
staticprivate
Initial value:
= (
VacuumEntityFeature.STATE
| VacuumEntityFeature.PAUSE
| VacuumEntityFeature.STOP
| VacuumEntityFeature.RETURN_HOME
| VacuumEntityFeature.FAN_SPEED
| VacuumEntityFeature.SEND_COMMAND
| VacuumEntityFeature.LOCATE
| VacuumEntityFeature.BATTERY
| VacuumEntityFeature.CLEAN_SPOT
| VacuumEntityFeature.START
)

Definition at line 192 of file vacuum.py.

◆ _state

homeassistant.components.xiaomi_miio.vacuum.MiroboVacuum._state
private

Definition at line 425 of file vacuum.py.


The documentation for this class was generated from the following file: