forked from HomeAssistant/midea-meiju-codec
fix: remote control for device T0xED.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, UnitOfTime, UnitOfElectricPotential, UnitOfVolume, UnitOfMass
|
||||
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, UnitOfTime, UnitOfElectricPotential, \
|
||||
UnitOfVolume, UnitOfMass
|
||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||
from homeassistant.components.switch import SwitchDeviceClass
|
||||
@@ -10,61 +11,44 @@ DEVICE_MAPPING = {
|
||||
"centralized": [],
|
||||
"entities": {
|
||||
Platform.SWITCH: {
|
||||
"holiday_mode": {
|
||||
"power": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"water_way": {
|
||||
"heat_start": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
"rationale": [0, 1],
|
||||
},
|
||||
"lock": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"soften": {
|
||||
"sleep": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"leak_water_protection": {
|
||||
"keep_warm": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"cl_sterilization": {
|
||||
"vacation": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"micro_leak": {
|
||||
"germicidal": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"low_salt": {
|
||||
"lack_water": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"no_salt": {
|
||||
"drainage": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"low_battery": {
|
||||
"wash_enable": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"salt_level_sensor_error": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"flowmeter_error": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"leak_water": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"micro_leak_protection": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"maintenance_reminder_switch": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"rsj_stand_by": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"regeneration": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"pre_regeneration": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
}
|
||||
},
|
||||
Platform.BINARY_SENSOR: {
|
||||
"maintenance_remind": {
|
||||
"device_class": BinarySensorDeviceClass.PROBLEM,
|
||||
"heat_status": {
|
||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
||||
},
|
||||
"standby_status": {
|
||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
||||
},
|
||||
"chlorine_sterilization_error": {
|
||||
"device_class": BinarySensorDeviceClass.PROBLEM,
|
||||
@@ -74,154 +58,31 @@ DEVICE_MAPPING = {
|
||||
}
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"micro_leak_protection_value": {
|
||||
"device_class": SensorDeviceClass.PRESSURE,
|
||||
"unit_of_measurement": "kPa",
|
||||
"current_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"regeneration_current_stages": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
"cool_target_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"water_hardness": {
|
||||
"device_class": SensorDeviceClass.WATER,
|
||||
"water_consumption_ml": {
|
||||
"device_class": SensorDeviceClass.VOLUME,
|
||||
"unit_of_measurement": UnitOfVolume.LITERS,
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||
},
|
||||
"timing_regeneration_hour": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.HOURS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"real_time_setting_hour": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.HOURS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"timing_regeneration_min": {
|
||||
"keep_warm_time": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.MINUTES,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"regeneration_left_seconds": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.SECONDS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"maintenance_reminder_setting": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"mixed_water_gear": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"use_days": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"days_since_last_regeneration": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"velocity": {
|
||||
"device_class": SensorDeviceClass.SPEED,
|
||||
"unit_of_measurement": "m/s",
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"supply_voltage": {
|
||||
"device_class": SensorDeviceClass.VOLTAGE,
|
||||
"unit_of_measurement": UnitOfElectricPotential.VOLT,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"left_salt": {
|
||||
"device_class": SensorDeviceClass.WEIGHT,
|
||||
"unit_of_measurement": UnitOfMass.KILOGRAMS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"pre_regeneration_days": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"flushing_days": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"salt_setting": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"regeneration_count": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"battery_voltage": {
|
||||
"device_class": SensorDeviceClass.VOLTAGE,
|
||||
"unit_of_measurement": UnitOfElectricPotential.VOLT,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"error": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"days_since_last_two_regeneration": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"remind_maintenance_days": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"real_date_setting_year": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"real_date_setting_month": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"real_date_setting_day": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"category": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"real_time_setting_min": {
|
||||
"warm_left_time": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.MINUTES,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"regeneration_stages": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"soft_available_big": {
|
||||
"device_class": SensorDeviceClass.VOLUME,
|
||||
"unit_of_measurement": UnitOfVolume.LITERS,
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||
},
|
||||
"water_consumption_big": {
|
||||
"device_class": SensorDeviceClass.VOLUME,
|
||||
"unit_of_measurement": UnitOfVolume.LITERS,
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||
},
|
||||
"water_consumption_today": {
|
||||
"device_class": SensorDeviceClass.VOLUME,
|
||||
"unit_of_measurement": UnitOfVolume.LITERS,
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||
},
|
||||
"water_consumption_average": {
|
||||
"device_class": SensorDeviceClass.VOLUME,
|
||||
"unit_of_measurement": UnitOfVolume.LITERS,
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||
},
|
||||
"salt_alarm_threshold": {
|
||||
"device_class": SensorDeviceClass.WEIGHT,
|
||||
"unit_of_measurement": UnitOfMass.KILOGRAMS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"leak_water_protection_value": {
|
||||
"device_class": SensorDeviceClass.PRESSURE,
|
||||
"unit_of_measurement": "kPa",
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user