feat: add better DPS handling
This commit is contained in:
parent
2968d722f8
commit
670b5bb1c4
|
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
"name": "*",
|
||||
"channel": "beta",
|
||||
"prerelease": "beta"
|
||||
"prerelease": true
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
|
|
|
|||
|
|
@ -1,107 +1,6 @@
|
|||
from enum import IntEnum
|
||||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .vacuums.base import RobovacCommand
|
||||
from .tuyalocalapi import TuyaDevice
|
||||
|
||||
|
||||
class RoboVacEntityFeature(IntEnum):
|
||||
"""Supported features of the RoboVac entity."""
|
||||
|
||||
EDGE = 1
|
||||
SMALL_ROOM = 2
|
||||
CLEANING_TIME = 4
|
||||
CLEANING_AREA = 8
|
||||
DO_NOT_DISTURB = 16
|
||||
AUTO_RETURN = 32
|
||||
CONSUMABLES = 64
|
||||
ROOM = 128
|
||||
ZONE = 256
|
||||
MAP = 512
|
||||
BOOST_IQ = 1024
|
||||
|
||||
|
||||
ROBOVAC_SERIES = {
|
||||
"C": [
|
||||
"T2103",
|
||||
"T2117",
|
||||
"T2118",
|
||||
"T2119",
|
||||
"T2120",
|
||||
"T2123",
|
||||
"T2128",
|
||||
"T2130",
|
||||
"T2132",
|
||||
],
|
||||
"G": [
|
||||
"T1250",
|
||||
"T2250",
|
||||
"T2251",
|
||||
"T2252",
|
||||
"T2253",
|
||||
"T2254",
|
||||
"T2150",
|
||||
"T2255",
|
||||
"T2256",
|
||||
"T2257",
|
||||
"T2258",
|
||||
"T2259",
|
||||
"T2270",
|
||||
"T2272",
|
||||
"T2273",
|
||||
],
|
||||
"L": ["T2181", "T2182", "T2190", "T2192", "T2193", "T2194"],
|
||||
"X": ["T2261", "T2262", "T2320"],
|
||||
}
|
||||
|
||||
HAS_MAP_FEATURE = ["T2253", *ROBOVAC_SERIES["L"], *ROBOVAC_SERIES["X"]]
|
||||
|
||||
HAS_CONSUMABLES = [
|
||||
"T1250",
|
||||
"T2181",
|
||||
"T2182",
|
||||
"T2190",
|
||||
"T2193",
|
||||
"T2194",
|
||||
"T2253",
|
||||
"T2256",
|
||||
"T2258",
|
||||
"T2261",
|
||||
"T2273",
|
||||
"T2320",
|
||||
]
|
||||
|
||||
ROBOVAC_SERIES_FEATURES = {
|
||||
"C": RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM,
|
||||
"G": RoboVacEntityFeature.CLEANING_TIME
|
||||
| RoboVacEntityFeature.CLEANING_AREA
|
||||
| RoboVacEntityFeature.DO_NOT_DISTURB
|
||||
| RoboVacEntityFeature.AUTO_RETURN,
|
||||
"L": RoboVacEntityFeature.CLEANING_TIME
|
||||
| RoboVacEntityFeature.CLEANING_AREA
|
||||
| RoboVacEntityFeature.DO_NOT_DISTURB
|
||||
| RoboVacEntityFeature.AUTO_RETURN
|
||||
| RoboVacEntityFeature.ROOM
|
||||
| RoboVacEntityFeature.ZONE
|
||||
| RoboVacEntityFeature.BOOST_IQ,
|
||||
"X": RoboVacEntityFeature.CLEANING_TIME
|
||||
| RoboVacEntityFeature.CLEANING_AREA
|
||||
| RoboVacEntityFeature.DO_NOT_DISTURB
|
||||
| RoboVacEntityFeature.AUTO_RETURN
|
||||
| RoboVacEntityFeature.ROOM
|
||||
| RoboVacEntityFeature.ZONE
|
||||
| RoboVacEntityFeature.BOOST_IQ,
|
||||
}
|
||||
|
||||
ROBOVAC_SERIES_FAN_SPEEDS = {
|
||||
"C": ["No Suction", "Standard", "Boost IQ", "Max"],
|
||||
"G": ["Standard", "Turbo", "Max", "Boost IQ"],
|
||||
"L": ["Quiet", "Standard", "Turbo", "Max"],
|
||||
"X": ["Pure", "Standard", "Turbo", "Max"],
|
||||
}
|
||||
|
||||
|
||||
SUPPORTED_ROBOVAC_MODELS = list(
|
||||
set([item for sublist in ROBOVAC_SERIES.values() for item in sublist])
|
||||
)
|
||||
from .vacuums import ROBOVAC_MODELS
|
||||
|
||||
|
||||
class ModelNotSupportedException(Exception):
|
||||
|
|
@ -112,48 +11,35 @@ class RoboVac(TuyaDevice):
|
|||
""""""
|
||||
|
||||
def __init__(self, model_code, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.model_code = model_code
|
||||
|
||||
if self.model_code not in SUPPORTED_ROBOVAC_MODELS:
|
||||
if model_code not in ROBOVAC_MODELS[model_code] is None:
|
||||
raise ModelNotSupportedException(
|
||||
"Model {} is not supported".format(self.model_code)
|
||||
"Model {} is not supported".format(model_code)
|
||||
)
|
||||
|
||||
self.model_details = ROBOVAC_MODELS[model_code]
|
||||
super().__init__(self.model_details, *args, **kwargs)
|
||||
|
||||
def getHomeAssistantFeatures(self):
|
||||
supportedFeatures = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
|
||||
if self.model_code in HAS_MAP_FEATURE:
|
||||
supportedFeatures |= VacuumEntityFeature.MAP
|
||||
|
||||
return supportedFeatures
|
||||
return self.model_details.homeassistant_features
|
||||
|
||||
def getRoboVacFeatures(self):
|
||||
supportedFeatures = ROBOVAC_SERIES_FEATURES[self.getRoboVacSeries()]
|
||||
|
||||
if self.model_code in HAS_MAP_FEATURE:
|
||||
supportedFeatures |= RoboVacEntityFeature.MAP
|
||||
|
||||
if self.model_code in HAS_CONSUMABLES:
|
||||
supportedFeatures |= RoboVacEntityFeature.CONSUMABLES
|
||||
|
||||
return supportedFeatures
|
||||
|
||||
def getRoboVacSeries(self):
|
||||
for series, models in ROBOVAC_SERIES.items():
|
||||
if self.model_code in models:
|
||||
return series
|
||||
return self.model_details.robovac_features
|
||||
|
||||
def getFanSpeeds(self):
|
||||
return ROBOVAC_SERIES_FAN_SPEEDS[self.getRoboVacSeries()]
|
||||
return self.model_details.commands[RobovacCommand.FAN_SPEED].values
|
||||
|
||||
def getModes(self):
|
||||
return self.model_details.commands[RobovacCommand.MODE].values
|
||||
|
||||
def getSupportedCommands(self):
|
||||
return list(self.model_details.commands.keys())
|
||||
|
||||
def getCommandCodes(self):
|
||||
command_codes = {}
|
||||
for key, value in self.model_details.commands:
|
||||
if isinstance(value, dict):
|
||||
command_codes[key] = value.code
|
||||
else:
|
||||
command_codes[key] = value
|
||||
|
||||
return command_codes
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
|||
from cryptography.hazmat.primitives.hashes import Hash, MD5
|
||||
from cryptography.hazmat.primitives.padding import PKCS7
|
||||
|
||||
from .vacuums.base import RobovacCommand
|
||||
|
||||
INITIAL_BACKOFF = 5
|
||||
INITIAL_QUEUE_TIME = 0.1
|
||||
BACKOFF_MULTIPLIER = 1.70224
|
||||
|
|
@ -604,6 +606,7 @@ class TuyaDevice:
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
model_details,
|
||||
device_id,
|
||||
host,
|
||||
timeout,
|
||||
|
|
@ -616,6 +619,7 @@ class TuyaDevice:
|
|||
):
|
||||
"""Initialize the device."""
|
||||
self._LOGGER = _LOGGER.getChild(device_id)
|
||||
self.model_details = model_details
|
||||
self.device_id = device_id
|
||||
self.host = host
|
||||
self.port = port
|
||||
|
|
@ -717,7 +721,9 @@ class TuyaDevice:
|
|||
try:
|
||||
sock.connect((self.host, self.port))
|
||||
except (socket.timeout, TimeoutError) as e:
|
||||
self._dps["106"] = "CONNECTION_FAILED"
|
||||
self._dps[self.model_details.commands[RobovacCommand.ERROR]] = (
|
||||
"CONNECTION_FAILED"
|
||||
)
|
||||
raise ConnectionTimeoutException("Connection timed out")
|
||||
loop = asyncio.get_running_loop()
|
||||
loop.create_connection
|
||||
|
|
@ -744,6 +750,7 @@ class TuyaDevice:
|
|||
|
||||
if self.writer is not None:
|
||||
self.writer.close()
|
||||
await self.writer.wait_closed()
|
||||
|
||||
if self.reader is not None and not self.reader.at_eof():
|
||||
self.reader.feed_eof()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ from enum import IntEnum, StrEnum
|
|||
from homeassistant.loader import bind_hass
|
||||
from homeassistant.components.vacuum import (
|
||||
StateVacuumEntity,
|
||||
VacuumEntityFeature,
|
||||
STATE_CLEANING,
|
||||
STATE_DOCKED,
|
||||
STATE_ERROR,
|
||||
|
|
@ -55,15 +54,15 @@ from homeassistant.const import (
|
|||
STATE_UNAVAILABLE,
|
||||
)
|
||||
|
||||
from .vacuums.base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
from .tuyalocalapi import TuyaException
|
||||
from .const import CONF_VACS, DOMAIN, REFRESH_RATE, PING_RATE, TIMEOUT
|
||||
|
||||
from .errors import getErrorMessage
|
||||
from .robovac import (
|
||||
SUPPORTED_ROBOVAC_MODELS,
|
||||
ModelNotSupportedException,
|
||||
RoboVac,
|
||||
RoboVacEntityFeature,
|
||||
)
|
||||
|
||||
from homeassistant.const import ATTR_BATTERY_LEVEL
|
||||
|
|
@ -88,34 +87,6 @@ SCAN_INTERVAL = timedelta(seconds=REFRESH_RATE)
|
|||
UPDATE_RETRIES = 3
|
||||
|
||||
|
||||
class TUYA_CODES(StrEnum):
|
||||
MODE = "5"
|
||||
STATE = "15"
|
||||
# FAN_SPEED = "102"
|
||||
FAN_SPEED = "130"
|
||||
BATTERY_LEVEL = "104"
|
||||
ERROR_CODE = "106"
|
||||
CLEANING_TIME = "109"
|
||||
CLEANING_AREA = "110"
|
||||
DO_NOT_DISTURB = "107"
|
||||
DO_NOT_DISTURB2 = "139"
|
||||
BOOST_IQ = "118"
|
||||
AUTO_RETURN = "135"
|
||||
RETURN_HOME = "101" # boolean
|
||||
A_111 = "111" # 65?
|
||||
A_122 = "122" # continue
|
||||
A_131 = "131" # false
|
||||
A_137 = "137" # 0
|
||||
HARDWARE_CODE = "115" # decoded
|
||||
A_112 = "112" # decoded clean record?
|
||||
A_113 = "113" # decoded
|
||||
CLEAN_STATISTIC = "114" # decoded
|
||||
MULTI_MAPS = "117" # decoded
|
||||
|
||||
|
||||
TUYA_CONSUMABLES_CODES = ["142", "116"]
|
||||
|
||||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
|
|
@ -296,6 +267,7 @@ class RoboVacEntity(StateVacuumEntity):
|
|||
self._attr_supported_features = self.vacuum.getHomeAssistantFeatures()
|
||||
self._attr_robovac_supported = self.vacuum.getRoboVacFeatures()
|
||||
self._attr_fan_speed_list = self.vacuum.getFanSpeeds()
|
||||
self._tuya_command_codes = self.vacuum.getCommandCodes()
|
||||
|
||||
self._attr_mode = None
|
||||
self._attr_consumables = None
|
||||
|
|
@ -343,51 +315,57 @@ class RoboVacEntity(StateVacuumEntity):
|
|||
def update_entity_values(self):
|
||||
self.tuyastatus = self.vacuum._dps
|
||||
|
||||
# for 15C
|
||||
self._attr_battery_level = self.tuyastatus.get(TUYA_CODES.BATTERY_LEVEL)
|
||||
self.tuya_state = self.tuyastatus.get(TUYA_CODES.STATE)
|
||||
self.error_code = self.tuyastatus.get(TUYA_CODES.ERROR_CODE)
|
||||
self._attr_mode = self.tuyastatus.get(TUYA_CODES.MODE)
|
||||
self._attr_fan_speed = self.tuyastatus.get(TUYA_CODES.FAN_SPEED)
|
||||
if self.fan_speed == "No_suction":
|
||||
self._attr_fan_speed = "No Suction"
|
||||
elif self.fan_speed == "Boost_IQ":
|
||||
self._attr_fan_speed = "Boost IQ"
|
||||
elif self.fan_speed == "Quiet":
|
||||
self._attr_fan_speed = "Pure"
|
||||
# for G30
|
||||
self._attr_cleaning_area = self.tuyastatus.get(TUYA_CODES.CLEANING_AREA)
|
||||
self._attr_cleaning_time = self.tuyastatus.get(TUYA_CODES.CLEANING_TIME)
|
||||
self._attr_auto_return = self.tuyastatus.get(TUYA_CODES.AUTO_RETURN)
|
||||
self._attr_do_not_disturb = self.tuyastatus.get(TUYA_CODES.DO_NOT_DISTURB)
|
||||
self._attr_boost_iq = self.tuyastatus.get(TUYA_CODES.BOOST_IQ)
|
||||
# self.map_data = self.tuyastatus.get("121")
|
||||
# self.erro_msg? = self.tuyastatus.get("124")
|
||||
self._attr_battery_level = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.BATTERY]
|
||||
)
|
||||
self.tuya_state = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.STATUS]
|
||||
)
|
||||
self.error_code = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.ERROR]
|
||||
)
|
||||
self._attr_mode = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.MODE]
|
||||
)
|
||||
self._attr_fan_speed = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.FAN_SPEED]
|
||||
)
|
||||
|
||||
if self.robovac_supported & RoboVacEntityFeature.CLEANING_AREA:
|
||||
self._attr_cleaning_area = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.CLEANING_AREA]
|
||||
)
|
||||
|
||||
if self.robovac_supported & RoboVacEntityFeature.CLEANING_TIME:
|
||||
self._attr_cleaning_time = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.CLEANING_TIME]
|
||||
)
|
||||
|
||||
if self.robovac_supported & RoboVacEntityFeature.AUTO_RETURN:
|
||||
self._attr_auto_return = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.AUTO_RETURN]
|
||||
)
|
||||
|
||||
if self.robovac_supported & RoboVacEntityFeature.DO_NOT_DISTURB:
|
||||
self._attr_do_not_disturb = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.DO_NOT_DISTURB]
|
||||
)
|
||||
|
||||
if self.robovac_supported & RoboVacEntityFeature.BOOST_IQ:
|
||||
self._attr_boost_iq = self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.BOOST_IQ]
|
||||
)
|
||||
|
||||
if self.robovac_supported & RoboVacEntityFeature.CONSUMABLES:
|
||||
_LOGGER.debug("Support Consumables")
|
||||
for CONSUMABLE_CODE in TUYA_CONSUMABLES_CODES:
|
||||
_LOGGER.debug("Consumable code is: {}".format(CONSUMABLE_CODE))
|
||||
_LOGGER.debug(
|
||||
"Consumables value is: {}".format(
|
||||
self.tuyastatus.get(CONSUMABLE_CODE)
|
||||
)
|
||||
)
|
||||
if (
|
||||
CONSUMABLE_CODE in self.tuyastatus
|
||||
and self.tuyastatus.get(CONSUMABLE_CODE) is not None
|
||||
):
|
||||
consumables = ast.literal_eval(
|
||||
base64.b64decode(self.tuyastatus.get(CONSUMABLE_CODE)).decode(
|
||||
"ascii"
|
||||
base64.b64decode(
|
||||
self.tuyastatus.get(
|
||||
self._tuya_command_codes[RobovacCommand.CONSUMABLES]
|
||||
)
|
||||
).decode("ascii")
|
||||
)
|
||||
_LOGGER.debug(
|
||||
"Consumables decoded value is: {}".format(consumables)
|
||||
)
|
||||
if (
|
||||
"consumable" in consumables
|
||||
and "duration" in consumables["consumable"]
|
||||
):
|
||||
_LOGGER.debug("Consumables decoded value is: {}".format(consumables))
|
||||
if "consumable" in consumables and "duration" in consumables["consumable"]:
|
||||
_LOGGER.debug(
|
||||
"Consumables encoded value is: {}".format(
|
||||
consumables["consumable"]["duration"]
|
||||
|
|
@ -398,22 +376,29 @@ class RoboVacEntity(StateVacuumEntity):
|
|||
async def async_locate(self, **kwargs):
|
||||
"""Locate the vacuum cleaner."""
|
||||
_LOGGER.info("Locate Pressed")
|
||||
if self.tuyastatus.get("103"):
|
||||
await self.vacuum.async_set({"103": False})
|
||||
code = self._tuya_command_codes[RobovacCommand.LOCATE]
|
||||
if self.tuyastatus.get(code):
|
||||
await self.vacuum.async_set({code: False})
|
||||
else:
|
||||
await self.vacuum.async_set({"103": True})
|
||||
await self.vacuum.async_set({code: True})
|
||||
|
||||
async def async_return_to_base(self, **kwargs):
|
||||
"""Set the vacuum cleaner to return to the dock."""
|
||||
_LOGGER.info("Return home Pressed")
|
||||
await self.vacuum.async_set({"101": True})
|
||||
await self.vacuum.async_set(
|
||||
{self._tuya_command_codes[RobovacCommand.RETURN_HOME]: True}
|
||||
)
|
||||
|
||||
async def async_start(self, **kwargs):
|
||||
self._attr_mode = "auto"
|
||||
await self.vacuum.async_set({"5": self.mode})
|
||||
await self.vacuum.async_set(
|
||||
{self._tuya_command_codes[RobovacCommand.MODE]: self.mode}
|
||||
)
|
||||
|
||||
async def async_pause(self, **kwargs):
|
||||
await self.vacuum.async_set({"2": False})
|
||||
await self.vacuum.async_set(
|
||||
{self._tuya_command_codes[RobovacCommand.PAUSE]: False}
|
||||
)
|
||||
|
||||
async def async_stop(self, **kwargs):
|
||||
await self.async_return_to_base()
|
||||
|
|
@ -421,18 +406,16 @@ class RoboVacEntity(StateVacuumEntity):
|
|||
async def async_clean_spot(self, **kwargs):
|
||||
"""Perform a spot clean-up."""
|
||||
_LOGGER.info("Spot Clean Pressed")
|
||||
await self.vacuum.async_set({"5": "Spot"})
|
||||
await self.vacuum.async_set(
|
||||
{self._tuya_command_codes[RobovacCommand.MODE]: "Spot"}
|
||||
)
|
||||
|
||||
async def async_set_fan_speed(self, fan_speed, **kwargs):
|
||||
"""Set fan speed."""
|
||||
_LOGGER.info("Fan Speed Selected")
|
||||
if fan_speed == "No Suction":
|
||||
fan_speed = "No_suction"
|
||||
elif fan_speed == "Boost IQ":
|
||||
fan_speed = "Boost_IQ"
|
||||
elif fan_speed == "Pure":
|
||||
fan_speed = "Quiet"
|
||||
await self.vacuum.async_set({"130": fan_speed})
|
||||
await self.vacuum.async_set(
|
||||
{self._tuya_command_codes[RobovacCommand.FAN_SPEED]: fan_speed}
|
||||
)
|
||||
|
||||
async def async_send_command(
|
||||
self, command: str, params: dict | list | None = None, **kwargs
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T1250:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2103:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2117:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2118:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2119:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2120:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2123:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2128:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2130:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2132:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.EDGE | RoboVacEntityFeature.SMALL_ROOM
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["No_Suction","Standard","Boost_IQ","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2150:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2181:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Quiet","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2182:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Quiet","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2190:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Quiet","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2192:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Quiet","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2193:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Quiet","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2194:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Quiet","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2250:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2251:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2252:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2253:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2254:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2255:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2256:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2257:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2258:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2259:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2261:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Pure","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2262:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Pure","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2270:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2272:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2273:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Standard","Turbo","Max","Boost_IQ"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class T2320:
|
||||
homeassistant_features = (
|
||||
VacuumEntityFeature.BATTERY
|
||||
| VacuumEntityFeature.CLEAN_SPOT
|
||||
| VacuumEntityFeature.FAN_SPEED
|
||||
| VacuumEntityFeature.LOCATE
|
||||
| VacuumEntityFeature.PAUSE
|
||||
| VacuumEntityFeature.RETURN_HOME
|
||||
| VacuumEntityFeature.SEND_COMMAND
|
||||
| VacuumEntityFeature.START
|
||||
| VacuumEntityFeature.STATE
|
||||
| VacuumEntityFeature.STOP
|
||||
| VacuumEntityFeature.MAP
|
||||
)
|
||||
robovac_features = RoboVacEntityFeature.CLEANING_TIME | RoboVacEntityFeature.CLEANING_AREA | RoboVacEntityFeature.DO_NOT_DISTURB | RoboVacEntityFeature.AUTO_RETURN | RoboVacEntityFeature.ROOM | RoboVacEntityFeature.ZONE | RoboVacEntityFeature.BOOST_IQ | RoboVacEntityFeature.MAP | RoboVacEntityFeature.CONSUMABLES
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ["Pure","Standard","Turbo","Max"],
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,
|
||||
# These commands need codes adding
|
||||
# RobovacCommand.CLEANING_AREA: 0,
|
||||
# RobovacCommand.CLEANING_TIME: 0,
|
||||
# RobovacCommand.AUTO_RETURN: 0,
|
||||
# RobovacCommand.DO_NOT_DISTURB: 0,
|
||||
# RobovacCommand.BOOST_IQ: 0,
|
||||
# RobovacCommand.CONSUMABLES: 0,
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
from .T2103 import T2103
|
||||
from .T2117 import T2117
|
||||
from .T2118 import T2118
|
||||
from .T2119 import T2119
|
||||
from .T2120 import T2120
|
||||
from .T2123 import T2123
|
||||
from .T2128 import T2128
|
||||
from .T2130 import T2130
|
||||
from .T2132 import T2132
|
||||
from .T1250 import T1250
|
||||
from .T2250 import T2250
|
||||
from .T2251 import T2251
|
||||
from .T2252 import T2252
|
||||
from .T2253 import T2253
|
||||
from .T2254 import T2254
|
||||
from .T2150 import T2150
|
||||
from .T2255 import T2255
|
||||
from .T2256 import T2256
|
||||
from .T2257 import T2257
|
||||
from .T2258 import T2258
|
||||
from .T2259 import T2259
|
||||
from .T2270 import T2270
|
||||
from .T2272 import T2272
|
||||
from .T2273 import T2273
|
||||
from .T2181 import T2181
|
||||
from .T2182 import T2182
|
||||
from .T2190 import T2190
|
||||
from .T2192 import T2192
|
||||
from .T2193 import T2193
|
||||
from .T2194 import T2194
|
||||
from .T2261 import T2261
|
||||
from .T2262 import T2262
|
||||
from .T2320 import T2320
|
||||
|
||||
ROBOVAC_MODELS = {
|
||||
"T2103": T2103,
|
||||
"T2117": T2117,
|
||||
"T2118": T2118,
|
||||
"T2119": T2119,
|
||||
"T2120": T2120,
|
||||
"T2123": T2123,
|
||||
"T2128": T2128,
|
||||
"T2130": T2130,
|
||||
"T2132": T2132,
|
||||
"T1250": T1250,
|
||||
"T2250": T2250,
|
||||
"T2251": T2251,
|
||||
"T2252": T2252,
|
||||
"T2253": T2253,
|
||||
"T2254": T2254,
|
||||
"T2150": T2150,
|
||||
"T2255": T2255,
|
||||
"T2256": T2256,
|
||||
"T2257": T2257,
|
||||
"T2258": T2258,
|
||||
"T2259": T2259,
|
||||
"T2270": T2270,
|
||||
"T2272": T2272,
|
||||
"T2273": T2273,
|
||||
"T2181": T2181,
|
||||
"T2182": T2182,
|
||||
"T2190": T2190,
|
||||
"T2192": T2192,
|
||||
"T2193": T2193,
|
||||
"T2194": T2194,
|
||||
"T2261": T2261,
|
||||
"T2262": T2262,
|
||||
"T2320": T2320,
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
from enum import IntEnum, StrEnum
|
||||
|
||||
|
||||
class RoboVacEntityFeature(IntEnum):
|
||||
"""Supported features of the RoboVac entity."""
|
||||
|
||||
EDGE = 1
|
||||
SMALL_ROOM = 2
|
||||
CLEANING_TIME = 4
|
||||
CLEANING_AREA = 8
|
||||
DO_NOT_DISTURB = 16
|
||||
AUTO_RETURN = 32
|
||||
CONSUMABLES = 64
|
||||
ROOM = 128
|
||||
ZONE = 256
|
||||
MAP = 512
|
||||
BOOST_IQ = 1024
|
||||
|
||||
|
||||
class RobovacCommand(StrEnum):
|
||||
PAUSE = "pause"
|
||||
DIRECTION = "direction"
|
||||
MODE = "mode"
|
||||
STATUS = "status"
|
||||
RETURN_HOME = "return_home"
|
||||
FAN_SPEED = "fan_speed"
|
||||
LOCATE = "locate"
|
||||
BATTERY = "battery"
|
||||
ERROR = "error"
|
||||
CLEANING_AREA = "cleaning_area"
|
||||
CLEANING_TIME = "cleaning_time"
|
||||
AUTO_RETURN = "auto_return"
|
||||
DO_NOT_DISTURB = "do_not_disturb"
|
||||
BOOST_IQ = "boost_iq"
|
||||
CONSUMABLES = "consumables"
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
const fs = require("fs/promises");
|
||||
const path = require("path");
|
||||
|
||||
const ROBOVAC_SERIES = {
|
||||
C: [
|
||||
"T2103",
|
||||
"T2117",
|
||||
"T2118",
|
||||
"T2119",
|
||||
"T2120",
|
||||
"T2123",
|
||||
"T2128",
|
||||
"T2130",
|
||||
"T2132",
|
||||
],
|
||||
G: [
|
||||
"T1250",
|
||||
"T2250",
|
||||
"T2251",
|
||||
"T2252",
|
||||
"T2253",
|
||||
"T2254",
|
||||
"T2150",
|
||||
"T2255",
|
||||
"T2256",
|
||||
"T2257",
|
||||
"T2258",
|
||||
"T2259",
|
||||
"T2270",
|
||||
"T2272",
|
||||
"T2273",
|
||||
],
|
||||
L: ["T2181", "T2182", "T2190", "T2192", "T2193", "T2194"],
|
||||
X: ["T2261", "T2262", "T2320"],
|
||||
};
|
||||
|
||||
const HAS_MAP_FEATURE = [
|
||||
"T2253",
|
||||
...ROBOVAC_SERIES["L"],
|
||||
...ROBOVAC_SERIES["X"],
|
||||
];
|
||||
|
||||
const HAS_CONSUMABLES = [
|
||||
"T1250",
|
||||
"T2181",
|
||||
"T2182",
|
||||
"T2190",
|
||||
"T2193",
|
||||
"T2194",
|
||||
"T2253",
|
||||
"T2256",
|
||||
"T2258",
|
||||
"T2261",
|
||||
"T2273",
|
||||
"T2320",
|
||||
];
|
||||
|
||||
const ROBOVAC_SERIES_FEATURES = {
|
||||
C: ["RoboVacEntityFeature.EDGE", "RoboVacEntityFeature.SMALL_ROOM"],
|
||||
G: [
|
||||
"RoboVacEntityFeature.CLEANING_TIME",
|
||||
"RoboVacEntityFeature.CLEANING_AREA",
|
||||
"RoboVacEntityFeature.DO_NOT_DISTURB",
|
||||
"RoboVacEntityFeature.AUTO_RETURN",
|
||||
],
|
||||
L: [
|
||||
"RoboVacEntityFeature.CLEANING_TIME",
|
||||
"RoboVacEntityFeature.CLEANING_AREA",
|
||||
"RoboVacEntityFeature.DO_NOT_DISTURB",
|
||||
"RoboVacEntityFeature.AUTO_RETURN",
|
||||
"RoboVacEntityFeature.ROOM",
|
||||
"RoboVacEntityFeature.ZONE",
|
||||
"RoboVacEntityFeature.BOOST_IQ",
|
||||
],
|
||||
X: [
|
||||
"RoboVacEntityFeature.CLEANING_TIME",
|
||||
"RoboVacEntityFeature.CLEANING_AREA",
|
||||
"RoboVacEntityFeature.DO_NOT_DISTURB",
|
||||
"RoboVacEntityFeature.AUTO_RETURN",
|
||||
"RoboVacEntityFeature.ROOM",
|
||||
"RoboVacEntityFeature.ZONE",
|
||||
"RoboVacEntityFeature.BOOST_IQ",
|
||||
],
|
||||
};
|
||||
|
||||
const ROBOVAC_SERIES_FAN_SPEEDS = {
|
||||
C: ["No_Suction", "Standard", "Boost_IQ", "Max"],
|
||||
G: ["Standard", "Turbo", "Max", "Boost_IQ"],
|
||||
L: ["Quiet", "Standard", "Turbo", "Max"],
|
||||
X: ["Pure", "Standard", "Turbo", "Max"],
|
||||
};
|
||||
|
||||
const commands = [
|
||||
"CLEANING_AREA",
|
||||
"CLEANING_TIME",
|
||||
"AUTO_RETURN",
|
||||
"DO_NOT_DISTURB",
|
||||
"BOOST_IQ",
|
||||
"CONSUMABLES",
|
||||
];
|
||||
|
||||
const allModels = [];
|
||||
|
||||
Object.entries(ROBOVAC_SERIES).forEach(([series, models]) => {
|
||||
models.forEach((model) => {
|
||||
allModels.push(model);
|
||||
|
||||
const robovac_features = [...ROBOVAC_SERIES_FEATURES[series]];
|
||||
const homeassistant_features = [
|
||||
"VacuumEntityFeature.BATTERY",
|
||||
"VacuumEntityFeature.CLEAN_SPOT",
|
||||
"VacuumEntityFeature.FAN_SPEED",
|
||||
"VacuumEntityFeature.LOCATE",
|
||||
"VacuumEntityFeature.PAUSE",
|
||||
"VacuumEntityFeature.RETURN_HOME",
|
||||
"VacuumEntityFeature.SEND_COMMAND",
|
||||
"VacuumEntityFeature.START",
|
||||
"VacuumEntityFeature.STATE",
|
||||
"VacuumEntityFeature.STOP",
|
||||
];
|
||||
|
||||
if (HAS_MAP_FEATURE.includes(model)) {
|
||||
homeassistant_features.push("VacuumEntityFeature.MAP");
|
||||
robovac_features.push("RoboVacEntityFeature.MAP");
|
||||
}
|
||||
|
||||
if (HAS_CONSUMABLES.includes(model)) {
|
||||
robovac_features.push("RoboVacEntityFeature.CONSUMABLES");
|
||||
}
|
||||
|
||||
const extra_commands = commands
|
||||
.filter((command) =>
|
||||
robovac_features.includes(`RoboVacEntityFeature.${command}`)
|
||||
)
|
||||
.map((command) => `# RobovacCommand.${command}: 0,`);
|
||||
|
||||
if (extra_commands.length > 0) {
|
||||
extra_commands.unshift("# These commands need codes adding");
|
||||
}
|
||||
|
||||
const file = `from homeassistant.components.vacuum import VacuumEntityFeature
|
||||
from .base import RoboVacEntityFeature, RobovacCommand
|
||||
|
||||
|
||||
class ${model}:
|
||||
homeassistant_features = (
|
||||
${homeassistant_features.join("\n | ")}
|
||||
)
|
||||
robovac_features = ${robovac_features.join(" | ")}
|
||||
commands = {
|
||||
RobovacCommand.PAUSE: 2,
|
||||
RobovacCommand.DIRECTION: {
|
||||
"code": 3,
|
||||
"values": ["forward", "back", "left", "right"],
|
||||
},
|
||||
RobovacCommand.MODE: {
|
||||
"code": 5,
|
||||
"values": ["auto", "SmallRoom", "Spot", "Edge", "Nosweep"],
|
||||
},
|
||||
RobovacCommand.STATUS: 15,
|
||||
RobovacCommand.RETURN_HOME: 101,
|
||||
RobovacCommand.FAN_SPEED: {
|
||||
"code": 102,
|
||||
"values": ${JSON.stringify(ROBOVAC_SERIES_FAN_SPEEDS[series])},
|
||||
},
|
||||
RobovacCommand.LOCATE: 103,
|
||||
RobovacCommand.BATTERY: 104,
|
||||
RobovacCommand.ERROR: 106,${
|
||||
extra_commands.length > 0
|
||||
? `\n ${extra_commands.join("\n ")}`
|
||||
: ""
|
||||
}
|
||||
}
|
||||
`;
|
||||
fs.writeFile(
|
||||
path.join(
|
||||
__dirname,
|
||||
"custom_components",
|
||||
"robovac",
|
||||
"vacuums",
|
||||
`${model}.py`
|
||||
),
|
||||
file
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
const initFile = `${allModels
|
||||
.map((model) => `from .${model} import ${model}`)
|
||||
.join("\n")}
|
||||
|
||||
|
||||
ROBOVAC_MODELS = {
|
||||
${allModels.map((model) => ` "${model}": ${model}`).join(",\n")}
|
||||
}`;
|
||||
|
||||
fs.writeFile(
|
||||
path.join(
|
||||
__dirname,
|
||||
"custom_components",
|
||||
"robovac",
|
||||
"vacuums",
|
||||
`__init__.py`
|
||||
),
|
||||
initFile
|
||||
);
|
||||
Loading…
Reference in New Issue