1 """Support for Wi-Fi enabled ROMY vacuum cleaner robots.
3 For more details about this platform, please refer to the documentation
4 https://home-assistant.io/components/vacuum.romy/.
14 from .const
import DOMAIN, LOGGER
15 from .coordinator
import RomyVacuumCoordinator
16 from .entity
import RomyEntity
18 FAN_SPEED_NONE =
"default"
19 FAN_SPEED_NORMAL =
"normal"
20 FAN_SPEED_SILENT =
"silent"
21 FAN_SPEED_INTENSIVE =
"intensive"
22 FAN_SPEED_SUPER_SILENT =
"super_silent"
23 FAN_SPEED_HIGH =
"high"
24 FAN_SPEED_AUTO =
"auto"
26 FAN_SPEEDS: list[str] = [
31 FAN_SPEED_SUPER_SILENT,
37 SUPPORT_ROMY_ROBOT = (
38 VacuumEntityFeature.BATTERY
39 | VacuumEntityFeature.RETURN_HOME
40 | VacuumEntityFeature.STATE
41 | VacuumEntityFeature.START
42 | VacuumEntityFeature.STOP
43 | VacuumEntityFeature.FAN_SPEED
49 config_entry: ConfigEntry,
50 async_add_entities: AddEntitiesCallback,
52 """Set up ROMY vacuum cleaner."""
54 coordinator: RomyVacuumCoordinator = hass.data[DOMAIN][config_entry.entry_id]
59 """Representation of a ROMY vacuum cleaner robot."""
61 _attr_supported_features = SUPPORT_ROMY_ROBOT
62 _attr_fan_speed_list = FAN_SPEEDS
67 coordinator: RomyVacuumCoordinator,
69 """Initialize the ROMY Robot."""
75 """Handle updated data from the coordinator."""
83 """Turn the vacuum on."""
84 LOGGER.debug(
"async_start")
85 await self.
romyromyromy.async_clean_start_or_continue()
88 """Stop the vacuum cleaner."""
89 LOGGER.debug(
"async_stop")
93 """Return vacuum back to base."""
94 LOGGER.debug(
"async_return_to_base")
99 LOGGER.debug(
"async_set_fan_speed to %s", fan_speed)
None _handle_coordinator_update(self)
None async_start(self, **Any kwargs)
None async_return_to_base(self, **Any kwargs)
None async_stop(self, **Any kwargs)
None __init__(self, RomyVacuumCoordinator coordinator)
None async_set_fan_speed(self, str fan_speed, **Any kwargs)
None async_write_ha_state(self)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)