mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add translations to Xiaomi Miio (#123822)
* Add translations to Xiaomi Miio * Deduplicate translations
This commit is contained in:
parent
053e38db38
commit
f3e2c51774
@ -56,13 +56,13 @@ class XiaomiMiioBinarySensorDescription(BinarySensorEntityDescription):
|
||||
BINARY_SENSOR_TYPES = (
|
||||
XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_NO_WATER,
|
||||
name="Water tank empty",
|
||||
translation_key=ATTR_NO_WATER,
|
||||
icon="mdi:water-off-outline",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_WATER_TANK_DETACHED,
|
||||
name="Water tank",
|
||||
translation_key=ATTR_WATER_TANK_DETACHED,
|
||||
icon="mdi:car-coolant-level",
|
||||
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
||||
value=lambda value: not value,
|
||||
@ -70,13 +70,13 @@ BINARY_SENSOR_TYPES = (
|
||||
),
|
||||
XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_PTC_STATUS,
|
||||
name="Auxiliary heat status",
|
||||
translation_key=ATTR_PTC_STATUS,
|
||||
device_class=BinarySensorDeviceClass.POWER,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_POWERSUPPLY_ATTACHED,
|
||||
name="Power supply",
|
||||
translation_key=ATTR_POWERSUPPLY_ATTACHED,
|
||||
device_class=BinarySensorDeviceClass.PLUG,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
@ -88,7 +88,7 @@ FAN_ZA5_BINARY_SENSORS = (ATTR_POWERSUPPLY_ATTACHED,)
|
||||
VACUUM_SENSORS = {
|
||||
ATTR_MOP_ATTACHED: XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_WATER_BOX_ATTACHED,
|
||||
name="Mop attached",
|
||||
translation_key=ATTR_WATER_BOX_ATTACHED,
|
||||
icon="mdi:square-rounded",
|
||||
parent_key=VacuumCoordinatorDataAttributes.status,
|
||||
entity_registry_enabled_default=True,
|
||||
@ -97,7 +97,7 @@ VACUUM_SENSORS = {
|
||||
),
|
||||
ATTR_WATER_BOX_ATTACHED: XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_WATER_BOX_ATTACHED,
|
||||
name="Water box attached",
|
||||
translation_key=ATTR_WATER_BOX_ATTACHED,
|
||||
icon="mdi:water",
|
||||
parent_key=VacuumCoordinatorDataAttributes.status,
|
||||
entity_registry_enabled_default=True,
|
||||
@ -106,7 +106,7 @@ VACUUM_SENSORS = {
|
||||
),
|
||||
ATTR_WATER_SHORTAGE: XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_WATER_SHORTAGE,
|
||||
name="Water shortage",
|
||||
translation_key=ATTR_WATER_SHORTAGE,
|
||||
icon="mdi:water",
|
||||
parent_key=VacuumCoordinatorDataAttributes.status,
|
||||
entity_registry_enabled_default=True,
|
||||
@ -119,7 +119,7 @@ VACUUM_SENSORS_SEPARATE_MOP = {
|
||||
**VACUUM_SENSORS,
|
||||
ATTR_MOP_ATTACHED: XiaomiMiioBinarySensorDescription(
|
||||
key=ATTR_MOP_ATTACHED,
|
||||
name="Mop attached",
|
||||
translation_key=ATTR_MOP_ATTACHED,
|
||||
icon="mdi:square-rounded",
|
||||
parent_key=VacuumCoordinatorDataAttributes.status,
|
||||
entity_registry_enabled_default=True,
|
||||
|
@ -51,7 +51,7 @@ BUTTON_TYPES = (
|
||||
# Fans
|
||||
XiaomiMiioButtonDescription(
|
||||
key=ATTR_RESET_DUST_FILTER,
|
||||
name="Reset dust filter",
|
||||
translation_key=ATTR_RESET_DUST_FILTER,
|
||||
icon="mdi:air-filter",
|
||||
method_press="reset_dust_filter",
|
||||
method_press_error_message="Resetting the dust filter lifetime failed",
|
||||
@ -59,7 +59,7 @@ BUTTON_TYPES = (
|
||||
),
|
||||
XiaomiMiioButtonDescription(
|
||||
key=ATTR_RESET_UPPER_FILTER,
|
||||
name="Reset upper filter",
|
||||
translation_key=ATTR_RESET_UPPER_FILTER,
|
||||
icon="mdi:air-filter",
|
||||
method_press="reset_upper_filter",
|
||||
method_press_error_message="Resetting the upper filter lifetime failed.",
|
||||
@ -68,7 +68,7 @@ BUTTON_TYPES = (
|
||||
# Vacuums
|
||||
XiaomiMiioButtonDescription(
|
||||
key=ATTR_RESET_VACUUM_MAIN_BRUSH,
|
||||
name="Reset main brush",
|
||||
translation_key=ATTR_RESET_VACUUM_MAIN_BRUSH,
|
||||
icon="mdi:brush",
|
||||
method_press=METHOD_VACUUM_RESET_CONSUMABLE,
|
||||
method_press_params=Consumable.MainBrush,
|
||||
@ -77,7 +77,7 @@ BUTTON_TYPES = (
|
||||
),
|
||||
XiaomiMiioButtonDescription(
|
||||
key=ATTR_RESET_VACUUM_SIDE_BRUSH,
|
||||
name="Reset side brush",
|
||||
translation_key=ATTR_RESET_VACUUM_SIDE_BRUSH,
|
||||
icon="mdi:brush",
|
||||
method_press=METHOD_VACUUM_RESET_CONSUMABLE,
|
||||
method_press_params=Consumable.SideBrush,
|
||||
@ -86,7 +86,7 @@ BUTTON_TYPES = (
|
||||
),
|
||||
XiaomiMiioButtonDescription(
|
||||
key=ATTR_RESET_VACUUM_FILTER,
|
||||
name="Reset filter",
|
||||
translation_key=ATTR_RESET_VACUUM_FILTER,
|
||||
icon="mdi:air-filter",
|
||||
method_press=METHOD_VACUUM_RESET_CONSUMABLE,
|
||||
method_press_params=Consumable.Filter,
|
||||
@ -95,7 +95,7 @@ BUTTON_TYPES = (
|
||||
),
|
||||
XiaomiMiioButtonDescription(
|
||||
key=ATTR_RESET_VACUUM_SENSOR_DIRTY,
|
||||
name="Reset sensor dirty",
|
||||
translation_key=ATTR_RESET_VACUUM_SENSOR_DIRTY,
|
||||
icon="mdi:eye-outline",
|
||||
method_press=METHOD_VACUUM_RESET_CONSUMABLE,
|
||||
method_press_params=Consumable.SensorDirty,
|
||||
|
@ -139,7 +139,7 @@ class FavoriteLevelValues:
|
||||
NUMBER_TYPES = {
|
||||
FEATURE_SET_MOTOR_SPEED: XiaomiMiioNumberDescription(
|
||||
key=ATTR_MOTOR_SPEED,
|
||||
name="Motor speed",
|
||||
translation_key=ATTR_MOTOR_SPEED,
|
||||
icon="mdi:fast-forward-outline",
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
native_min_value=200,
|
||||
@ -151,7 +151,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_FAVORITE_LEVEL: XiaomiMiioNumberDescription(
|
||||
key=ATTR_FAVORITE_LEVEL,
|
||||
name="Favorite level",
|
||||
translation_key=ATTR_FAVORITE_LEVEL,
|
||||
icon="mdi:star-cog",
|
||||
native_min_value=0,
|
||||
native_max_value=17,
|
||||
@ -161,7 +161,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_FAN_LEVEL: XiaomiMiioNumberDescription(
|
||||
key=ATTR_FAN_LEVEL,
|
||||
name="Fan level",
|
||||
translation_key=ATTR_FAN_LEVEL,
|
||||
icon="mdi:fan",
|
||||
native_min_value=1,
|
||||
native_max_value=3,
|
||||
@ -171,7 +171,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_VOLUME: XiaomiMiioNumberDescription(
|
||||
key=ATTR_VOLUME,
|
||||
name="Volume",
|
||||
translation_key=ATTR_VOLUME,
|
||||
icon="mdi:volume-high",
|
||||
native_min_value=0,
|
||||
native_max_value=100,
|
||||
@ -181,7 +181,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_OSCILLATION_ANGLE: XiaomiMiioNumberDescription(
|
||||
key=ATTR_OSCILLATION_ANGLE,
|
||||
name="Oscillation angle",
|
||||
translation_key=ATTR_OSCILLATION_ANGLE,
|
||||
icon="mdi:angle-acute",
|
||||
native_unit_of_measurement=DEGREE,
|
||||
native_min_value=1,
|
||||
@ -192,7 +192,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_DELAY_OFF_COUNTDOWN: XiaomiMiioNumberDescription(
|
||||
key=ATTR_DELAY_OFF_COUNTDOWN,
|
||||
name="Delay off countdown",
|
||||
translation_key=ATTR_DELAY_OFF_COUNTDOWN,
|
||||
icon="mdi:fan-off",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
native_min_value=0,
|
||||
@ -203,7 +203,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_LED_BRIGHTNESS: XiaomiMiioNumberDescription(
|
||||
key=ATTR_LED_BRIGHTNESS,
|
||||
name="LED brightness",
|
||||
translation_key=ATTR_LED_BRIGHTNESS,
|
||||
icon="mdi:brightness-6",
|
||||
native_min_value=0,
|
||||
native_max_value=100,
|
||||
@ -213,7 +213,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_LED_BRIGHTNESS_LEVEL: XiaomiMiioNumberDescription(
|
||||
key=ATTR_LED_BRIGHTNESS_LEVEL,
|
||||
name="LED brightness",
|
||||
translation_key=ATTR_LED_BRIGHTNESS_LEVEL,
|
||||
icon="mdi:brightness-6",
|
||||
native_min_value=0,
|
||||
native_max_value=8,
|
||||
@ -223,7 +223,7 @@ NUMBER_TYPES = {
|
||||
),
|
||||
FEATURE_SET_FAVORITE_RPM: XiaomiMiioNumberDescription(
|
||||
key=ATTR_FAVORITE_RPM,
|
||||
name="Favorite motor speed",
|
||||
translation_key=ATTR_FAVORITE_RPM,
|
||||
icon="mdi:star-cog",
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
native_min_value=300,
|
||||
|
@ -162,34 +162,31 @@ class XiaomiMiioSensorDescription(SensorEntityDescription):
|
||||
SENSOR_TYPES = {
|
||||
ATTR_TEMPERATURE: XiaomiMiioSensorDescription(
|
||||
key=ATTR_TEMPERATURE,
|
||||
name="Temperature",
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_HUMIDITY: XiaomiMiioSensorDescription(
|
||||
key=ATTR_HUMIDITY,
|
||||
name="Humidity",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
device_class=SensorDeviceClass.HUMIDITY,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_PRESSURE: XiaomiMiioSensorDescription(
|
||||
key=ATTR_PRESSURE,
|
||||
name="Pressure",
|
||||
native_unit_of_measurement=UnitOfPressure.HPA,
|
||||
device_class=SensorDeviceClass.ATMOSPHERIC_PRESSURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_LOAD_POWER: XiaomiMiioSensorDescription(
|
||||
key=ATTR_LOAD_POWER,
|
||||
name="Load power",
|
||||
translation_key=ATTR_LOAD_POWER,
|
||||
native_unit_of_measurement=UnitOfPower.WATT,
|
||||
device_class=SensorDeviceClass.POWER,
|
||||
),
|
||||
ATTR_WATER_LEVEL: XiaomiMiioSensorDescription(
|
||||
key=ATTR_WATER_LEVEL,
|
||||
name="Water level",
|
||||
translation_key=ATTR_WATER_LEVEL,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:water-check",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -197,7 +194,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_ACTUAL_SPEED: XiaomiMiioSensorDescription(
|
||||
key=ATTR_ACTUAL_SPEED,
|
||||
name="Actual speed",
|
||||
translation_key=ATTR_ACTUAL_SPEED,
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
icon="mdi:fast-forward",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -205,7 +202,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_CONTROL_SPEED: XiaomiMiioSensorDescription(
|
||||
key=ATTR_CONTROL_SPEED,
|
||||
name="Control speed",
|
||||
translation_key=ATTR_CONTROL_SPEED,
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
icon="mdi:fast-forward",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -213,7 +210,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_FAVORITE_SPEED: XiaomiMiioSensorDescription(
|
||||
key=ATTR_FAVORITE_SPEED,
|
||||
name="Favorite speed",
|
||||
translation_key=ATTR_FAVORITE_SPEED,
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
icon="mdi:fast-forward",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -221,7 +218,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_MOTOR_SPEED: XiaomiMiioSensorDescription(
|
||||
key=ATTR_MOTOR_SPEED,
|
||||
name="Motor speed",
|
||||
translation_key=ATTR_MOTOR_SPEED,
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
icon="mdi:fast-forward",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -229,7 +226,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_MOTOR2_SPEED: XiaomiMiioSensorDescription(
|
||||
key=ATTR_MOTOR2_SPEED,
|
||||
name="Second motor speed",
|
||||
translation_key=ATTR_MOTOR2_SPEED,
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
icon="mdi:fast-forward",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -237,7 +234,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_USE_TIME: XiaomiMiioSensorDescription(
|
||||
key=ATTR_USE_TIME,
|
||||
name="Use time",
|
||||
translation_key=ATTR_USE_TIME,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
icon="mdi:progress-clock",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
@ -247,54 +244,52 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_ILLUMINANCE: XiaomiMiioSensorDescription(
|
||||
key=ATTR_ILLUMINANCE,
|
||||
name="Illuminance",
|
||||
translation_key=ATTR_ILLUMINANCE,
|
||||
native_unit_of_measurement=UNIT_LUMEN,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_ILLUMINANCE_LUX: XiaomiMiioSensorDescription(
|
||||
key=ATTR_ILLUMINANCE,
|
||||
name="Illuminance",
|
||||
native_unit_of_measurement=LIGHT_LUX,
|
||||
device_class=SensorDeviceClass.ILLUMINANCE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_AIR_QUALITY: XiaomiMiioSensorDescription(
|
||||
key=ATTR_AIR_QUALITY,
|
||||
translation_key=ATTR_AIR_QUALITY,
|
||||
native_unit_of_measurement="AQI",
|
||||
icon="mdi:cloud",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_TVOC: XiaomiMiioSensorDescription(
|
||||
key=ATTR_TVOC,
|
||||
name="TVOC",
|
||||
translation_key=ATTR_TVOC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS,
|
||||
),
|
||||
ATTR_PM10: XiaomiMiioSensorDescription(
|
||||
key=ATTR_PM10,
|
||||
name="PM10",
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
device_class=SensorDeviceClass.PM10,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_PM25: XiaomiMiioSensorDescription(
|
||||
key=ATTR_AQI,
|
||||
name="PM2.5",
|
||||
translation_key=ATTR_AQI,
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
device_class=SensorDeviceClass.PM25,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_PM25_2: XiaomiMiioSensorDescription(
|
||||
key=ATTR_PM25,
|
||||
name="PM2.5",
|
||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
device_class=SensorDeviceClass.PM25,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_FILTER_LIFE_REMAINING: XiaomiMiioSensorDescription(
|
||||
key=ATTR_FILTER_LIFE_REMAINING,
|
||||
name="Filter lifetime remaining",
|
||||
translation_key=ATTR_FILTER_LIFE_REMAINING,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:air-filter",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -303,7 +298,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_FILTER_USE: XiaomiMiioSensorDescription(
|
||||
key=ATTR_FILTER_HOURS_USED,
|
||||
name="Filter use",
|
||||
translation_key=ATTR_FILTER_HOURS_USED,
|
||||
native_unit_of_measurement=UnitOfTime.HOURS,
|
||||
icon="mdi:clock-outline",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
@ -312,7 +307,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_FILTER_LEFT_TIME: XiaomiMiioSensorDescription(
|
||||
key=ATTR_FILTER_LEFT_TIME,
|
||||
name="Filter lifetime left",
|
||||
translation_key=ATTR_FILTER_LEFT_TIME,
|
||||
native_unit_of_measurement=UnitOfTime.DAYS,
|
||||
icon="mdi:clock-outline",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
@ -321,7 +316,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_DUST_FILTER_LIFE_REMAINING: XiaomiMiioSensorDescription(
|
||||
key=ATTR_DUST_FILTER_LIFE_REMAINING,
|
||||
name="Dust filter lifetime remaining",
|
||||
translation_key=ATTR_DUST_FILTER_LIFE_REMAINING,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:air-filter",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -330,7 +325,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_DUST_FILTER_LIFE_REMAINING_DAYS: XiaomiMiioSensorDescription(
|
||||
key=ATTR_DUST_FILTER_LIFE_REMAINING_DAYS,
|
||||
name="Dust filter lifetime remaining days",
|
||||
translation_key=ATTR_DUST_FILTER_LIFE_REMAINING_DAYS,
|
||||
native_unit_of_measurement=UnitOfTime.DAYS,
|
||||
icon="mdi:clock-outline",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
@ -339,7 +334,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_UPPER_FILTER_LIFE_REMAINING: XiaomiMiioSensorDescription(
|
||||
key=ATTR_UPPER_FILTER_LIFE_REMAINING,
|
||||
name="Upper filter lifetime remaining",
|
||||
translation_key=ATTR_UPPER_FILTER_LIFE_REMAINING,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:air-filter",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -348,7 +343,7 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_UPPER_FILTER_LIFE_REMAINING_DAYS: XiaomiMiioSensorDescription(
|
||||
key=ATTR_UPPER_FILTER_LIFE_REMAINING_DAYS,
|
||||
name="Upper filter lifetime remaining days",
|
||||
translation_key=ATTR_UPPER_FILTER_LIFE_REMAINING_DAYS,
|
||||
native_unit_of_measurement=UnitOfTime.DAYS,
|
||||
icon="mdi:clock-outline",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
@ -357,14 +352,13 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_CARBON_DIOXIDE: XiaomiMiioSensorDescription(
|
||||
key=ATTR_CARBON_DIOXIDE,
|
||||
name="Carbon dioxide",
|
||||
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
|
||||
device_class=SensorDeviceClass.CO2,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
ATTR_PURIFY_VOLUME: XiaomiMiioSensorDescription(
|
||||
key=ATTR_PURIFY_VOLUME,
|
||||
name="Purify volume",
|
||||
translation_key=ATTR_PURIFY_VOLUME,
|
||||
native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
|
||||
device_class=SensorDeviceClass.VOLUME,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
@ -373,7 +367,6 @@ SENSOR_TYPES = {
|
||||
),
|
||||
ATTR_BATTERY: XiaomiMiioSensorDescription(
|
||||
key=ATTR_BATTERY,
|
||||
name="Battery",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -587,7 +580,7 @@ VACUUM_SENSORS = {
|
||||
f"dnd_{ATTR_DND_START}": XiaomiMiioSensorDescription(
|
||||
key=ATTR_DND_START,
|
||||
icon="mdi:minus-circle-off",
|
||||
name="DnD start",
|
||||
translation_key="dnd_start",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
parent_key=VacuumCoordinatorDataAttributes.dnd_status,
|
||||
entity_registry_enabled_default=False,
|
||||
@ -596,7 +589,7 @@ VACUUM_SENSORS = {
|
||||
f"dnd_{ATTR_DND_END}": XiaomiMiioSensorDescription(
|
||||
key=ATTR_DND_END,
|
||||
icon="mdi:minus-circle-off",
|
||||
name="DnD end",
|
||||
translation_key="dnd_end",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
parent_key=VacuumCoordinatorDataAttributes.dnd_status,
|
||||
entity_registry_enabled_default=False,
|
||||
@ -605,7 +598,7 @@ VACUUM_SENSORS = {
|
||||
f"last_clean_{ATTR_LAST_CLEAN_START}": XiaomiMiioSensorDescription(
|
||||
key=ATTR_LAST_CLEAN_START,
|
||||
icon="mdi:clock-time-twelve",
|
||||
name="Last clean start",
|
||||
translation_key="last_clean_start",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
parent_key=VacuumCoordinatorDataAttributes.last_clean_details,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
@ -615,7 +608,7 @@ VACUUM_SENSORS = {
|
||||
icon="mdi:clock-time-twelve",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
parent_key=VacuumCoordinatorDataAttributes.last_clean_details,
|
||||
name="Last clean end",
|
||||
translation_key="last_clean_end",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
f"last_clean_{ATTR_LAST_CLEAN_TIME}": XiaomiMiioSensorDescription(
|
||||
@ -624,7 +617,7 @@ VACUUM_SENSORS = {
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
key=ATTR_LAST_CLEAN_TIME,
|
||||
parent_key=VacuumCoordinatorDataAttributes.last_clean_details,
|
||||
name="Last clean duration",
|
||||
translation_key=ATTR_LAST_CLEAN_TIME,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
f"last_clean_{ATTR_LAST_CLEAN_AREA}": XiaomiMiioSensorDescription(
|
||||
@ -632,7 +625,7 @@ VACUUM_SENSORS = {
|
||||
icon="mdi:texture-box",
|
||||
key=ATTR_LAST_CLEAN_AREA,
|
||||
parent_key=VacuumCoordinatorDataAttributes.last_clean_details,
|
||||
name="Last clean area",
|
||||
translation_key=ATTR_LAST_CLEAN_AREA,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
f"current_{ATTR_STATUS_CLEAN_TIME}": XiaomiMiioSensorDescription(
|
||||
@ -641,7 +634,7 @@ VACUUM_SENSORS = {
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
key=ATTR_STATUS_CLEAN_TIME,
|
||||
parent_key=VacuumCoordinatorDataAttributes.status,
|
||||
name="Current clean duration",
|
||||
translation_key=ATTR_STATUS_CLEAN_TIME,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
f"current_{ATTR_LAST_CLEAN_AREA}": XiaomiMiioSensorDescription(
|
||||
@ -650,7 +643,7 @@ VACUUM_SENSORS = {
|
||||
key=ATTR_STATUS_CLEAN_AREA,
|
||||
parent_key=VacuumCoordinatorDataAttributes.status,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
name="Current clean area",
|
||||
translation_key=ATTR_STATUS_CLEAN_AREA,
|
||||
),
|
||||
f"clean_history_{ATTR_CLEAN_HISTORY_TOTAL_DURATION}": XiaomiMiioSensorDescription(
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
@ -658,7 +651,7 @@ VACUUM_SENSORS = {
|
||||
icon="mdi:timer-sand",
|
||||
key=ATTR_CLEAN_HISTORY_TOTAL_DURATION,
|
||||
parent_key=VacuumCoordinatorDataAttributes.clean_history_status,
|
||||
name="Total duration",
|
||||
translation_key=ATTR_CLEAN_HISTORY_TOTAL_DURATION,
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
@ -667,7 +660,7 @@ VACUUM_SENSORS = {
|
||||
icon="mdi:texture-box",
|
||||
key=ATTR_CLEAN_HISTORY_TOTAL_AREA,
|
||||
parent_key=VacuumCoordinatorDataAttributes.clean_history_status,
|
||||
name="Total clean area",
|
||||
translation_key=ATTR_CLEAN_HISTORY_TOTAL_AREA,
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
@ -677,7 +670,7 @@ VACUUM_SENSORS = {
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
key=ATTR_CLEAN_HISTORY_COUNT,
|
||||
parent_key=VacuumCoordinatorDataAttributes.clean_history_status,
|
||||
name="Total clean count",
|
||||
translation_key=ATTR_CLEAN_HISTORY_COUNT,
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
@ -687,7 +680,7 @@ VACUUM_SENSORS = {
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
key=ATTR_CLEAN_HISTORY_DUST_COLLECTION_COUNT,
|
||||
parent_key=VacuumCoordinatorDataAttributes.clean_history_status,
|
||||
name="Total dust collection count",
|
||||
translation_key=ATTR_CLEAN_HISTORY_DUST_COLLECTION_COUNT,
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
@ -697,7 +690,7 @@ VACUUM_SENSORS = {
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
key=ATTR_CONSUMABLE_STATUS_MAIN_BRUSH_LEFT,
|
||||
parent_key=VacuumCoordinatorDataAttributes.consumable_status,
|
||||
name="Main brush left",
|
||||
translation_key=ATTR_CONSUMABLE_STATUS_MAIN_BRUSH_LEFT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
f"consumable_{ATTR_CONSUMABLE_STATUS_SIDE_BRUSH_LEFT}": XiaomiMiioSensorDescription(
|
||||
@ -706,7 +699,7 @@ VACUUM_SENSORS = {
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
key=ATTR_CONSUMABLE_STATUS_SIDE_BRUSH_LEFT,
|
||||
parent_key=VacuumCoordinatorDataAttributes.consumable_status,
|
||||
name="Side brush left",
|
||||
translation_key=ATTR_CONSUMABLE_STATUS_SIDE_BRUSH_LEFT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
f"consumable_{ATTR_CONSUMABLE_STATUS_FILTER_LEFT}": XiaomiMiioSensorDescription(
|
||||
@ -715,7 +708,7 @@ VACUUM_SENSORS = {
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
key=ATTR_CONSUMABLE_STATUS_FILTER_LEFT,
|
||||
parent_key=VacuumCoordinatorDataAttributes.consumable_status,
|
||||
name="Filter left",
|
||||
translation_key=ATTR_CONSUMABLE_STATUS_FILTER_LEFT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
f"consumable_{ATTR_CONSUMABLE_STATUS_SENSOR_DIRTY_LEFT}": XiaomiMiioSensorDescription(
|
||||
@ -724,7 +717,7 @@ VACUUM_SENSORS = {
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
key=ATTR_CONSUMABLE_STATUS_SENSOR_DIRTY_LEFT,
|
||||
parent_key=VacuumCoordinatorDataAttributes.consumable_status,
|
||||
name="Sensor dirty left",
|
||||
translation_key=ATTR_CONSUMABLE_STATUS_SENSOR_DIRTY_LEFT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
}
|
||||
|
@ -105,6 +105,223 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"binary_sensor": {
|
||||
"no_water": {
|
||||
"name": "Water tank empty"
|
||||
},
|
||||
"water_tank_detached": {
|
||||
"name": "Water tank"
|
||||
},
|
||||
"ptc_status": {
|
||||
"name": "Auxiliary heat status"
|
||||
},
|
||||
"powersupply_attached": {
|
||||
"name": "Power supply"
|
||||
},
|
||||
"is_water_box_attached": {
|
||||
"name": "Mop attached"
|
||||
},
|
||||
"is_water_shortage": {
|
||||
"name": "Water shortage"
|
||||
},
|
||||
"is_water_box_carriage_attached": {
|
||||
"name": "[%key:component::xiaomi_miio::entity::binary_sensor::is_water_box_attached::name%]"
|
||||
}
|
||||
},
|
||||
"button": {
|
||||
"reset_dust_filter": {
|
||||
"name": "Reset dust filter"
|
||||
},
|
||||
"reset_upper_filter": {
|
||||
"name": "Reset upper filter"
|
||||
},
|
||||
"reset_vacuum_main_brush": {
|
||||
"name": "Reset main brush"
|
||||
},
|
||||
"reset_vacuum_side_brush": {
|
||||
"name": "Reset side brush"
|
||||
},
|
||||
"reset_vacuum_filter": {
|
||||
"name": "Reset filter"
|
||||
},
|
||||
"reset_vacuum_sensor_dirty": {
|
||||
"name": "Reset sensor dirty"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"motor_speed": {
|
||||
"name": "Motor speed"
|
||||
},
|
||||
"favorite_level": {
|
||||
"name": "Favorite level"
|
||||
},
|
||||
"fan_level": {
|
||||
"name": "Fan level"
|
||||
},
|
||||
"volume": {
|
||||
"name": "Volume"
|
||||
},
|
||||
"angle": {
|
||||
"name": "Oscillation angle"
|
||||
},
|
||||
"delay_off_countdown": {
|
||||
"name": "Delay off countdown"
|
||||
},
|
||||
"led_brightness": {
|
||||
"name": "LED brightness"
|
||||
},
|
||||
"led_brightness_level": {
|
||||
"name": "LED brightness"
|
||||
},
|
||||
"favorite_rpm": {
|
||||
"name": "Favorite motor speed"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"load_power": {
|
||||
"name": "Load power"
|
||||
},
|
||||
"water_level": {
|
||||
"name": "Water level"
|
||||
},
|
||||
"actual_speed": {
|
||||
"name": "Actual speed"
|
||||
},
|
||||
"control_speed": {
|
||||
"name": "Control speed"
|
||||
},
|
||||
"favorite_speed": {
|
||||
"name": "Favorite speed"
|
||||
},
|
||||
"motor_speed": {
|
||||
"name": "[%key:component::xiaomi_miio::entity::number::motor_speed::name%]"
|
||||
},
|
||||
"motor2_speed": {
|
||||
"name": "Second motor speed"
|
||||
},
|
||||
"use_time": {
|
||||
"name": "Use time"
|
||||
},
|
||||
"illuminance": {
|
||||
"name": "[%key:component::sensor::entity_component::illuminance::name%]"
|
||||
},
|
||||
"air_quality": {
|
||||
"name": "Air quality"
|
||||
},
|
||||
"tvoc": {
|
||||
"name": "TVOC"
|
||||
},
|
||||
"air_quality_index": {
|
||||
"name": "Air quality index"
|
||||
},
|
||||
"filter_life_remaining": {
|
||||
"name": "Filter lifetime remaining"
|
||||
},
|
||||
"filter_hours_used": {
|
||||
"name": "Filter use"
|
||||
},
|
||||
"filter_left_time": {
|
||||
"name": "Filter lifetime left"
|
||||
},
|
||||
"dust_filter_life_remaining": {
|
||||
"name": "Dust filter lifetime remaining"
|
||||
},
|
||||
"dust_filter_life_remaining_days": {
|
||||
"name": "Dust filter lifetime remaining days"
|
||||
},
|
||||
"upper_filter_life_remaining": {
|
||||
"name": "Upper filter lifetime remaining"
|
||||
},
|
||||
"upper_filter_life_remaining_days": {
|
||||
"name": "Upper filter lifetime remaining days"
|
||||
},
|
||||
"purify_volume": {
|
||||
"name": "Purify volume"
|
||||
},
|
||||
"dnd_start": {
|
||||
"name": "DnD start"
|
||||
},
|
||||
"dnd_end": {
|
||||
"name": "DnD end"
|
||||
},
|
||||
"last_clean_start": {
|
||||
"name": "Last clean start"
|
||||
},
|
||||
"last_clean_end": {
|
||||
"name": "Last clean end"
|
||||
},
|
||||
"duration": {
|
||||
"name": "Last clean duration"
|
||||
},
|
||||
"area": {
|
||||
"name": "Last clean area"
|
||||
},
|
||||
"clean_time": {
|
||||
"name": "Current clean duration"
|
||||
},
|
||||
"clean_area": {
|
||||
"name": "Current clean area"
|
||||
},
|
||||
"total_duration": {
|
||||
"name": "Total duration"
|
||||
},
|
||||
"total_area": {
|
||||
"name": "Total clean area"
|
||||
},
|
||||
"count": {
|
||||
"name": "Total clean count"
|
||||
},
|
||||
"dust_collection_count": {
|
||||
"name": "Total dust collection count"
|
||||
},
|
||||
"main_brush_left": {
|
||||
"name": "Main brush left"
|
||||
},
|
||||
"side_brush_left": {
|
||||
"name": "Side brush left"
|
||||
},
|
||||
"filter_left": {
|
||||
"name": "Filter left"
|
||||
},
|
||||
"sensor_dirty_left": {
|
||||
"name": "Sensor dirty left"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"buzzer": {
|
||||
"name": "Buzzer"
|
||||
},
|
||||
"child_lock": {
|
||||
"name": "Child lock"
|
||||
},
|
||||
"display": {
|
||||
"name": "Display"
|
||||
},
|
||||
"dry": {
|
||||
"name": "Dry mode"
|
||||
},
|
||||
"clean_mode": {
|
||||
"name": "Clean mode"
|
||||
},
|
||||
"led": {
|
||||
"name": "LED"
|
||||
},
|
||||
"learn_mode": {
|
||||
"name": "Learn mode"
|
||||
},
|
||||
"auto_detect": {
|
||||
"name": "Auto detect"
|
||||
},
|
||||
"ionizer": {
|
||||
"name": "Ionizer"
|
||||
},
|
||||
"anion": {
|
||||
"name": "[%key:component::xiaomi_miio::entity::switch::ionizer::name%]"
|
||||
},
|
||||
"ptc": {
|
||||
"name": "Auxiliary heat"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
|
@ -236,7 +236,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_BUZZER,
|
||||
feature=FEATURE_SET_BUZZER,
|
||||
name="Buzzer",
|
||||
translation_key=ATTR_BUZZER,
|
||||
icon="mdi:volume-high",
|
||||
method_on="async_set_buzzer_on",
|
||||
method_off="async_set_buzzer_off",
|
||||
@ -245,7 +245,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_CHILD_LOCK,
|
||||
feature=FEATURE_SET_CHILD_LOCK,
|
||||
name="Child lock",
|
||||
translation_key=ATTR_CHILD_LOCK,
|
||||
icon="mdi:lock",
|
||||
method_on="async_set_child_lock_on",
|
||||
method_off="async_set_child_lock_off",
|
||||
@ -254,7 +254,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_DISPLAY,
|
||||
feature=FEATURE_SET_DISPLAY,
|
||||
name="Display",
|
||||
translation_key=ATTR_DISPLAY,
|
||||
icon="mdi:led-outline",
|
||||
method_on="async_set_display_on",
|
||||
method_off="async_set_display_off",
|
||||
@ -263,7 +263,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_DRY,
|
||||
feature=FEATURE_SET_DRY,
|
||||
name="Dry mode",
|
||||
translation_key=ATTR_DRY,
|
||||
icon="mdi:hair-dryer",
|
||||
method_on="async_set_dry_on",
|
||||
method_off="async_set_dry_off",
|
||||
@ -272,7 +272,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_CLEAN,
|
||||
feature=FEATURE_SET_CLEAN,
|
||||
name="Clean mode",
|
||||
translation_key=ATTR_CLEAN,
|
||||
icon="mdi:shimmer",
|
||||
method_on="async_set_clean_on",
|
||||
method_off="async_set_clean_off",
|
||||
@ -282,7 +282,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_LED,
|
||||
feature=FEATURE_SET_LED,
|
||||
name="LED",
|
||||
translation_key=ATTR_LED,
|
||||
icon="mdi:led-outline",
|
||||
method_on="async_set_led_on",
|
||||
method_off="async_set_led_off",
|
||||
@ -291,7 +291,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_LEARN_MODE,
|
||||
feature=FEATURE_SET_LEARN_MODE,
|
||||
name="Learn mode",
|
||||
translation_key=ATTR_LEARN_MODE,
|
||||
icon="mdi:school-outline",
|
||||
method_on="async_set_learn_mode_on",
|
||||
method_off="async_set_learn_mode_off",
|
||||
@ -300,7 +300,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_AUTO_DETECT,
|
||||
feature=FEATURE_SET_AUTO_DETECT,
|
||||
name="Auto detect",
|
||||
translation_key=ATTR_AUTO_DETECT,
|
||||
method_on="async_set_auto_detect_on",
|
||||
method_off="async_set_auto_detect_off",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
@ -308,7 +308,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_IONIZER,
|
||||
feature=FEATURE_SET_IONIZER,
|
||||
name="Ionizer",
|
||||
translation_key=ATTR_IONIZER,
|
||||
icon="mdi:shimmer",
|
||||
method_on="async_set_ionizer_on",
|
||||
method_off="async_set_ionizer_off",
|
||||
@ -317,7 +317,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_ANION,
|
||||
feature=FEATURE_SET_ANION,
|
||||
name="Ionizer",
|
||||
translation_key=ATTR_ANION,
|
||||
icon="mdi:shimmer",
|
||||
method_on="async_set_anion_on",
|
||||
method_off="async_set_anion_off",
|
||||
@ -326,7 +326,7 @@ SWITCH_TYPES = (
|
||||
XiaomiMiioSwitchDescription(
|
||||
key=ATTR_PTC,
|
||||
feature=FEATURE_SET_PTC,
|
||||
name="Auxiliary heat",
|
||||
translation_key=ATTR_PTC,
|
||||
icon="mdi:radiator",
|
||||
method_on="async_set_ptc_on",
|
||||
method_off="async_set_ptc_off",
|
||||
|
Loading…
x
Reference in New Issue
Block a user