diff --git a/homeassistant/components/tuya/binary_sensor.py b/homeassistant/components/tuya/binary_sensor.py index a392a338aba..c57a37365ed 100644 --- a/homeassistant/components/tuya/binary_sensor.py +++ b/homeassistant/components/tuya/binary_sensor.py @@ -51,68 +51,64 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = { "dgnbj": ( TuyaBinarySensorEntityDescription( key=DPCode.GAS_SENSOR_STATE, - name="Gas", icon="mdi:gas-cylinder", device_class=BinarySensorDeviceClass.GAS, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.CH4_SENSOR_STATE, - name="Methane", + translation_key="methane", device_class=BinarySensorDeviceClass.GAS, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.VOC_STATE, - name="Volatile organic compound", + translation_key="voc", device_class=BinarySensorDeviceClass.SAFETY, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.PM25_STATE, - name="Particulate matter 2.5 µm", + translation_key="pm25", device_class=BinarySensorDeviceClass.SAFETY, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.CO_STATE, - name="Carbon monoxide", + translation_key="carbon_monoxide", icon="mdi:molecule-co", device_class=BinarySensorDeviceClass.SAFETY, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.CO2_STATE, + translation_key="carbon_dioxide", icon="mdi:molecule-co2", - name="Carbon dioxide", device_class=BinarySensorDeviceClass.SAFETY, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.CH2O_STATE, - name="Formaldehyde", + translation_key="formaldehyde", device_class=BinarySensorDeviceClass.SAFETY, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.DOORCONTACT_STATE, - name="Door", device_class=BinarySensorDeviceClass.DOOR, ), TuyaBinarySensorEntityDescription( key=DPCode.WATERSENSOR_STATE, - name="Water leak", device_class=BinarySensorDeviceClass.MOISTURE, on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.PRESSURE_STATE, - name="Pressure", + translation_key="pressure", on_value="alarm", ), TuyaBinarySensorEntityDescription( key=DPCode.SMOKE_SENSOR_STATE, - name="Smoke", icon="mdi:smoke-detector", device_class=BinarySensorDeviceClass.SMOKE, on_value="alarm", @@ -149,7 +145,7 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = { "cwwsq": ( TuyaBinarySensorEntityDescription( key=DPCode.FEED_STATE, - name="Feeding", + translation_key="feeding", icon="mdi:information", on_value="feeding", ), @@ -215,7 +211,6 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = { "ldcg": ( TuyaBinarySensorEntityDescription( key=DPCode.TEMPER_ALARM, - name="Tamper", device_class=BinarySensorDeviceClass.TAMPER, entity_category=EntityCategory.DIAGNOSTIC, ), @@ -290,7 +285,6 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = { "wkf": ( TuyaBinarySensorEntityDescription( key=DPCode.WINDOW_STATE, - name="Window", device_class=BinarySensorDeviceClass.WINDOW, on_value="opened", ), @@ -328,21 +322,20 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = { TuyaBinarySensorEntityDescription( key=f"{DPCode.SHOCK_STATE}_vibration", dpcode=DPCode.SHOCK_STATE, - name="Vibration", device_class=BinarySensorDeviceClass.VIBRATION, on_value="vibration", ), TuyaBinarySensorEntityDescription( key=f"{DPCode.SHOCK_STATE}_drop", dpcode=DPCode.SHOCK_STATE, - name="Drop", + translation_key="drop", icon="mdi:icon=package-down", on_value="drop", ), TuyaBinarySensorEntityDescription( key=f"{DPCode.SHOCK_STATE}_tilt", dpcode=DPCode.SHOCK_STATE, - name="Tilt", + translation_key="tilt", icon="mdi:spirit-level", on_value="tilt", ), diff --git a/homeassistant/components/tuya/button.py b/homeassistant/components/tuya/button.py index 64d405ee5ad..4c73b70c29a 100644 --- a/homeassistant/components/tuya/button.py +++ b/homeassistant/components/tuya/button.py @@ -22,31 +22,31 @@ BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = { "sd": ( ButtonEntityDescription( key=DPCode.RESET_DUSTER_CLOTH, - name="Reset duster cloth", + translation_key="reset_duster_cloth", icon="mdi:restart", entity_category=EntityCategory.CONFIG, ), ButtonEntityDescription( key=DPCode.RESET_EDGE_BRUSH, - name="Reset edge brush", + translation_key="reset_edge_brush", icon="mdi:restart", entity_category=EntityCategory.CONFIG, ), ButtonEntityDescription( key=DPCode.RESET_FILTER, - name="Reset filter", + translation_key="reset_filter", icon="mdi:air-filter", entity_category=EntityCategory.CONFIG, ), ButtonEntityDescription( key=DPCode.RESET_MAP, - name="Reset map", + translation_key="reset_map", icon="mdi:map-marker-remove", entity_category=EntityCategory.CONFIG, ), ButtonEntityDescription( key=DPCode.RESET_ROLL_BRUSH, - name="Reset roll brush", + translation_key="reset_roll_brush", icon="mdi:restart", entity_category=EntityCategory.CONFIG, ), @@ -56,7 +56,7 @@ BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = { "hxd": ( ButtonEntityDescription( key=DPCode.SWITCH_USB6, - name="Snooze", + translation_key="snooze", icon="mdi:sleep", ), ), diff --git a/homeassistant/components/tuya/cover.py b/homeassistant/components/tuya/cover.py index 5bb9c794ca4..3505bbf9f22 100644 --- a/homeassistant/components/tuya/cover.py +++ b/homeassistant/components/tuya/cover.py @@ -44,7 +44,6 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = { "cl": ( TuyaCoverEntityDescription( key=DPCode.CONTROL, - name="Curtain", current_state=DPCode.SITUATION_SET, current_position=(DPCode.PERCENT_CONTROL, DPCode.PERCENT_STATE), set_position=DPCode.PERCENT_CONTROL, @@ -52,21 +51,20 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = { ), TuyaCoverEntityDescription( key=DPCode.CONTROL_2, - name="Curtain 2", + translation_key="curtain_2", current_position=DPCode.PERCENT_STATE_2, set_position=DPCode.PERCENT_CONTROL_2, device_class=CoverDeviceClass.CURTAIN, ), TuyaCoverEntityDescription( key=DPCode.CONTROL_3, - name="Curtain 3", + translation_key="curtain_3", current_position=DPCode.PERCENT_STATE_3, set_position=DPCode.PERCENT_CONTROL_3, device_class=CoverDeviceClass.CURTAIN, ), TuyaCoverEntityDescription( key=DPCode.MACH_OPERATE, - name="Curtain", current_position=DPCode.POSITION, set_position=DPCode.POSITION, device_class=CoverDeviceClass.CURTAIN, @@ -78,7 +76,6 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = { # It is used by the Kogan Smart Blinds Driver TuyaCoverEntityDescription( key=DPCode.SWITCH_1, - name="Blind", current_position=DPCode.PERCENT_CONTROL, set_position=DPCode.PERCENT_CONTROL, device_class=CoverDeviceClass.BLIND, @@ -89,21 +86,21 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = { "ckmkzq": ( TuyaCoverEntityDescription( key=DPCode.SWITCH_1, - name="Door", + translation_key="door", current_state=DPCode.DOORCONTACT_STATE, current_state_inverse=True, device_class=CoverDeviceClass.GARAGE, ), TuyaCoverEntityDescription( key=DPCode.SWITCH_2, - name="Door 2", + translation_key="door_2", current_state=DPCode.DOORCONTACT_STATE_2, current_state_inverse=True, device_class=CoverDeviceClass.GARAGE, ), TuyaCoverEntityDescription( key=DPCode.SWITCH_3, - name="Door 3", + translation_key="door_3", current_state=DPCode.DOORCONTACT_STATE_3, current_state_inverse=True, device_class=CoverDeviceClass.GARAGE, @@ -114,14 +111,13 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = { "clkg": ( TuyaCoverEntityDescription( key=DPCode.CONTROL, - name="Curtain", current_position=DPCode.PERCENT_CONTROL, set_position=DPCode.PERCENT_CONTROL, device_class=CoverDeviceClass.CURTAIN, ), TuyaCoverEntityDescription( key=DPCode.CONTROL_2, - name="Curtain 2", + translation_key="curtain_2", current_position=DPCode.PERCENT_CONTROL_2, set_position=DPCode.PERCENT_CONTROL_2, device_class=CoverDeviceClass.CURTAIN, diff --git a/homeassistant/components/tuya/light.py b/homeassistant/components/tuya/light.py index 3ab4c3568c4..5c2663d251c 100644 --- a/homeassistant/components/tuya/light.py +++ b/homeassistant/components/tuya/light.py @@ -70,7 +70,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "clkg": ( TuyaLightEntityDescription( key=DPCode.SWITCH_BACKLIGHT, - name="Backlight", + translation_key="backlight", entity_category=EntityCategory.CONFIG, ), ), @@ -114,7 +114,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { # Based on multiple reports: manufacturer customized Dimmer 2 switches TuyaLightEntityDescription( key=DPCode.SWITCH_1, - name="Light", + translation_key="light", brightness=DPCode.BRIGHT_VALUE_1, ), ), @@ -175,7 +175,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "kg": ( TuyaLightEntityDescription( key=DPCode.SWITCH_BACKLIGHT, - name="Backlight", + translation_key="backlight", entity_category=EntityCategory.CONFIG, ), ), @@ -184,7 +184,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "kj": ( TuyaLightEntityDescription( key=DPCode.LIGHT, - name="Backlight", + translation_key="backlight", entity_category=EntityCategory.CONFIG, ), ), @@ -193,7 +193,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "kt": ( TuyaLightEntityDescription( key=DPCode.LIGHT, - name="Backlight", + translation_key="backlight", entity_category=EntityCategory.CONFIG, ), ), @@ -226,7 +226,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "qn": ( TuyaLightEntityDescription( key=DPCode.LIGHT, - name="Backlight", + translation_key="backlight", entity_category=EntityCategory.CONFIG, ), ), @@ -249,21 +249,21 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "tgkg": ( TuyaLightEntityDescription( key=DPCode.SWITCH_LED_1, - name="Light", + translation_key="light", brightness=DPCode.BRIGHT_VALUE_1, brightness_max=DPCode.BRIGHTNESS_MAX_1, brightness_min=DPCode.BRIGHTNESS_MIN_1, ), TuyaLightEntityDescription( key=DPCode.SWITCH_LED_2, - name="Light 2", + translation_key="light_2", brightness=DPCode.BRIGHT_VALUE_2, brightness_max=DPCode.BRIGHTNESS_MAX_2, brightness_min=DPCode.BRIGHTNESS_MIN_2, ), TuyaLightEntityDescription( key=DPCode.SWITCH_LED_3, - name="Light 3", + translation_key="light_3", brightness=DPCode.BRIGHT_VALUE_3, brightness_max=DPCode.BRIGHTNESS_MAX_3, brightness_min=DPCode.BRIGHTNESS_MIN_3, @@ -274,19 +274,19 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "tgq": ( TuyaLightEntityDescription( key=DPCode.SWITCH_LED, - name="Light", + translation_key="light", brightness=(DPCode.BRIGHT_VALUE_V2, DPCode.BRIGHT_VALUE), brightness_max=DPCode.BRIGHTNESS_MAX_1, brightness_min=DPCode.BRIGHTNESS_MIN_1, ), TuyaLightEntityDescription( key=DPCode.SWITCH_LED_1, - name="Light", + translation_key="light", brightness=DPCode.BRIGHT_VALUE_1, ), TuyaLightEntityDescription( key=DPCode.SWITCH_LED_2, - name="Light 2", + translation_key="light_2", brightness=DPCode.BRIGHT_VALUE_2, ), ), @@ -295,7 +295,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { "hxd": ( TuyaLightEntityDescription( key=DPCode.SWITCH_LED, - name="Light", + translation_key="light", brightness=(DPCode.BRIGHT_VALUE_V2, DPCode.BRIGHT_VALUE), brightness_max=DPCode.BRIGHTNESS_MAX_1, brightness_min=DPCode.BRIGHTNESS_MIN_1, @@ -326,7 +326,7 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = { ), TuyaLightEntityDescription( key=DPCode.SWITCH_NIGHT_LIGHT, - name="Night light", + translation_key="night_light", ), ), # Remote Control diff --git a/homeassistant/components/tuya/number.py b/homeassistant/components/tuya/number.py index 4430172e9a7..5e7bdcc260a 100644 --- a/homeassistant/components/tuya/number.py +++ b/homeassistant/components/tuya/number.py @@ -27,7 +27,7 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "dgnbj": ( NumberEntityDescription( key=DPCode.ALARM_TIME, - name="Time", + translation_key="time", entity_category=EntityCategory.CONFIG, ), ), @@ -36,35 +36,35 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "bh": ( NumberEntityDescription( key=DPCode.TEMP_SET, - name="Temperature", + translation_key="temperature", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.TEMP_SET_F, - name="Temperature", + translation_key="temperature", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.TEMP_BOILING_C, - name="Temperature after boiling", + translation_key="temperature_after_boiling", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.TEMP_BOILING_F, - name="Temperature after boiling", + translation_key="temperature_after_boiling", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.WARM_TIME, - name="Heat preservation time", + translation_key="heat_preservation_time", icon="mdi:timer", entity_category=EntityCategory.CONFIG, ), @@ -74,12 +74,12 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "cwwsq": ( NumberEntityDescription( key=DPCode.MANUAL_FEED, - name="Feed", + translation_key="feed", icon="mdi:bowl", ), NumberEntityDescription( key=DPCode.VOICE_TIMES, - name="Voice times", + translation_key="voice_times", icon="mdi:microphone", ), ), @@ -88,18 +88,18 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "hps": ( NumberEntityDescription( key=DPCode.SENSITIVITY, - name="Sensitivity", + translation_key="sensitivity", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.NEAR_DETECTION, - name="Near detection", + translation_key="near_detection", icon="mdi:signal-distance-variant", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.FAR_DETECTION, - name="Far detection", + translation_key="far_detection", icon="mdi:signal-distance-variant", entity_category=EntityCategory.CONFIG, ), @@ -109,26 +109,26 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "kfj": ( NumberEntityDescription( key=DPCode.WATER_SET, - name="Water level", + translation_key="water_level", icon="mdi:cup-water", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.TEMP_SET, - name="Temperature", + translation_key="temperature", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.WARM_TIME, - name="Heat preservation time", + translation_key="heat_preservation_time", icon="mdi:timer", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.POWDER_SET, - name="Powder", + translation_key="powder", entity_category=EntityCategory.CONFIG, ), ), @@ -137,20 +137,20 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "mzj": ( NumberEntityDescription( key=DPCode.COOK_TEMPERATURE, - name="Cook temperature", + translation_key="cook_temperature", icon="mdi:thermometer", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.COOK_TIME, - name="Cook time", + translation_key="cook_time", icon="mdi:timer", native_unit_of_measurement=UnitOfTime.MINUTES, entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.CLOUD_RECIPE_NUMBER, - name="Cloud recipe", + translation_key="cloud_recipe", entity_category=EntityCategory.CONFIG, ), ), @@ -159,7 +159,7 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "sd": ( NumberEntityDescription( key=DPCode.VOLUME_SET, - name="Volume", + translation_key="volume", icon="mdi:volume-high", entity_category=EntityCategory.CONFIG, ), @@ -169,7 +169,7 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "sgbj": ( NumberEntityDescription( key=DPCode.ALARM_TIME, - name="Time", + translation_key="time", entity_category=EntityCategory.CONFIG, ), ), @@ -178,7 +178,7 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "sp": ( NumberEntityDescription( key=DPCode.BASIC_DEVICE_VOLUME, - name="Volume", + translation_key="volume", icon="mdi:volume-high", entity_category=EntityCategory.CONFIG, ), @@ -188,37 +188,37 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "tgkg": ( NumberEntityDescription( key=DPCode.BRIGHTNESS_MIN_1, - name="Minimum brightness", + translation_key="minimum_brightness", icon="mdi:lightbulb-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MAX_1, - name="Maximum brightness", + translation_key="maximum_brightness", icon="mdi:lightbulb-on-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MIN_2, - name="Minimum brightness 2", + translation_key="minimum_brightness_2", icon="mdi:lightbulb-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MAX_2, - name="Maximum brightness 2", + translation_key="maximum_brightness_2", icon="mdi:lightbulb-on-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MIN_3, - name="Minimum brightness 3", + translation_key="minimum_brightness_3", icon="mdi:lightbulb-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MAX_3, - name="Maximum brightness 3", + translation_key="maximum_brightness_3", icon="mdi:lightbulb-on-outline", entity_category=EntityCategory.CONFIG, ), @@ -228,25 +228,25 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "tgq": ( NumberEntityDescription( key=DPCode.BRIGHTNESS_MIN_1, - name="Minimum brightness", + translation_key="minimum_brightness", icon="mdi:lightbulb-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MAX_1, - name="Maximum brightness", + translation_key="maximum_brightness", icon="mdi:lightbulb-on-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MIN_2, - name="Minimum brightness 2", + translation_key="minimum_brightness_2", icon="mdi:lightbulb-outline", entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.BRIGHTNESS_MAX_2, - name="Maximum brightness 2", + translation_key="maximum_brightness_2", icon="mdi:lightbulb-on-outline", entity_category=EntityCategory.CONFIG, ), @@ -256,7 +256,7 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "zd": ( NumberEntityDescription( key=DPCode.SENSITIVITY, - name="Sensitivity", + translation_key="sensitivity", entity_category=EntityCategory.CONFIG, ), ), @@ -264,21 +264,21 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "szjqr": ( NumberEntityDescription( key=DPCode.ARM_DOWN_PERCENT, - name="Move down", + translation_key="move_down", icon="mdi:arrow-down-bold", native_unit_of_measurement=PERCENTAGE, entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.ARM_UP_PERCENT, - name="Move up", + translation_key="move_up", icon="mdi:arrow-up-bold", native_unit_of_measurement=PERCENTAGE, entity_category=EntityCategory.CONFIG, ), NumberEntityDescription( key=DPCode.CLICK_SUSTAIN_TIME, - name="Down delay", + translation_key="down_delay", icon="mdi:timer", entity_category=EntityCategory.CONFIG, ), @@ -288,7 +288,7 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "fs": ( NumberEntityDescription( key=DPCode.TEMP, - name="Temperature", + translation_key="temperature", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer-lines", ), @@ -298,13 +298,13 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = { "jsq": ( NumberEntityDescription( key=DPCode.TEMP_SET, - name="Temperature", + translation_key="temperature", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer-lines", ), NumberEntityDescription( key=DPCode.TEMP_SET_F, - name="Temperature", + translation_key="temperature", device_class=NumberDeviceClass.TEMPERATURE, icon="mdi:thermometer-lines", ), diff --git a/homeassistant/components/tuya/scene.py b/homeassistant/components/tuya/scene.py index dadc64f9846..90cf4266ae6 100644 --- a/homeassistant/components/tuya/scene.py +++ b/homeassistant/components/tuya/scene.py @@ -30,6 +30,8 @@ class TuyaSceneEntity(Scene): """Tuya Scene Remote.""" _should_poll = False + _attr_has_entity_name = True + _attr_name = None def __init__(self, home_manager: TuyaHomeManager, scene: TuyaScene) -> None: """Init Tuya Scene.""" @@ -38,11 +40,6 @@ class TuyaSceneEntity(Scene): self.home_manager = home_manager self.scene = scene - @property - def name(self) -> str | None: - """Return Tuya scene name.""" - return self.scene.name - @property def device_info(self) -> DeviceInfo: """Return a device description for device registry.""" diff --git a/homeassistant/components/tuya/select.py b/homeassistant/components/tuya/select.py index b84737f7360..3cc8c72f555 100644 --- a/homeassistant/components/tuya/select.py +++ b/homeassistant/components/tuya/select.py @@ -23,7 +23,7 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "dgnbj": ( SelectEntityDescription( key=DPCode.ALARM_VOLUME, - name="Volume", + translation_key="volume", entity_category=EntityCategory.CONFIG, ), ), @@ -32,23 +32,23 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "kfj": ( SelectEntityDescription( key=DPCode.CUP_NUMBER, - name="Cups", + translation_key="cups", icon="mdi:numeric", ), SelectEntityDescription( key=DPCode.CONCENTRATION_SET, - name="Concentration", + translation_key="concentration", icon="mdi:altimeter", entity_category=EntityCategory.CONFIG, ), SelectEntityDescription( key=DPCode.MATERIAL, - name="Material", + translation_key="material", entity_category=EntityCategory.CONFIG, ), SelectEntityDescription( key=DPCode.MODE, - name="Mode", + translation_key="mode", icon="mdi:coffee", ), ), @@ -57,13 +57,11 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "kg": ( SelectEntityDescription( key=DPCode.RELAY_STATUS, - name="Power on behavior", entity_category=EntityCategory.CONFIG, translation_key="relay_status", ), SelectEntityDescription( key=DPCode.LIGHT_MODE, - name="Indicator light mode", entity_category=EntityCategory.CONFIG, translation_key="light_mode", ), @@ -73,7 +71,7 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "qn": ( SelectEntityDescription( key=DPCode.LEVEL, - name="Temperature level", + translation_key="temperature_level", icon="mdi:thermometer-lines", ), ), @@ -82,12 +80,12 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "sgbj": ( SelectEntityDescription( key=DPCode.ALARM_VOLUME, - name="Volume", + translation_key="volume", entity_category=EntityCategory.CONFIG, ), SelectEntityDescription( key=DPCode.BRIGHT_STATE, - name="Brightness", + translation_key="brightness", entity_category=EntityCategory.CONFIG, ), ), @@ -96,41 +94,35 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "sp": ( SelectEntityDescription( key=DPCode.IPC_WORK_MODE, - name="IPC mode", entity_category=EntityCategory.CONFIG, translation_key="ipc_work_mode", ), SelectEntityDescription( key=DPCode.DECIBEL_SENSITIVITY, - name="Sound detection densitivity", icon="mdi:volume-vibrate", entity_category=EntityCategory.CONFIG, translation_key="decibel_sensitivity", ), SelectEntityDescription( key=DPCode.RECORD_MODE, - name="Record mode", icon="mdi:record-rec", entity_category=EntityCategory.CONFIG, translation_key="record_mode", ), SelectEntityDescription( key=DPCode.BASIC_NIGHTVISION, - name="Night vision", icon="mdi:theme-light-dark", entity_category=EntityCategory.CONFIG, translation_key="basic_nightvision", ), SelectEntityDescription( key=DPCode.BASIC_ANTI_FLICKER, - name="Anti-flicker", icon="mdi:image-outline", entity_category=EntityCategory.CONFIG, translation_key="basic_anti_flicker", ), SelectEntityDescription( key=DPCode.MOTION_SENSITIVITY, - name="Motion detection sensitivity", icon="mdi:motion-sensor", entity_category=EntityCategory.CONFIG, translation_key="motion_sensitivity", @@ -141,13 +133,11 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "tdq": ( SelectEntityDescription( key=DPCode.RELAY_STATUS, - name="Power on behavior", entity_category=EntityCategory.CONFIG, translation_key="relay_status", ), SelectEntityDescription( key=DPCode.LIGHT_MODE, - name="Indicator light mode", entity_category=EntityCategory.CONFIG, translation_key="light_mode", ), @@ -157,33 +147,28 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "tgkg": ( SelectEntityDescription( key=DPCode.RELAY_STATUS, - name="Power on behavior", entity_category=EntityCategory.CONFIG, translation_key="relay_status", ), SelectEntityDescription( key=DPCode.LIGHT_MODE, - name="Indicator light mode", entity_category=EntityCategory.CONFIG, translation_key="light_mode", ), SelectEntityDescription( key=DPCode.LED_TYPE_1, - name="Light source type", entity_category=EntityCategory.CONFIG, translation_key="led_type", ), SelectEntityDescription( key=DPCode.LED_TYPE_2, - name="Light 2 source type", entity_category=EntityCategory.CONFIG, - translation_key="led_type", + translation_key="led_type_2", ), SelectEntityDescription( key=DPCode.LED_TYPE_3, - name="Light 3 source type", entity_category=EntityCategory.CONFIG, - translation_key="led_type", + translation_key="led_type_3", ), ), # Dimmer @@ -191,22 +176,19 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "tgq": ( SelectEntityDescription( key=DPCode.LED_TYPE_1, - name="Light source type", entity_category=EntityCategory.CONFIG, translation_key="led_type", ), SelectEntityDescription( key=DPCode.LED_TYPE_2, - name="Light 2 source type", entity_category=EntityCategory.CONFIG, - translation_key="led_type", + translation_key="led_type_2", ), ), # Fingerbot "szjqr": ( SelectEntityDescription( key=DPCode.MODE, - name="Mode", entity_category=EntityCategory.CONFIG, translation_key="fingerbot_mode", ), @@ -216,21 +198,18 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "sd": ( SelectEntityDescription( key=DPCode.CISTERN, - name="Water tank adjustment", entity_category=EntityCategory.CONFIG, icon="mdi:water-opacity", translation_key="vacuum_cistern", ), SelectEntityDescription( key=DPCode.COLLECTION_MODE, - name="Dust collection mode", entity_category=EntityCategory.CONFIG, icon="mdi:air-filter", translation_key="vacuum_collection", ), SelectEntityDescription( key=DPCode.MODE, - name="Mode", entity_category=EntityCategory.CONFIG, icon="mdi:layers-outline", translation_key="vacuum_mode", @@ -241,28 +220,24 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "fs": ( SelectEntityDescription( key=DPCode.FAN_VERTICAL, - name="Vertical swing flap angle", entity_category=EntityCategory.CONFIG, icon="mdi:format-vertical-align-center", - translation_key="fan_angle", + translation_key="vertical_fan_angle", ), SelectEntityDescription( key=DPCode.FAN_HORIZONTAL, - name="Horizontal swing flap angle", entity_category=EntityCategory.CONFIG, icon="mdi:format-horizontal-align-center", - translation_key="fan_angle", + translation_key="horizontal_fan_angle", ), SelectEntityDescription( key=DPCode.COUNTDOWN, - name="Countdown", entity_category=EntityCategory.CONFIG, icon="mdi:timer-cog-outline", translation_key="countdown", ), SelectEntityDescription( key=DPCode.COUNTDOWN_SET, - name="Countdown", entity_category=EntityCategory.CONFIG, icon="mdi:timer-cog-outline", translation_key="countdown", @@ -273,14 +248,12 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "cl": ( SelectEntityDescription( key=DPCode.CONTROL_BACK_MODE, - name="Motor mode", entity_category=EntityCategory.CONFIG, icon="mdi:swap-horizontal", translation_key="curtain_motor_mode", ), SelectEntityDescription( key=DPCode.MODE, - name="Mode", entity_category=EntityCategory.CONFIG, translation_key="curtain_mode", ), @@ -290,35 +263,30 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "jsq": ( SelectEntityDescription( key=DPCode.SPRAY_MODE, - name="Spray mode", entity_category=EntityCategory.CONFIG, icon="mdi:spray", translation_key="humidifier_spray_mode", ), SelectEntityDescription( key=DPCode.LEVEL, - name="Spraying level", entity_category=EntityCategory.CONFIG, icon="mdi:spray", translation_key="humidifier_level", ), SelectEntityDescription( key=DPCode.MOODLIGHTING, - name="Moodlighting", entity_category=EntityCategory.CONFIG, icon="mdi:lightbulb-multiple", translation_key="humidifier_moodlighting", ), SelectEntityDescription( key=DPCode.COUNTDOWN, - name="Countdown", entity_category=EntityCategory.CONFIG, icon="mdi:timer-cog-outline", translation_key="countdown", ), SelectEntityDescription( key=DPCode.COUNTDOWN_SET, - name="Countdown", entity_category=EntityCategory.CONFIG, icon="mdi:timer-cog-outline", translation_key="countdown", @@ -329,14 +297,12 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "kj": ( SelectEntityDescription( key=DPCode.COUNTDOWN, - name="Countdown", entity_category=EntityCategory.CONFIG, icon="mdi:timer-cog-outline", translation_key="countdown", ), SelectEntityDescription( key=DPCode.COUNTDOWN_SET, - name="Countdown", entity_category=EntityCategory.CONFIG, icon="mdi:timer-cog-outline", translation_key="countdown", @@ -347,14 +313,13 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = { "cs": ( SelectEntityDescription( key=DPCode.COUNTDOWN_SET, - name="Countdown", entity_category=EntityCategory.CONFIG, icon="mdi:timer-cog-outline", translation_key="countdown", ), SelectEntityDescription( key=DPCode.DEHUMIDITY_SET_ENUM, - name="Target humidity", + translation_key="target_humidity", entity_category=EntityCategory.CONFIG, icon="mdi:water-percent", ), diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index 9483443a19c..1c7c2ab781d 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -49,7 +49,7 @@ class TuyaSensorEntityDescription(SensorEntityDescription): BATTERY_SENSORS: tuple[TuyaSensorEntityDescription, ...] = ( TuyaSensorEntityDescription( key=DPCode.BATTERY_PERCENTAGE, - name="Battery", + translation_key="battery", native_unit_of_measurement=PERCENTAGE, device_class=SensorDeviceClass.BATTERY, state_class=SensorStateClass.MEASUREMENT, @@ -57,20 +57,20 @@ BATTERY_SENSORS: tuple[TuyaSensorEntityDescription, ...] = ( ), TuyaSensorEntityDescription( key=DPCode.BATTERY_STATE, - name="Battery state", + translation_key="battery_state", icon="mdi:battery", entity_category=EntityCategory.DIAGNOSTIC, ), TuyaSensorEntityDescription( key=DPCode.BATTERY_VALUE, - name="Battery", + translation_key="battery", device_class=SensorDeviceClass.BATTERY, entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VA_BATTERY, - name="Battery", + translation_key="battery", device_class=SensorDeviceClass.BATTERY, entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, @@ -87,73 +87,74 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "dgnbj": ( TuyaSensorEntityDescription( key=DPCode.GAS_SENSOR_VALUE, - name="Gas", + translation_key="gas", icon="mdi:gas-cylinder", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CH4_SENSOR_VALUE, + translation_key="gas", name="Methane", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VOC_VALUE, - name="Volatile organic compound", + translation_key="voc", device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.PM25_VALUE, - name="Particulate matter 2.5 µm", + translation_key="pm25", device_class=SensorDeviceClass.PM25, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CO_VALUE, - name="Carbon monoxide", + translation_key="carbon_monoxide", icon="mdi:molecule-co", device_class=SensorDeviceClass.CO, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CO2_VALUE, - name="Carbon dioxide", + translation_key="carbon_dioxide", icon="mdi:molecule-co2", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CH2O_VALUE, - name="Formaldehyde", + translation_key="formaldehyde", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.BRIGHT_STATE, - name="Luminosity", + translation_key="luminosity", icon="mdi:brightness-6", ), TuyaSensorEntityDescription( key=DPCode.BRIGHT_VALUE, - name="Luminosity", + translation_key="illuminance", icon="mdi:brightness-6", device_class=SensorDeviceClass.ILLUMINANCE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.SMOKE_SENSOR_VALUE, - name="Smoke amount", + translation_key="smoke_amount", icon="mdi:smoke-detector", entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, @@ -165,19 +166,19 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "bh": ( TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Current temperature", + translation_key="current_temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT_F, - name="Current temperature", + translation_key="current_temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.STATUS, - name="Status", + translation_key="status", ), ), # CO2 Detector @@ -185,19 +186,19 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "co2bj": ( TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CO2_VALUE, - name="Carbon dioxide", + translation_key="carbon_dioxide", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), @@ -209,13 +210,13 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "wkcz": ( TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), @@ -225,7 +226,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "cobj": ( TuyaSensorEntityDescription( key=DPCode.CO_VALUE, - name="Carbon monoxide", + translation_key="carbon_monoxide", device_class=SensorDeviceClass.CO, state_class=SensorStateClass.MEASUREMENT, ), @@ -236,7 +237,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "cwwsq": ( TuyaSensorEntityDescription( key=DPCode.FEED_REPORT, - name="Last amount", + translation_key="last_amount", icon="mdi:counter", state_class=SensorStateClass.MEASUREMENT, ), @@ -246,36 +247,36 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "hjjcy": ( TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CO2_VALUE, - name="Carbon dioxide", + translation_key="carbon_dioxide", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CH2O_VALUE, - name="Formaldehyde", + translation_key="formaldehyde", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VOC_VALUE, - name="Volatile organic compound", + translation_key="voc", device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.PM25_VALUE, - name="Particulate matter 2.5 µm", + translation_key="pm25", device_class=SensorDeviceClass.PM25, state_class=SensorStateClass.MEASUREMENT, ), @@ -285,37 +286,37 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "jqbj": ( TuyaSensorEntityDescription( key=DPCode.CO2_VALUE, - name="Carbon dioxide", + translation_key="carbon_dioxide", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VOC_VALUE, - name="Volatile organic compound", + translation_key="voc", device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.PM25_VALUE, - name="Particulate matter 2.5 µm", + translation_key="pm25", device_class=SensorDeviceClass.PM25, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VA_HUMIDITY, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VA_TEMPERATURE, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CH2O_VALUE, - name="Formaldehyde", + translation_key="formaldehyde", state_class=SensorStateClass.MEASUREMENT, ), *BATTERY_SENSORS, @@ -325,7 +326,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "jwbj": ( TuyaSensorEntityDescription( key=DPCode.CH4_SENSOR_VALUE, - name="Methane", + translation_key="methane", state_class=SensorStateClass.MEASUREMENT, ), *BATTERY_SENSORS, @@ -335,21 +336,21 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "kg": ( TuyaSensorEntityDescription( key=DPCode.CUR_CURRENT, - name="Current", + translation_key="current", device_class=SensorDeviceClass.CURRENT, state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, ), TuyaSensorEntityDescription( key=DPCode.CUR_POWER, - name="Power", + translation_key="power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, ), TuyaSensorEntityDescription( key=DPCode.CUR_VOLTAGE, - name="Voltage", + translation_key="voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, @@ -360,21 +361,21 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "tdq": ( TuyaSensorEntityDescription( key=DPCode.CUR_CURRENT, - name="Current", + translation_key="current", device_class=SensorDeviceClass.CURRENT, state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, ), TuyaSensorEntityDescription( key=DPCode.CUR_POWER, - name="Power", + translation_key="power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, ), TuyaSensorEntityDescription( key=DPCode.CUR_VOLTAGE, - name="Voltage", + translation_key="voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, @@ -385,30 +386,30 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "ldcg": ( TuyaSensorEntityDescription( key=DPCode.BRIGHT_STATE, - name="Luminosity", + translation_key="luminosity", icon="mdi:brightness-6", ), TuyaSensorEntityDescription( key=DPCode.BRIGHT_VALUE, - name="Luminosity", + translation_key="illuminance", device_class=SensorDeviceClass.ILLUMINANCE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CO2_VALUE, - name="Carbon dioxide", + translation_key="carbon_dioxide", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), @@ -425,18 +426,17 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "mzj": ( TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Current temperature", + translation_key="current_temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.STATUS, - name="Status", - translation_key="status", + translation_key="sous_vide_status", ), TuyaSensorEntityDescription( key=DPCode.REMAIN_TIME, - name="Remaining time", + translation_key="remaining_time", native_unit_of_measurement=UnitOfTime.MINUTES, icon="mdi:timer", ), @@ -449,48 +449,48 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "pm2.5": ( TuyaSensorEntityDescription( key=DPCode.PM25_VALUE, - name="Particulate matter 2.5 µm", + translation_key="pm25", device_class=SensorDeviceClass.PM25, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CH2O_VALUE, - name="Formaldehyde", + translation_key="formaldehyde", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VOC_VALUE, - name="Volatile organic compound", + translation_key="voc", device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CO2_VALUE, - name="Carbon dioxide", + translation_key="carbon_dioxide", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.PM1, - name="Particulate matter 1.0 µm", + translation_key="pm1", device_class=SensorDeviceClass.PM1, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.PM10, - name="Particulate matter 10.0 µm", + translation_key="pm10", device_class=SensorDeviceClass.PM10, state_class=SensorStateClass.MEASUREMENT, ), @@ -501,7 +501,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "qn": ( TuyaSensorEntityDescription( key=DPCode.WORK_POWER, - name="Power", + translation_key="power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, ), @@ -528,19 +528,19 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "sp": ( TuyaSensorEntityDescription( key=DPCode.SENSOR_TEMPERATURE, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.SENSOR_HUMIDITY, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.WIRELESS_ELECTRICITY, - name="Battery", + translation_key="battery", device_class=SensorDeviceClass.BATTERY, entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, @@ -556,36 +556,36 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "voc": ( TuyaSensorEntityDescription( key=DPCode.CO2_VALUE, - name="Carbon dioxide", + translation_key="carbon_dioxide", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.PM25_VALUE, - name="Particulate matter 2.5 µm", + translation_key="pm25", device_class=SensorDeviceClass.PM25, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CH2O_VALUE, - name="Formaldehyde", + translation_key="formaldehyde", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VOC_VALUE, - name="Volatile organic compound", + translation_key="voc", device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, state_class=SensorStateClass.MEASUREMENT, ), @@ -599,31 +599,31 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "wsdcg": ( TuyaSensorEntityDescription( key=DPCode.VA_TEMPERATURE, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VA_HUMIDITY, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY_VALUE, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.BRIGHT_VALUE, - name="Luminosity", + translation_key="illuminance", device_class=SensorDeviceClass.ILLUMINANCE, state_class=SensorStateClass.MEASUREMENT, ), @@ -645,7 +645,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "ywbj": ( TuyaSensorEntityDescription( key=DPCode.SMOKE_SENSOR_VALUE, - name="Smoke amount", + translation_key="smoke_amount", icon="mdi:smoke-detector", entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, @@ -660,13 +660,13 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "zndb": ( TuyaSensorEntityDescription( key=DPCode.FORWARD_ENERGY_TOTAL, - name="Total energy", + translation_key="total_energy", device_class=SensorDeviceClass.ENERGY, state_class=SensorStateClass.TOTAL_INCREASING, ), TuyaSensorEntityDescription( key=DPCode.PHASE_A, - name="Phase A current", + translation_key="phase_a_current", device_class=SensorDeviceClass.CURRENT, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, state_class=SensorStateClass.MEASUREMENT, @@ -674,7 +674,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_A, - name="Phase A power", + translation_key="phase_a_power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, @@ -682,7 +682,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_A, - name="Phase A voltage", + translation_key="phase_a_voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfElectricPotential.VOLT, @@ -690,7 +690,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_B, - name="Phase B current", + translation_key="phase_b_current", device_class=SensorDeviceClass.CURRENT, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, state_class=SensorStateClass.MEASUREMENT, @@ -698,7 +698,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_B, - name="Phase B power", + translation_key="phase_b_power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, @@ -706,7 +706,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_B, - name="Phase B voltage", + translation_key="phase_b_voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfElectricPotential.VOLT, @@ -714,7 +714,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_C, - name="Phase C current", + translation_key="phase_c_current", device_class=SensorDeviceClass.CURRENT, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, state_class=SensorStateClass.MEASUREMENT, @@ -722,7 +722,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_C, - name="Phase C power", + translation_key="phase_c_power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, @@ -730,7 +730,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_C, - name="Phase C voltage", + translation_key="phase_c_voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfElectricPotential.VOLT, @@ -742,13 +742,13 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "dlq": ( TuyaSensorEntityDescription( key=DPCode.TOTAL_FORWARD_ENERGY, - name="Total energy", + translation_key="total_energy", device_class=SensorDeviceClass.ENERGY, state_class=SensorStateClass.TOTAL_INCREASING, ), TuyaSensorEntityDescription( key=DPCode.PHASE_A, - name="Phase A current", + translation_key="phase_a_current", device_class=SensorDeviceClass.CURRENT, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, state_class=SensorStateClass.MEASUREMENT, @@ -756,7 +756,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_A, - name="Phase A power", + translation_key="phase_a_power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, @@ -764,7 +764,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_A, - name="Phase A voltage", + translation_key="phase_a_voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfElectricPotential.VOLT, @@ -772,7 +772,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_B, - name="Phase B current", + translation_key="phase_b_current", device_class=SensorDeviceClass.CURRENT, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, state_class=SensorStateClass.MEASUREMENT, @@ -780,7 +780,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_B, - name="Phase B power", + translation_key="phase_b_power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, @@ -788,7 +788,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_B, - name="Phase B voltage", + translation_key="phase_b_voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfElectricPotential.VOLT, @@ -796,7 +796,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_C, - name="Phase C current", + translation_key="phase_c_current", device_class=SensorDeviceClass.CURRENT, native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, state_class=SensorStateClass.MEASUREMENT, @@ -804,7 +804,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_C, - name="Phase C power", + translation_key="phase_c_power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, @@ -812,7 +812,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), TuyaSensorEntityDescription( key=DPCode.PHASE_C, - name="Phase C voltage", + translation_key="phase_c_voltage", device_class=SensorDeviceClass.VOLTAGE, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfElectricPotential.VOLT, @@ -824,55 +824,55 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "sd": ( TuyaSensorEntityDescription( key=DPCode.CLEAN_AREA, - name="Cleaning area", + translation_key="cleaning_area", icon="mdi:texture-box", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.CLEAN_TIME, - name="Cleaning time", + translation_key="cleaning_time", icon="mdi:progress-clock", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TOTAL_CLEAN_AREA, - name="Total cleaning area", + translation_key="total_cleaning_area", icon="mdi:texture-box", state_class=SensorStateClass.TOTAL_INCREASING, ), TuyaSensorEntityDescription( key=DPCode.TOTAL_CLEAN_TIME, - name="Total cleaning time", + translation_key="total_cleaning_time", icon="mdi:history", state_class=SensorStateClass.TOTAL_INCREASING, ), TuyaSensorEntityDescription( key=DPCode.TOTAL_CLEAN_COUNT, - name="Total cleaning times", + translation_key="total_cleaning_times", icon="mdi:counter", state_class=SensorStateClass.TOTAL_INCREASING, ), TuyaSensorEntityDescription( key=DPCode.DUSTER_CLOTH, - name="Duster cloth lifetime", + translation_key="duster_cloth_life", icon="mdi:ticket-percent-outline", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.EDGE_BRUSH, - name="Side brush lifetime", + translation_key="side_brush_life", icon="mdi:ticket-percent-outline", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.FILTER_LIFE, - name="Filter lifetime", + translation_key="filter_life", icon="mdi:ticket-percent-outline", state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.ROLL_BRUSH, - name="Rolling brush lifetime", + translation_key="rolling_brush_life", icon="mdi:ticket-percent-outline", state_class=SensorStateClass.MEASUREMENT, ), @@ -882,7 +882,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "cl": ( TuyaSensorEntityDescription( key=DPCode.TIME_TOTAL, - name="Last operation duration", + translation_key="last_operation_duration", entity_category=EntityCategory.DIAGNOSTIC, icon="mdi:progress-clock", ), @@ -892,25 +892,25 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "jsq": ( TuyaSensorEntityDescription( key=DPCode.HUMIDITY_CURRENT, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT_F, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.LEVEL_CURRENT, - name="Water level", + translation_key="water_level", entity_category=EntityCategory.DIAGNOSTIC, icon="mdi:waves-arrow-up", ), @@ -920,60 +920,59 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "kj": ( TuyaSensorEntityDescription( key=DPCode.FILTER, - name="Filter utilization", + translation_key="filter_utilization", entity_category=EntityCategory.DIAGNOSTIC, icon="mdi:ticket-percent-outline", ), TuyaSensorEntityDescription( key=DPCode.PM25, - name="Particulate matter 2.5 µm", + translation_key="pm25", device_class=SensorDeviceClass.PM25, state_class=SensorStateClass.MEASUREMENT, icon="mdi:molecule", ), TuyaSensorEntityDescription( key=DPCode.TEMP, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TVOC, - name="Total volatile organic compound", + translation_key="total_volatile_organic_compound", device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.ECO2, - name="Concentration of carbon dioxide", + translation_key="concentration_carbon_dioxide", device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.TOTAL_TIME, - name="Total operating time", + translation_key="total_operating_time", icon="mdi:history", state_class=SensorStateClass.TOTAL_INCREASING, entity_category=EntityCategory.DIAGNOSTIC, ), TuyaSensorEntityDescription( key=DPCode.TOTAL_PM, - name="Total absorption of particles", + translation_key="total_absorption_particles", icon="mdi:texture-box", state_class=SensorStateClass.TOTAL_INCREASING, entity_category=EntityCategory.DIAGNOSTIC, ), TuyaSensorEntityDescription( key=DPCode.AIR_QUALITY, - name="Air quality", - icon="mdi:air-filter", translation_key="air_quality", + icon="mdi:air-filter", ), ), # Fan @@ -981,7 +980,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "fs": ( TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), @@ -990,13 +989,13 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "wnykq": ( TuyaSensorEntityDescription( key=DPCode.VA_TEMPERATURE, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.VA_HUMIDITY, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), @@ -1006,13 +1005,13 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "cs": ( TuyaSensorEntityDescription( key=DPCode.TEMP_INDOOR, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY_INDOOR, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), @@ -1021,13 +1020,13 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { "zwjcy": ( TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, - name="Temperature", + translation_key="temperature", device_class=SensorDeviceClass.TEMPERATURE, state_class=SensorStateClass.MEASUREMENT, ), TuyaSensorEntityDescription( key=DPCode.HUMIDITY, - name="Humidity", + translation_key="humidity", device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), diff --git a/homeassistant/components/tuya/strings.json b/homeassistant/components/tuya/strings.json index e7896f5da86..db16015ba56 100644 --- a/homeassistant/components/tuya/strings.json +++ b/homeassistant/components/tuya/strings.json @@ -18,8 +18,193 @@ } }, "entity": { + "binary_sensor": { + "methane": { + "name": "Methane" + }, + "voc": { + "name": "VOCs" + }, + "pm25": { + "name": "PM2.5" + }, + "carbon_monoxide": { + "name": "Carbon monoxide" + }, + "carbon_dioxide": { + "name": "Carbon dioxide" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "pressure": { + "name": "Pressure" + }, + "feeding": { + "name": "Feeding" + }, + "drop": { + "name": "Drop" + }, + "tilt": { + "name": "Tilt" + } + }, + "button": { + "reset_duster_cloth": { + "name": "Reset duster cloth" + }, + "reset_edge_brush": { + "name": "Reset edge brush" + }, + "reset_filter": { + "name": "Reset filter" + }, + "reset_map": { + "name": "Reset map" + }, + "reset_roll_brush": { + "name": "Reset roll brush" + }, + "snooze": { + "name": "Snooze" + } + }, + "cover": { + "curtain_2": { + "name": "Curtain 2" + }, + "curtain_3": { + "name": "Curtain 3" + }, + "door": { + "name": "[%key:component::cover::entity_component::door::name%]" + }, + "door_2": { + "name": "Door 2" + }, + "door_3": { + "name": "Door 3" + } + }, + "light": { + "backlight": { + "name": "Backlight" + }, + "light": { + "name": "[%key:component::light::title%]" + }, + "light_2": { + "name": "Light 2" + }, + "light_3": { + "name": "Light 3" + }, + "night_light": { + "name": "Night light" + } + }, + "number": { + "temperature": { + "name": "[%key:component::number::entity_component::temperature::name%]" + }, + "time": { + "name": "Time" + }, + "temperature_after_boiling": { + "name": "Temperature after boiling" + }, + "heat_preservation_time": { + "name": "Heat preservation time" + }, + "feed": { + "name": "Feed" + }, + "voice_times": { + "name": "Voice times" + }, + "sensitivity": { + "name": "Sensitivity" + }, + "near_detection": { + "name": "Near detection" + }, + "far_detection": { + "name": "Far detection" + }, + "water_level": { + "name": "Water level" + }, + "powder": { + "name": "Powder" + }, + "cook_temperature": { + "name": "Cook temperature" + }, + "cook_time": { + "name": "Cook time" + }, + "cloud_recipe": { + "name": "Cloud recipe" + }, + "volume": { + "name": "Volume" + }, + "minimum_brightness": { + "name": "Minimum brightness" + }, + "maximum_brightness": { + "name": "Maximum brightness" + }, + "minimum_brightness_2": { + "name": "Minimum brightness 2" + }, + "maximum_brightness_2": { + "name": "Maximum brightness 2" + }, + "minimum_brightness_3": { + "name": "Minimum brightness 3" + }, + "maximum_brightness_3": { + "name": "Maximum brightness 3" + }, + "move_down": { + "name": "Move down" + }, + "move_up": { + "name": "Move up" + }, + "down_delay": { + "name": "Down delay" + } + }, "select": { + "volume": { + "name": "[%key:component::tuya::entity::number::volume::name%]" + }, + "cups": { + "name": "Cups" + }, + "concentration": { + "name": "Concentration" + }, + "material": { + "name": "Material" + }, + "mode": { + "name": "Mode" + }, + "temperature_level": { + "name": "Temperature level" + }, + "brightness": { + "name": "Brightness" + }, + "target_humidity": { + "name": "Target humidity" + }, "basic_anti_flicker": { + "name": "Anti-flicker", "state": { "0": "[%key:common::state::disabled%]", "1": "50 Hz", @@ -27,6 +212,7 @@ } }, "basic_nightvision": { + "name": "Night vision", "state": { "0": "Automatic", "1": "[%key:common::state::off%]", @@ -34,25 +220,45 @@ } }, "decibel_sensitivity": { + "name": "Sound detection sensitivity", "state": { "0": "Low sensitivity", "1": "High sensitivity" } }, "ipc_work_mode": { + "name": "IPC mode", "state": { "0": "Low power mode", "1": "Continuous working mode" } }, "led_type": { + "name": "Light source type", "state": { "halogen": "Halogen", "incandescent": "Incandescent", "led": "LED" } }, + "led_type_2": { + "name": "Light 2 source type", + "state": { + "halogen": "[%key:component::tuya::entity::select::led_type::state::halogen%]", + "incandescent": "[%key:component::tuya::entity::select::led_type::state::incandescent%]", + "led": "[%key:component::tuya::entity::select::led_type::state::led%]" + } + }, + "led_type_3": { + "name": "Light 3 source type", + "state": { + "halogen": "[%key:component::tuya::entity::select::led_type::state::halogen%]", + "incandescent": "[%key:component::tuya::entity::select::led_type::state::incandescent%]", + "led": "[%key:component::tuya::entity::select::led_type::state::led%]" + } + }, "light_mode": { + "name": "Indicator light mode", "state": { "none": "[%key:common::state::off%]", "pos": "Indicate switch location", @@ -60,6 +266,7 @@ } }, "motion_sensitivity": { + "name": "Motion detection sensitivity", "state": { "0": "Low sensitivity", "1": "Medium sensitivity", @@ -67,12 +274,14 @@ } }, "record_mode": { + "name": "Record mode", "state": { "1": "Record events only", "2": "Continuous recording" } }, "relay_status": { + "name": "Power on behavior", "state": { "last": "Remember last state", "memory": "[%key:component::tuya::entity::select::relay_status::state::last%]", @@ -83,12 +292,14 @@ } }, "fingerbot_mode": { + "name": "Mode", "state": { "click": "Push", "switch": "Switch" } }, "vacuum_cistern": { + "name": "Water tank adjustment", "state": { "low": "Low", "middle": "Middle", @@ -97,6 +308,7 @@ } }, "vacuum_collection": { + "name": "Dust collection mode", "state": { "small": "Small", "middle": "Middle", @@ -104,29 +316,39 @@ } }, "vacuum_mode": { + "name": "Mode", "state": { "standby": "[%key:common::state::standby%]", "random": "Random", "smart": "Smart", - "wall_follow": "Follow Wall", + "wall_follow": "Follow wall", "mop": "Mop", "spiral": "Spiral", - "left_spiral": "Spiral Left", - "right_spiral": "Spiral Right", + "left_spiral": "Spiral left", + "right_spiral": "Spiral right", "bow": "Bow", - "left_bow": "Bow Left", - "right_bow": "Bow Right", - "partial_bow": "Bow Partially", + "left_bow": "Bow left", + "right_bow": "Bow right", + "partial_bow": "Bow partially", "chargego": "Return to dock", "single": "Single", "zone": "Zone", "pose": "Pose", "point": "Point", "part": "Part", - "pick_zone": "Pick Zone" + "pick_zone": "Pick zone" } }, - "fan_angle": { + "vertical_fan_angle": { + "name": "Vertical swing flap angle", + "state": { + "30": "30°", + "60": "60°", + "90": "90°" + } + }, + "horizontal_fan_angle": { + "name": "Horizontal swing flap angle", "state": { "30": "30°", "60": "60°", @@ -134,18 +356,21 @@ } }, "curtain_mode": { + "name": "Mode", "state": { "morning": "Morning", "night": "Night" } }, "curtain_motor_mode": { + "name": "Motor mode", "state": { "forward": "Forward", "back": "Back" } }, "countdown": { + "name": "Countdown", "state": { "cancel": "Cancel", "1h": "1 hour", @@ -157,6 +382,7 @@ } }, "humidifier_spray_mode": { + "name": "Spray mode", "state": { "auto": "Auto", "health": "Health", @@ -166,6 +392,7 @@ } }, "humidifier_level": { + "name": "Spraying level", "state": { "level_1": "Level 1", "level_2": "Level 2", @@ -180,6 +407,7 @@ } }, "humidifier_moodlighting": { + "name": "Moodlighting", "state": { "1": "Mood 1", "2": "Mood 2", @@ -190,7 +418,155 @@ } }, "sensor": { + "battery": { + "name": "[%key:component::sensor::entity_component::battery::name%]" + }, + "voc": { + "name": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]" + }, + "carbon_monoxide": { + "name": "[%key:component::sensor::entity_component::carbon_monoxide::name%]" + }, + "carbon_dioxide": { + "name": "[%key:component::sensor::entity_component::carbon_dioxide::name%]" + }, + "illuminance": { + "name": "[%key:component::sensor::entity_component::illuminance::name%]" + }, + "temperature": { + "name": "[%key:component::sensor::entity_component::temperature::name%]" + }, + "humidity": { + "name": "[%key:component::sensor::entity_component::humidity::name%]" + }, + "pm25": { + "name": "[%key:component::sensor::entity_component::pm25::name%]" + }, + "pm1": { + "name": "[%key:component::sensor::entity_component::pm1::name%]" + }, + "pm10": { + "name": "[%key:component::sensor::entity_component::pm10::name%]" + }, + "current": { + "name": "[%key:component::sensor::entity_component::current::name%]" + }, + "power": { + "name": "[%key:component::sensor::entity_component::power::name%]" + }, + "voltage": { + "name": "[%key:component::sensor::entity_component::voltage::name%]" + }, + "battery_state": { + "name": "Battery state" + }, + "gas": { + "name": "Gas" + }, + "formaldehyde": { + "name": "[%key:component::tuya::entity::binary_sensor::formaldehyde::name%]" + }, + "luminosity": { + "name": "Luminosity" + }, + "smoke_amount": { + "name": "Smoke amount" + }, + "current_temperature": { + "name": "Current temperature" + }, "status": { + "name": "Status" + }, + "last_amount": { + "name": "Last amount" + }, + "remaining_time": { + "name": "Remaining time" + }, + "methane": { + "name": "[%key:component::tuya::entity::binary_sensor::methane::name%]" + }, + "total_energy": { + "name": "Total energy" + }, + "phase_a_current": { + "name": "Phase A current" + }, + "phase_a_power": { + "name": "Phase A power" + }, + "phase_a_voltage": { + "name": "Phase A voltage" + }, + "phase_b_current": { + "name": "Phase B current" + }, + "phase_b_power": { + "name": "Phase B power" + }, + "phase_b_voltage": { + "name": "Phase B voltage" + }, + "phase_c_current": { + "name": "Phase C current" + }, + "phase_c_power": { + "name": "Phase C power" + }, + "phase_c_voltage": { + "name": "Phase C voltage" + }, + "cleaning_area": { + "name": "Cleaning area" + }, + "cleaning_time": { + "name": "Cleaning time" + }, + "total_cleaning_area": { + "name": "Total cleaning area" + }, + "total_cleaning_time": { + "name": "Total cleaning time" + }, + "total_cleaning_times": { + "name": "Total cleaning times" + }, + "duster_cloth_life": { + "name": "Duster cloth lifetime" + }, + "side_brush_life": { + "name": "Side brush lifetime" + }, + "filter_life": { + "name": "Filter lifetime" + }, + "rolling_brush_life": { + "name": "Rolling brush lifetime" + }, + "last_operation_duration": { + "name": "Last operation duration" + }, + "water_level": { + "name": "Water level" + }, + "filter_utilization": { + "name": "Filter utilization" + }, + "total_volatile_organic_compound": { + "name": "Total volatile organic compound" + }, + "concentration_carbon_dioxide": { + "name": "Concentration of carbon dioxide" + }, + "total_operating_time": { + "name": "Total operating time" + }, + "total_absorption_particles": { + "name": "Total absorption of particles" + }, + "sous_vide_status": { + "name": "Status", "state": { "boiling_temp": "Boiling temperature", "cooling": "Cooling", @@ -204,6 +580,7 @@ } }, "air_quality": { + "name": "Air quality", "state": { "great": "Great", "mild": "Mild", @@ -211,6 +588,212 @@ "severe": "Severe" } } + }, + "switch": { + "start": { + "name": "Start" + }, + "heat_preservation": { + "name": "Heat preservation" + }, + "disinfection": { + "name": "Disinfection" + }, + "water": { + "name": "Water" + }, + "slow_feed": { + "name": "Slow feed" + }, + "filter_reset": { + "name": "Filter reset" + }, + "water_pump_reset": { + "name": "Water pump reset" + }, + "power": { + "name": "Power" + }, + "reset_of_water_usage_days": { + "name": "Reset of water usage days" + }, + "uv_sterilization": { + "name": "UV sterilization" + }, + "plug": { + "name": "Plug" + }, + "child_lock": { + "name": "Child lock" + }, + "switch": { + "name": "Switch" + }, + "socket": { + "name": "Socket" + }, + "radio": { + "name": "Radio" + }, + "alarm_1": { + "name": "Alarm 1" + }, + "alarm_2": { + "name": "Alarm 2" + }, + "alarm_3": { + "name": "Alarm 3" + }, + "alarm_4": { + "name": "Alarm 4" + }, + "sleep_aid": { + "name": "Sleep aid" + }, + "switch_1": { + "name": "Switch 1" + }, + "switch_2": { + "name": "Switch 2" + }, + "switch_3": { + "name": "Switch 3" + }, + "switch_4": { + "name": "Switch 4" + }, + "switch_5": { + "name": "Switch 5" + }, + "switch_6": { + "name": "Switch 6" + }, + "switch_7": { + "name": "Switch 7" + }, + "switch_8": { + "name": "Switch 8" + }, + "usb_1": { + "name": "USB 1" + }, + "usb_2": { + "name": "USB 2" + }, + "usb_3": { + "name": "USB 3" + }, + "usb_4": { + "name": "USB 4" + }, + "usb_5": { + "name": "USB 5" + }, + "usb_6": { + "name": "USB 6" + }, + "socket_1": { + "name": "Socket 1" + }, + "socket_2": { + "name": "Socket 2" + }, + "socket_3": { + "name": "Socket 3" + }, + "socket_4": { + "name": "Socket 4" + }, + "socket_5": { + "name": "Socket 5" + }, + "socket_6": { + "name": "Socket 6" + }, + "ionizer": { + "name": "Ionizer" + }, + "filter_cartridge_reset": { + "name": "Filter cartridge reset" + }, + "humidification": { + "name": "Humidification" + }, + "do_not_disturb": { + "name": "Do not disturb" + }, + "mute_voice": { + "name": "Mute voice" + }, + "mute": { + "name": "Mute" + }, + "battery_lock": { + "name": "Battery lock" + }, + "cry_detection": { + "name": "Cry detection" + }, + "sound_detection": { + "name": "Sound detection" + }, + "video_recording": { + "name": "Video recording" + }, + "motion_recording": { + "name": "Motion recording" + }, + "privacy_mode": { + "name": "Privacy mode" + }, + "flip": { + "name": "Flip" + }, + "time_watermark": { + "name": "Time watermark" + }, + "wide_dynamic_range": { + "name": "Wide dynamic range" + }, + "motion_tracking": { + "name": "Motion tracking" + }, + "motion_alarm": { + "name": "Motion alarm" + }, + "energy_saving": { + "name": "Energy saving" + }, + "open_window_detection": { + "name": "Open window detection" + }, + "spray": { + "name": "Spray" + }, + "voice": { + "name": "Voice" + }, + "anion": { + "name": "Anion" + }, + "oxygen_bar": { + "name": "Oxygen bar" + }, + "natural_wind": { + "name": "Natural wind" + }, + "sound": { + "name": "Sound" + }, + "reverse": { + "name": "Reverse" + }, + "sleep": { + "name": "Sleep" + }, + "sterilization": { + "name": "Sterilization" + } } }, "issues": { diff --git a/homeassistant/components/tuya/switch.py b/homeassistant/components/tuya/switch.py index a7245913e73..c99d6f3a0b2 100644 --- a/homeassistant/components/tuya/switch.py +++ b/homeassistant/components/tuya/switch.py @@ -29,12 +29,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "bh": ( SwitchEntityDescription( key=DPCode.START, - name="Start", + translation_key="start", icon="mdi:kettle-steam", ), SwitchEntityDescription( key=DPCode.WARM, - name="Heat preservation", + translation_key="heat_preservation", entity_category=EntityCategory.CONFIG, ), ), @@ -43,12 +43,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "cn": ( SwitchEntityDescription( key=DPCode.DISINFECTION, - name="Disinfection", + translation_key="disinfection", icon="mdi:bacteria", ), SwitchEntityDescription( key=DPCode.WATER, - name="Water", + translation_key="water", icon="mdi:water", ), ), @@ -57,7 +57,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "cwwsq": ( SwitchEntityDescription( key=DPCode.SLOW_FEED, - name="Slow feed", + translation_key="slow_feed", icon="mdi:speedometer-slow", entity_category=EntityCategory.CONFIG, ), @@ -67,29 +67,29 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "cwysj": ( SwitchEntityDescription( key=DPCode.FILTER_RESET, - name="Filter reset", + translation_key="filter_reset", icon="mdi:filter", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.PUMP_RESET, - name="Water pump reset", + translation_key="water_pump_reset", icon="mdi:pump", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH, - name="Power", + translation_key="power", ), SwitchEntityDescription( key=DPCode.WATER_RESET, - name="Reset of water usage days", + translation_key="reset_of_water_usage_days", icon="mdi:water-sync", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.UV, - name="UV sterilization", + translation_key="uv_sterilization", icon="mdi:lightbulb", entity_category=EntityCategory.CONFIG, ), @@ -102,20 +102,20 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { # switch to control the plug. SwitchEntityDescription( key=DPCode.SWITCH, - name="Plug", + translation_key="plug", ), ), # Cirquit Breaker "dlq": ( SwitchEntityDescription( key=DPCode.CHILD_LOCK, - name="Child lock", + translation_key="asd", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH, - name="Switch", + translation_key="switch", ), ), # Wake Up Light II @@ -123,36 +123,36 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "hxd": ( SwitchEntityDescription( key=DPCode.SWITCH_1, - name="Radio", + translation_key="radio", icon="mdi:radio", ), SwitchEntityDescription( key=DPCode.SWITCH_2, - name="Alarm 1", + translation_key="alarm_1", icon="mdi:alarm", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH_3, - name="Alarm 2", + translation_key="alarm_2", icon="mdi:alarm", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH_4, - name="Alarm 3", + translation_key="alarm_3", icon="mdi:alarm", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH_5, - name="Alarm 4", + translation_key="alarm_4", icon="mdi:alarm", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH_6, - name="Sleep aid", + translation_key="sleep_aid", icon="mdi:power-sleep", ), ), @@ -162,12 +162,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "wkcz": ( SwitchEntityDescription( key=DPCode.SWITCH_1, - name="Switch 1", + translation_key="switch_1", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_2, - name="Switch 2", + translation_key="switch_2", device_class=SwitchDeviceClass.OUTLET, ), ), @@ -176,77 +176,77 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "kg": ( SwitchEntityDescription( key=DPCode.CHILD_LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH_1, - name="Switch 1", + translation_key="switch_1", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_2, - name="Switch 2", + translation_key="switch_2", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_3, - name="Switch 3", + translation_key="switch_3", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_4, - name="Switch 4", + translation_key="switch_4", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_5, - name="Switch 5", + translation_key="switch_5", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_6, - name="Switch 6", + translation_key="switch_6", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_7, - name="Switch 7", + translation_key="switch_7", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_8, - name="Switch 8", + translation_key="switch_8", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_USB1, - name="USB 1", + translation_key="usb_1", ), SwitchEntityDescription( key=DPCode.SWITCH_USB2, - name="USB 2", + translation_key="usb_2", ), SwitchEntityDescription( key=DPCode.SWITCH_USB3, - name="USB 3", + translation_key="usb_3", ), SwitchEntityDescription( key=DPCode.SWITCH_USB4, - name="USB 4", + translation_key="usb_4", ), SwitchEntityDescription( key=DPCode.SWITCH_USB5, - name="USB 5", + translation_key="usb_5", ), SwitchEntityDescription( key=DPCode.SWITCH_USB6, - name="USB 6", + translation_key="usb_6", ), SwitchEntityDescription( key=DPCode.SWITCH, - name="Switch", + translation_key="switch", device_class=SwitchDeviceClass.OUTLET, ), ), @@ -255,35 +255,35 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "kj": ( SwitchEntityDescription( key=DPCode.ANION, - name="Ionizer", + translation_key="ionizer", icon="mdi:minus-circle-outline", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.FILTER_RESET, - name="Filter cartridge reset", + translation_key="filter_cartridge_reset", icon="mdi:filter", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH, - name="Power", + translation_key="power", ), SwitchEntityDescription( key=DPCode.WET, - name="Humidification", + translation_key="humidification", icon="mdi:water-percent", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.UV, - name="UV sterilization", + translation_key="uv_sterilization", icon="mdi:minus-circle-outline", entity_category=EntityCategory.CONFIG, ), @@ -293,13 +293,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "kt": ( SwitchEntityDescription( key=DPCode.ANION, - name="Ionizer", + translation_key="ionizer", icon="mdi:minus-circle-outline", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), @@ -309,13 +309,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "mzj": ( SwitchEntityDescription( key=DPCode.SWITCH, - name="Switch", + translation_key="switch", icon="mdi:power", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.START, - name="Start", + translation_key="start", icon="mdi:pot-steam", entity_category=EntityCategory.CONFIG, ), @@ -325,67 +325,67 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "pc": ( SwitchEntityDescription( key=DPCode.CHILD_LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SWITCH_1, - name="Socket 1", + translation_key="socket_1", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_2, - name="Socket 2", + translation_key="socket_2", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_3, - name="Socket 3", + translation_key="socket_3", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_4, - name="Socket 4", + translation_key="socket_4", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_5, - name="Socket 5", + translation_key="socket_5", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_6, - name="Socket 6", + translation_key="socket_6", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_USB1, - name="USB 1", + translation_key="usb_1", ), SwitchEntityDescription( key=DPCode.SWITCH_USB2, - name="USB 2", + translation_key="usb_2", ), SwitchEntityDescription( key=DPCode.SWITCH_USB3, - name="USB 3", + translation_key="usb_3", ), SwitchEntityDescription( key=DPCode.SWITCH_USB4, - name="USB 4", + translation_key="usb_4", ), SwitchEntityDescription( key=DPCode.SWITCH_USB5, - name="USB 5", + translation_key="usb_5", ), SwitchEntityDescription( key=DPCode.SWITCH_USB6, - name="USB 6", + translation_key="usb_6", ), SwitchEntityDescription( key=DPCode.SWITCH, - name="Socket", + translation_key="socket", device_class=SwitchDeviceClass.OUTLET, ), ), @@ -395,7 +395,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "qjdcz": ( SwitchEntityDescription( key=DPCode.SWITCH_1, - name="Switch", + translation_key="switch", ), ), # Heater @@ -403,13 +403,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "qn": ( SwitchEntityDescription( key=DPCode.ANION, - name="Ionizer", + translation_key="ionizer", icon="mdi:minus-circle-outline", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), @@ -419,13 +419,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "sd": ( SwitchEntityDescription( key=DPCode.SWITCH_DISTURB, - name="Do not disturb", + translation_key="do_not_disturb", icon="mdi:minus-circle", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.VOICE_SWITCH, - name="Mute voice", + translation_key="mute_voice", icon="mdi:account-voice", entity_category=EntityCategory.CONFIG, ), @@ -435,7 +435,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "sgbj": ( SwitchEntityDescription( key=DPCode.MUFFLING, - name="Mute", + translation_key="mute", entity_category=EntityCategory.CONFIG, ), ), @@ -444,68 +444,68 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "sp": ( SwitchEntityDescription( key=DPCode.WIRELESS_BATTERYLOCK, - name="Battery lock", + translation_key="battery_lock", icon="mdi:battery-lock", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.CRY_DETECTION_SWITCH, + translation_key="cry_detection", icon="mdi:emoticon-cry", - name="Cry detection", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.DECIBEL_SWITCH, + translation_key="sound_detection", icon="mdi:microphone-outline", - name="Sound detection", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.RECORD_SWITCH, + translation_key="video_recording", icon="mdi:record-rec", - name="Video recording", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.MOTION_RECORD, + translation_key="motion_recording", icon="mdi:record-rec", - name="Motion recording", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.BASIC_PRIVATE, + translation_key="privacy_mode", icon="mdi:eye-off", - name="Privacy mode", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.BASIC_FLIP, + translation_key="flip", icon="mdi:flip-horizontal", - name="Flip", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.BASIC_OSD, + translation_key="time_watermark", icon="mdi:watermark", - name="Time watermark", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.BASIC_WDR, + translation_key="wide_dynamic_range", icon="mdi:watermark", - name="Wide dynamic range", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.MOTION_TRACKING, + translation_key="motion_tracking", icon="mdi:motion-sensor", - name="Motion tracking", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.MOTION_SWITCH, + translation_key="motion_alarm", icon="mdi:motion-sensor", - name="Motion alarm", entity_category=EntityCategory.CONFIG, ), ), @@ -513,7 +513,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "szjqr": ( SwitchEntityDescription( key=DPCode.SWITCH, - name="Switch", + translation_key="switch", icon="mdi:cursor-pointer", ), ), @@ -522,27 +522,27 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "tdq": ( SwitchEntityDescription( key=DPCode.SWITCH_1, - name="Switch 1", + translation_key="switch_1", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_2, - name="Switch 2", + translation_key="switch_2", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_3, - name="Switch 3", + translation_key="switch_3", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.SWITCH_4, - name="Switch 4", + translation_key="switch_4", device_class=SwitchDeviceClass.OUTLET, ), SwitchEntityDescription( key=DPCode.CHILD_LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), @@ -552,7 +552,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "tyndj": ( SwitchEntityDescription( key=DPCode.SWITCH_SAVE_ENERGY, - name="Energy saving", + translation_key="energy_saving", icon="mdi:leaf", entity_category=EntityCategory.CONFIG, ), @@ -562,13 +562,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "wkf": ( SwitchEntityDescription( key=DPCode.CHILD_LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.WINDOW_CHECK, - name="Open window detection", + translation_key="open_window_detection", icon="mdi:window-open", entity_category=EntityCategory.CONFIG, ), @@ -578,7 +578,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "wsdcg": ( SwitchEntityDescription( key=DPCode.SWITCH, - name="Switch", + translation_key="switch", device_class=SwitchDeviceClass.OUTLET, ), ), @@ -587,7 +587,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "xdd": ( SwitchEntityDescription( key=DPCode.DO_NOT_DISTURB, - name="Do not disturb", + translation_key="do_not_disturb", icon="mdi:minus-circle-outline", entity_category=EntityCategory.CONFIG, ), @@ -597,16 +597,16 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "xxj": ( SwitchEntityDescription( key=DPCode.SWITCH, - name="Power", + translation_key="power", ), SwitchEntityDescription( key=DPCode.SWITCH_SPRAY, - name="Spray", + translation_key="spray", icon="mdi:spray", ), SwitchEntityDescription( key=DPCode.SWITCH_VOICE, - name="Voice", + translation_key="voice", icon="mdi:account-voice", entity_category=EntityCategory.CONFIG, ), @@ -616,7 +616,7 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "zndb": ( SwitchEntityDescription( key=DPCode.SWITCH, - name="Switch", + translation_key="switch", ), ), # Fan @@ -624,37 +624,37 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "fs": ( SwitchEntityDescription( key=DPCode.ANION, - name="Anion", + translation_key="anion", icon="mdi:atom", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.HUMIDIFIER, - name="Humidification", + translation_key="humidification", icon="mdi:air-humidifier", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.OXYGEN, - name="Oxygen bar", + translation_key="oxygen_bar", icon="mdi:molecule", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.FAN_COOL, - name="Natural wind", + translation_key="natural_wind", icon="mdi:weather-windy", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.FAN_BEEP, - name="Sound", + translation_key="sound", icon="mdi:minus-circle", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.CHILD_LOCK, - name="Child lock", + translation_key="child_lock", icon="mdi:account-lock", entity_category=EntityCategory.CONFIG, ), @@ -664,13 +664,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "cl": ( SwitchEntityDescription( key=DPCode.CONTROL_BACK, - name="Reverse", + translation_key="reverse", icon="mdi:swap-horizontal", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.OPPOSITE, - name="Reverse", + translation_key="reverse", icon="mdi:swap-horizontal", entity_category=EntityCategory.CONFIG, ), @@ -680,19 +680,19 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = { "jsq": ( SwitchEntityDescription( key=DPCode.SWITCH_SOUND, - name="Voice", + translation_key="voice", icon="mdi:account-voice", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.SLEEP, - name="Sleep", + translation_key="sleep", icon="mdi:power-sleep", entity_category=EntityCategory.CONFIG, ), SwitchEntityDescription( key=DPCode.STERILIZATION, - name="Sterilization", + translation_key="sterilization", icon="mdi:minus-circle-outline", entity_category=EntityCategory.CONFIG, ),