mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-11-12 16:01:54 +00:00
feat: update device support for mop robot(T0xD8).
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
from homeassistant.components.smartthings.sensor import value
|
||||||
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, UnitOfTime, UnitOfArea, UnitOfVolume
|
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, UnitOfTime, UnitOfArea, UnitOfVolume
|
||||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||||
@@ -10,90 +11,37 @@ DEVICE_MAPPING = {
|
|||||||
"centralized": [],
|
"centralized": [],
|
||||||
"entities": {
|
"entities": {
|
||||||
Platform.SELECT: {
|
Platform.SELECT: {
|
||||||
"fan_level": {
|
"fan_setting": {
|
||||||
"options": {
|
"options": {
|
||||||
"low": {"fan_level": "low"},
|
"soft": {"level": "soft"},
|
||||||
"medium": {"fan_level": "medium"},
|
"normal": {"level": "normal"},
|
||||||
"high": {"fan_level": "high"},
|
"high": {"level": "high"},
|
||||||
"auto": {"fan_level": "auto"}
|
"super": {"level": "super"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"work_mode": {
|
"work_mode": {
|
||||||
"options": {
|
"options": {
|
||||||
"none": {"work_mode": "none"},
|
"sweep_and_mop": {"work_mode": "sweep_and_mop"},
|
||||||
"auto": {"work_mode": "auto"},
|
"sweep": {"work_mode": "sweep"},
|
||||||
"spot": {"work_mode": "spot"},
|
"mop": {"work_mode": "mop"},
|
||||||
"edge": {"work_mode": "edge"},
|
"sweep_then_mop": {"work_mode": "sweep_then_mop"}
|
||||||
"single_room": {"work_mode": "single_room"},
|
|
||||||
"custom": {"work_mode": "custom"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"work_status": {
|
"work_status": {
|
||||||
"options": {
|
"options": {
|
||||||
"idle": {"work_status": "idle"},
|
"auto_clean": {"work_status": "auto_clean"},
|
||||||
"cleaning": {"work_status": "cleaning"},
|
"auto_clean_pause": {"work_status": "auto_clean_pause"},
|
||||||
"returning": {"work_status": "returning"},
|
"charge": {"work_status": "charge"},
|
||||||
"docked": {"work_status": "docked"},
|
"charge_pause": {"work_status": "charge_pause"},
|
||||||
"on_base": {"work_status": "on_base"},
|
|
||||||
"charging": {"work_status": "charging"},
|
|
||||||
"error": {"work_status": "error"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"move_direction": {
|
"water_tank_setting": {
|
||||||
"options": {
|
"options": {
|
||||||
"none": {"move_direction": "none"},
|
"low": {"level": "low"},
|
||||||
"forward": {"move_direction": "forward"},
|
"normal": {"level": "normal"},
|
||||||
"backward": {"move_direction": "backward"},
|
"high": {"level": "high"}
|
||||||
"left": {"move_direction": "left"},
|
|
||||||
"right": {"move_direction": "right"}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"query_type": {
|
|
||||||
"options": {
|
|
||||||
"work": {"query_type": "work"},
|
|
||||||
"status": {"query_type": "status"},
|
|
||||||
"battery": {"query_type": "battery"},
|
|
||||||
"error": {"query_type": "error"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sub_work_status": {
|
|
||||||
"options": {
|
|
||||||
"idle": {"sub_work_status": "idle"},
|
|
||||||
"cleaning": {"sub_work_status": "cleaning"},
|
|
||||||
"charging": {"sub_work_status": "charging"},
|
|
||||||
"charge_finish": {"sub_work_status": "charge_finish"},
|
|
||||||
"error": {"sub_work_status": "error"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"water_level": {
|
|
||||||
"options": {
|
|
||||||
"low": {"water_level": "low"},
|
|
||||||
"normal": {"water_level": "normal"},
|
|
||||||
"high": {"water_level": "high"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mop_status": {
|
|
||||||
"options": {
|
|
||||||
"normal": {"mop_status": "normal"},
|
|
||||||
"lack_water": {"mop_status": "lack_water"},
|
|
||||||
"full_water": {"mop_status": "full_water"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"error_type": {
|
|
||||||
"options": {
|
|
||||||
"no_error": {"error_type": "no_error"},
|
|
||||||
"can_fix": {"error_type": "can_fix"},
|
|
||||||
"need_help": {"error_type": "need_help"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"control_type": {
|
|
||||||
"options": {
|
|
||||||
"none": {"control_type": "none"},
|
|
||||||
"app": {"control_type": "app"},
|
|
||||||
"remote": {"control_type": "remote"},
|
|
||||||
"auto": {"control_type": "auto"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
Platform.BINARY_SENSOR: {
|
Platform.BINARY_SENSOR: {
|
||||||
"carpet_switch": {
|
"carpet_switch": {
|
||||||
@@ -104,6 +52,21 @@ DEVICE_MAPPING = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Platform.SENSOR: {
|
Platform.SENSOR: {
|
||||||
|
"control_type": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM
|
||||||
|
},
|
||||||
|
"mop_status": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM
|
||||||
|
},
|
||||||
|
"sub_work_status": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM
|
||||||
|
},
|
||||||
|
"query_type": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM
|
||||||
|
},
|
||||||
|
"move_direction": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM
|
||||||
|
},
|
||||||
"dust_count": {
|
"dust_count": {
|
||||||
"device_class": SensorDeviceClass.ENUM
|
"device_class": SensorDeviceClass.ENUM
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -506,7 +506,7 @@
|
|||||||
"variable_mode": {
|
"variable_mode": {
|
||||||
"name": "Variable Mode"
|
"name": "Variable Mode"
|
||||||
},
|
},
|
||||||
"water_level": {
|
"water_tank_setting": {
|
||||||
"name": "Water Level"
|
"name": "Water Level"
|
||||||
},
|
},
|
||||||
"wind_gear": {
|
"wind_gear": {
|
||||||
|
|||||||
@@ -506,7 +506,7 @@
|
|||||||
"variable_mode": {
|
"variable_mode": {
|
||||||
"name": "变温模式"
|
"name": "变温模式"
|
||||||
},
|
},
|
||||||
"water_level": {
|
"water_tank_setting": {
|
||||||
"name": "水位"
|
"name": "水位"
|
||||||
},
|
},
|
||||||
"wind_gear": {
|
"wind_gear": {
|
||||||
|
|||||||
Reference in New Issue
Block a user