mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Add icon translations to Tuya (#112326)
This commit is contained in:
parent
abf75c4faf
commit
8946cfc1e9
@ -87,7 +87,6 @@ async def async_setup_entry(
|
||||
class TuyaAlarmEntity(TuyaEntity, AlarmControlPanelEntity):
|
||||
"""Tuya Alarm Entity."""
|
||||
|
||||
_attr_icon = "mdi:security"
|
||||
_attr_name = None
|
||||
|
||||
def __init__(
|
||||
|
@ -51,7 +51,6 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
||||
"dgnbj": (
|
||||
TuyaBinarySensorEntityDescription(
|
||||
key=DPCode.GAS_SENSOR_STATE,
|
||||
icon="mdi:gas-cylinder",
|
||||
device_class=BinarySensorDeviceClass.GAS,
|
||||
on_value="alarm",
|
||||
),
|
||||
@ -76,14 +75,12 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
||||
TuyaBinarySensorEntityDescription(
|
||||
key=DPCode.CO_STATE,
|
||||
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",
|
||||
device_class=BinarySensorDeviceClass.SAFETY,
|
||||
on_value="alarm",
|
||||
),
|
||||
@ -109,7 +106,6 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
||||
),
|
||||
TuyaBinarySensorEntityDescription(
|
||||
key=DPCode.SMOKE_SENSOR_STATE,
|
||||
icon="mdi:smoke-detector",
|
||||
device_class=BinarySensorDeviceClass.SMOKE,
|
||||
on_value="alarm",
|
||||
),
|
||||
@ -146,7 +142,6 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
||||
TuyaBinarySensorEntityDescription(
|
||||
key=DPCode.FEED_STATE,
|
||||
translation_key="feeding",
|
||||
icon="mdi:information",
|
||||
on_value="feeding",
|
||||
),
|
||||
),
|
||||
@ -329,14 +324,12 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
||||
key=f"{DPCode.SHOCK_STATE}_drop",
|
||||
dpcode=DPCode.SHOCK_STATE,
|
||||
translation_key="drop",
|
||||
icon="mdi:icon=package-down",
|
||||
on_value="drop",
|
||||
),
|
||||
TuyaBinarySensorEntityDescription(
|
||||
key=f"{DPCode.SHOCK_STATE}_tilt",
|
||||
dpcode=DPCode.SHOCK_STATE,
|
||||
translation_key="tilt",
|
||||
icon="mdi:spirit-level",
|
||||
on_value="tilt",
|
||||
),
|
||||
),
|
||||
|
@ -23,31 +23,26 @@ BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = {
|
||||
ButtonEntityDescription(
|
||||
key=DPCode.RESET_DUSTER_CLOTH,
|
||||
translation_key="reset_duster_cloth",
|
||||
icon="mdi:restart",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
ButtonEntityDescription(
|
||||
key=DPCode.RESET_EDGE_BRUSH,
|
||||
translation_key="reset_edge_brush",
|
||||
icon="mdi:restart",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
ButtonEntityDescription(
|
||||
key=DPCode.RESET_FILTER,
|
||||
translation_key="reset_filter",
|
||||
icon="mdi:air-filter",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
ButtonEntityDescription(
|
||||
key=DPCode.RESET_MAP,
|
||||
translation_key="reset_map",
|
||||
icon="mdi:map-marker-remove",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
ButtonEntityDescription(
|
||||
key=DPCode.RESET_ROLL_BRUSH,
|
||||
translation_key="reset_roll_brush",
|
||||
icon="mdi:restart",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -57,7 +52,6 @@ BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = {
|
||||
ButtonEntityDescription(
|
||||
key=DPCode.SWITCH_USB6,
|
||||
translation_key="snooze",
|
||||
icon="mdi:sleep",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
373
homeassistant/components/tuya/icons.json
Normal file
373
homeassistant/components/tuya/icons.json
Normal file
@ -0,0 +1,373 @@
|
||||
{
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"carbon_monoxide": {
|
||||
"default": "mdi:molecule-co"
|
||||
},
|
||||
"carbon_dioxide": {
|
||||
"default": "mdi:molecule-co2"
|
||||
},
|
||||
"feeding": {
|
||||
"default": "mdi:information"
|
||||
},
|
||||
"drop": {
|
||||
"default": "mdi:package-down"
|
||||
},
|
||||
"tilt": {
|
||||
"default": "mdi:spirit-level"
|
||||
}
|
||||
},
|
||||
"button": {
|
||||
"reset_duster_cloth": {
|
||||
"default": "mdi:restart"
|
||||
},
|
||||
"reset_edge_brush": {
|
||||
"default": "mdi:restart"
|
||||
},
|
||||
"reset_filter": {
|
||||
"default": "mdi:air-filter"
|
||||
},
|
||||
"reset_map": {
|
||||
"default": "mdi:map-marker-remove"
|
||||
},
|
||||
"reset_roll_brush": {
|
||||
"default": "mdi:restart"
|
||||
},
|
||||
"snooze": {
|
||||
"default": "mdi:sleep"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"heat_preservation_time": {
|
||||
"default": "mdi:timer"
|
||||
},
|
||||
"feed": {
|
||||
"default": "mdi:bowl"
|
||||
},
|
||||
"voice_times": {
|
||||
"default": "mdi:microphone"
|
||||
},
|
||||
"near_detection": {
|
||||
"default": "mdi:signal-distance-variant"
|
||||
},
|
||||
"far_detection": {
|
||||
"default": "mdi:signal-distance-variant"
|
||||
},
|
||||
"water_level": {
|
||||
"default": "mdi:cup-water"
|
||||
},
|
||||
"cook_time": {
|
||||
"default": "mdi:timer"
|
||||
},
|
||||
"volume": {
|
||||
"default": "mdi:volume-high"
|
||||
},
|
||||
"minimum_brightness": {
|
||||
"default": "mdi:lightbulb-outline"
|
||||
},
|
||||
"maximum_brightness": {
|
||||
"default": "mdi:lightbulb-on-outline"
|
||||
},
|
||||
"minimum_brightness_2": {
|
||||
"default": "mdi:lightbulb-outline"
|
||||
},
|
||||
"maximum_brightness_2": {
|
||||
"default": "mdi:lightbulb-on-outline"
|
||||
},
|
||||
"minimum_brightness_3": {
|
||||
"default": "mdi:lightbulb-outline"
|
||||
},
|
||||
"maximum_brightness_3": {
|
||||
"default": "mdi:lightbulb-on-outline"
|
||||
},
|
||||
"move_down": {
|
||||
"default": "mdi:arrow-down-bold"
|
||||
},
|
||||
"move_up": {
|
||||
"default": "mdi:arrow-up-bold"
|
||||
},
|
||||
"down_delay": {
|
||||
"default": "mdi:timer"
|
||||
},
|
||||
"temperature": {
|
||||
"default": "mdi:thermometer"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"cups": {
|
||||
"default": "mdi:numeric"
|
||||
},
|
||||
"concentration": {
|
||||
"default": "mdi:altimeter"
|
||||
},
|
||||
"mode": {
|
||||
"default": "mdi:coffee"
|
||||
},
|
||||
"temperature_level": {
|
||||
"default": "mdi:thermometer-lines"
|
||||
},
|
||||
"weather_delay": {
|
||||
"default": "mdi:weather-cloudy-clock"
|
||||
},
|
||||
"decibel_sensitivity": {
|
||||
"default": "mdi:volume-vibrate"
|
||||
},
|
||||
"record_mode": {
|
||||
"default": "mdi:record-rec"
|
||||
},
|
||||
"basic_nightvision": {
|
||||
"default": "mdi:theme-light-dark"
|
||||
},
|
||||
"basic_anti_flicker": {
|
||||
"default": "mdi:image-outline"
|
||||
},
|
||||
"motion_sensitivity": {
|
||||
"default": "mdi:motion-sensor"
|
||||
},
|
||||
"vacuum_cistern": {
|
||||
"default": "mdi:water-opacity"
|
||||
},
|
||||
"vacuum_collection": {
|
||||
"default": "mdi:air-filter"
|
||||
},
|
||||
"vacuum_mode": {
|
||||
"default": "mdi:layers-outline"
|
||||
},
|
||||
"vertical_fan_angle": {
|
||||
"default": "mdi:format-vertical-align-center"
|
||||
},
|
||||
"horizontal_fan_angle": {
|
||||
"default": "mdi:format-horizontal-align-center"
|
||||
},
|
||||
"countdown": {
|
||||
"default": "mdi:timer-cog-outline"
|
||||
},
|
||||
"curtain_motor_mode": {
|
||||
"default": "mdi:swap-horizontal"
|
||||
},
|
||||
"humidifier_spray_mode": {
|
||||
"default": "mdi:spray"
|
||||
},
|
||||
"humidifier_level": {
|
||||
"default": "mdi:spray"
|
||||
},
|
||||
"humidifier_moodlighting": {
|
||||
"default": "mdi:lightbulb-multiple"
|
||||
},
|
||||
"target_humidity": {
|
||||
"default": "mdi:water-percent"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"battery_state": {
|
||||
"default": "mdi:battery"
|
||||
},
|
||||
"gas": {
|
||||
"default": "mdi:gas-cylinder"
|
||||
},
|
||||
"carbon_monoxide": {
|
||||
"default": "mdi:molecule-co"
|
||||
},
|
||||
"carbon_dioxide": {
|
||||
"default": "mdi:molecule-co2"
|
||||
},
|
||||
"luminosity": {
|
||||
"default": "mdi:brightness-6"
|
||||
},
|
||||
"illuminance": {
|
||||
"default": "mdi:brightness-6"
|
||||
},
|
||||
"smoke_amount": {
|
||||
"default": "mdi:smoke-detector"
|
||||
},
|
||||
"last_amount": {
|
||||
"default": "mdi:counter"
|
||||
},
|
||||
"remaining_time": {
|
||||
"default": "mdi:timer"
|
||||
},
|
||||
"total_watering_time": {
|
||||
"default": "mdi:history"
|
||||
},
|
||||
"cleaning_area": {
|
||||
"default": "mdi:texture-box"
|
||||
},
|
||||
"cleaning_time": {
|
||||
"default": "mdi:progress-clock"
|
||||
},
|
||||
"total_cleaning_area": {
|
||||
"default": "mdi:texture-box"
|
||||
},
|
||||
"total_cleaning_time": {
|
||||
"default": "mdi:history"
|
||||
},
|
||||
"total_cleaning_times": {
|
||||
"default": "mdi:counter"
|
||||
},
|
||||
"duster_cloth_life": {
|
||||
"default": "mdi:ticket-percent-outline"
|
||||
},
|
||||
"side_brush_life": {
|
||||
"default": "mdi:ticket-percent-outline"
|
||||
},
|
||||
"filter_life": {
|
||||
"default": "mdi:ticket-percent-outline"
|
||||
},
|
||||
"rolling_brush_life": {
|
||||
"default": "mdi:ticket-percent-outline"
|
||||
},
|
||||
"last_operation_duration": {
|
||||
"default": "mdi:progress-clock"
|
||||
},
|
||||
"water_level": {
|
||||
"default": "mdi:waves-arrow-up"
|
||||
},
|
||||
"filter_utilization": {
|
||||
"default": "mdi:ticket-percent-outline"
|
||||
},
|
||||
"pm25": {
|
||||
"default": "mdi:molecule"
|
||||
},
|
||||
"total_operating_time": {
|
||||
"default": "mdi:history"
|
||||
},
|
||||
"total_absorption_particles": {
|
||||
"default": "mdi:texture-box"
|
||||
},
|
||||
"air_quality": {
|
||||
"default": "mdi:air-filter"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"start": {
|
||||
"default": "mdi:kettle-steam"
|
||||
},
|
||||
"disinfection": {
|
||||
"default": "mdi:bacteria"
|
||||
},
|
||||
"water": {
|
||||
"default": "mdi:water"
|
||||
},
|
||||
"slow_feed": {
|
||||
"default": "mdi:speedometer-slow"
|
||||
},
|
||||
"filter_reset": {
|
||||
"default": "mdi:filter"
|
||||
},
|
||||
"water_pump_reset": {
|
||||
"default": "mdi:pump"
|
||||
},
|
||||
"reset_of_water_usage_days": {
|
||||
"default": "mdi:water-sync"
|
||||
},
|
||||
"uv_sterilization": {
|
||||
"default": "mdi:lightbulb"
|
||||
},
|
||||
"child_lock": {
|
||||
"default": "mdi:account-lock"
|
||||
},
|
||||
"radio": {
|
||||
"default": "mdi:radio"
|
||||
},
|
||||
"alarm_1": {
|
||||
"default": "mdi:alarm"
|
||||
},
|
||||
"alarm_2": {
|
||||
"default": "mdi:alarm"
|
||||
},
|
||||
"alarm_3": {
|
||||
"default": "mdi:alarm"
|
||||
},
|
||||
"alarm_4": {
|
||||
"default": "mdi:alarm"
|
||||
},
|
||||
"sleep_aid": {
|
||||
"default": "mdi:power-sleep"
|
||||
},
|
||||
"ionizer": {
|
||||
"default": "mdi:minus-circle-outline"
|
||||
},
|
||||
"filter_cartridge_reset": {
|
||||
"default": "mdi:filter"
|
||||
},
|
||||
"humidification": {
|
||||
"default": "mdi:water-percent"
|
||||
},
|
||||
"switch": {
|
||||
"default": "mdi:power"
|
||||
},
|
||||
"do_not_disturb": {
|
||||
"default": "mdi:minus-circle"
|
||||
},
|
||||
"mute_voice": {
|
||||
"default": "mdi:account-voice"
|
||||
},
|
||||
"battery_lock": {
|
||||
"default": "mdi:battery-lock"
|
||||
},
|
||||
"cry_detection": {
|
||||
"default": "mdi:emoticon-cry"
|
||||
},
|
||||
"sound_detection": {
|
||||
"default": "mdi:microphone-outline"
|
||||
},
|
||||
"video_recording": {
|
||||
"default": "mdi:record-rec"
|
||||
},
|
||||
"motion_recording": {
|
||||
"default": "mdi:record-rec"
|
||||
},
|
||||
"privacy_mode": {
|
||||
"default": "mdi:eye-off"
|
||||
},
|
||||
"flip": {
|
||||
"default": "mdi:flip-horizontal"
|
||||
},
|
||||
"time_watermark": {
|
||||
"default": "mdi:watermark"
|
||||
},
|
||||
"wide_dynamic_range": {
|
||||
"default": "mdi:watermark"
|
||||
},
|
||||
"motion_tracking": {
|
||||
"default": "mdi:motion-sensor"
|
||||
},
|
||||
"motion_alarm": {
|
||||
"default": "mdi:motion-sensor"
|
||||
},
|
||||
"energy_saving": {
|
||||
"default": "mdi:leaf"
|
||||
},
|
||||
"open_window_detection": {
|
||||
"default": "mdi:window-open"
|
||||
},
|
||||
"spray": {
|
||||
"default": "mdi:spray"
|
||||
},
|
||||
"voice": {
|
||||
"default": "mdi:account-voice"
|
||||
},
|
||||
"anion": {
|
||||
"default": "mdi:atom"
|
||||
},
|
||||
"oxygen_bar": {
|
||||
"default": "mdi:molecule"
|
||||
},
|
||||
"natural_wind": {
|
||||
"default": "mdi:weather-windy"
|
||||
},
|
||||
"sound": {
|
||||
"default": "mdi:minus-circle"
|
||||
},
|
||||
"reverse": {
|
||||
"default": "mdi:swap-horizontal"
|
||||
},
|
||||
"sleep": {
|
||||
"default": "mdi:power-sleep"
|
||||
},
|
||||
"sterilization": {
|
||||
"default": "mdi:minus-circle-outline"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -38,34 +38,29 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
key=DPCode.TEMP_SET,
|
||||
translation_key="temperature",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.TEMP_SET_F,
|
||||
translation_key="temperature",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.TEMP_BOILING_C,
|
||||
translation_key="temperature_after_boiling",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.TEMP_BOILING_F,
|
||||
translation_key="temperature_after_boiling",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.WARM_TIME,
|
||||
translation_key="heat_preservation_time",
|
||||
icon="mdi:timer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -75,12 +70,10 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.MANUAL_FEED,
|
||||
translation_key="feed",
|
||||
icon="mdi:bowl",
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.VOICE_TIMES,
|
||||
translation_key="voice_times",
|
||||
icon="mdi:microphone",
|
||||
),
|
||||
),
|
||||
# Human Presence Sensor
|
||||
@ -94,13 +87,11 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.NEAR_DETECTION,
|
||||
translation_key="near_detection",
|
||||
icon="mdi:signal-distance-variant",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.FAR_DETECTION,
|
||||
translation_key="far_detection",
|
||||
icon="mdi:signal-distance-variant",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -110,20 +101,17 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.WATER_SET,
|
||||
translation_key="water_level",
|
||||
icon="mdi:cup-water",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.TEMP_SET,
|
||||
translation_key="temperature",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.WARM_TIME,
|
||||
translation_key="heat_preservation_time",
|
||||
icon="mdi:timer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
@ -138,13 +126,11 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.COOK_TEMPERATURE,
|
||||
translation_key="cook_temperature",
|
||||
icon="mdi:thermometer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.COOK_TIME,
|
||||
translation_key="cook_time",
|
||||
icon="mdi:timer",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
@ -160,7 +146,6 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.VOLUME_SET,
|
||||
translation_key="volume",
|
||||
icon="mdi:volume-high",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -179,7 +164,6 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BASIC_DEVICE_VOLUME,
|
||||
translation_key="volume",
|
||||
icon="mdi:volume-high",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -189,37 +173,31 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_1,
|
||||
translation_key="minimum_brightness",
|
||||
icon="mdi:lightbulb-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_1,
|
||||
translation_key="maximum_brightness",
|
||||
icon="mdi:lightbulb-on-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_2,
|
||||
translation_key="minimum_brightness_2",
|
||||
icon="mdi:lightbulb-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_2,
|
||||
translation_key="maximum_brightness_2",
|
||||
icon="mdi:lightbulb-on-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_3,
|
||||
translation_key="minimum_brightness_3",
|
||||
icon="mdi:lightbulb-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_3,
|
||||
translation_key="maximum_brightness_3",
|
||||
icon="mdi:lightbulb-on-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -229,25 +207,21 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_1,
|
||||
translation_key="minimum_brightness",
|
||||
icon="mdi:lightbulb-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_1,
|
||||
translation_key="maximum_brightness",
|
||||
icon="mdi:lightbulb-on-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_2,
|
||||
translation_key="minimum_brightness_2",
|
||||
icon="mdi:lightbulb-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_2,
|
||||
translation_key="maximum_brightness_2",
|
||||
icon="mdi:lightbulb-on-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -265,21 +239,18 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
NumberEntityDescription(
|
||||
key=DPCode.ARM_DOWN_PERCENT,
|
||||
translation_key="move_down",
|
||||
icon="mdi:arrow-down-bold",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.ARM_UP_PERCENT,
|
||||
translation_key="move_up",
|
||||
icon="mdi:arrow-up-bold",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.CLICK_SUSTAIN_TIME,
|
||||
translation_key="down_delay",
|
||||
icon="mdi:timer",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -290,7 +261,6 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
key=DPCode.TEMP,
|
||||
translation_key="temperature",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer-lines",
|
||||
),
|
||||
),
|
||||
# Humidifier
|
||||
@ -300,13 +270,11 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
key=DPCode.TEMP_SET,
|
||||
translation_key="temperature",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer-lines",
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.TEMP_SET_F,
|
||||
translation_key="temperature",
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer-lines",
|
||||
),
|
||||
),
|
||||
}
|
||||
@ -390,10 +358,6 @@ class TuyaNumberEntity(TuyaEntity, NumberEntity):
|
||||
self._attr_device_class = None
|
||||
return
|
||||
|
||||
# If we still have a device class, we should not use an icon
|
||||
if self.device_class:
|
||||
self._attr_icon = None
|
||||
|
||||
# Found unit of measurement, use the standardized Unit
|
||||
# Use the target conversion unit (if set)
|
||||
self._attr_native_unit_of_measurement = (
|
||||
|
@ -33,12 +33,10 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.CUP_NUMBER,
|
||||
translation_key="cups",
|
||||
icon="mdi:numeric",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.CONCENTRATION_SET,
|
||||
translation_key="concentration",
|
||||
icon="mdi:altimeter",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SelectEntityDescription(
|
||||
@ -49,7 +47,6 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.MODE,
|
||||
translation_key="mode",
|
||||
icon="mdi:coffee",
|
||||
),
|
||||
),
|
||||
# Switch
|
||||
@ -72,7 +69,6 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LEVEL,
|
||||
translation_key="temperature_level",
|
||||
icon="mdi:thermometer-lines",
|
||||
),
|
||||
),
|
||||
# Smart Water Timer
|
||||
@ -81,7 +77,6 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.WEATHER_DELAY,
|
||||
translation_key="weather_delay",
|
||||
icon="mdi:weather-cloudy-clock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -109,31 +104,26 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.DECIBEL_SENSITIVITY,
|
||||
icon="mdi:volume-vibrate",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="decibel_sensitivity",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.RECORD_MODE,
|
||||
icon="mdi:record-rec",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="record_mode",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.BASIC_NIGHTVISION,
|
||||
icon="mdi:theme-light-dark",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="basic_nightvision",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.BASIC_ANTI_FLICKER,
|
||||
icon="mdi:image-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="basic_anti_flicker",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.MOTION_SENSITIVITY,
|
||||
icon="mdi:motion-sensor",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="motion_sensitivity",
|
||||
),
|
||||
@ -209,19 +199,16 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.CISTERN,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:water-opacity",
|
||||
translation_key="vacuum_cistern",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COLLECTION_MODE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:air-filter",
|
||||
translation_key="vacuum_collection",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.MODE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:layers-outline",
|
||||
translation_key="vacuum_mode",
|
||||
),
|
||||
),
|
||||
@ -231,25 +218,21 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.FAN_VERTICAL,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:format-vertical-align-center",
|
||||
translation_key="vertical_fan_angle",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.FAN_HORIZONTAL,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:format-horizontal-align-center",
|
||||
translation_key="horizontal_fan_angle",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
translation_key="countdown",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN_SET,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
translation_key="countdown",
|
||||
),
|
||||
),
|
||||
@ -259,7 +242,6 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.CONTROL_BACK_MODE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:swap-horizontal",
|
||||
translation_key="curtain_motor_mode",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
@ -274,31 +256,26 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.SPRAY_MODE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:spray",
|
||||
translation_key="humidifier_spray_mode",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LEVEL,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:spray",
|
||||
translation_key="humidifier_level",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.MOODLIGHTING,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:lightbulb-multiple",
|
||||
translation_key="humidifier_moodlighting",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
translation_key="countdown",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN_SET,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
translation_key="countdown",
|
||||
),
|
||||
),
|
||||
@ -308,13 +285,11 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
translation_key="countdown",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN_SET,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
translation_key="countdown",
|
||||
),
|
||||
),
|
||||
@ -324,14 +299,12 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN_SET,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
translation_key="countdown",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.DEHUMIDITY_SET_ENUM,
|
||||
translation_key="target_humidity",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:water-percent",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
@ -58,7 +58,6 @@ BATTERY_SENSORS: tuple[TuyaSensorEntityDescription, ...] = (
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.BATTERY_STATE,
|
||||
translation_key="battery_state",
|
||||
icon="mdi:battery",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
@ -88,7 +87,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.GAS_SENSOR_VALUE,
|
||||
translation_key="gas",
|
||||
icon="mdi:gas-cylinder",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
@ -112,14 +110,12 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.CO_VALUE,
|
||||
translation_key="carbon_monoxide",
|
||||
icon="mdi:molecule-co",
|
||||
device_class=SensorDeviceClass.CO,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.CO2_VALUE,
|
||||
translation_key="carbon_dioxide",
|
||||
icon="mdi:molecule-co2",
|
||||
device_class=SensorDeviceClass.CO2,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -131,12 +127,10 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.BRIGHT_STATE,
|
||||
translation_key="luminosity",
|
||||
icon="mdi:brightness-6",
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.BRIGHT_VALUE,
|
||||
translation_key="illuminance",
|
||||
icon="mdi:brightness-6",
|
||||
device_class=SensorDeviceClass.ILLUMINANCE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -155,7 +149,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.SMOKE_SENSOR_VALUE,
|
||||
translation_key="smoke_amount",
|
||||
icon="mdi:smoke-detector",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -238,7 +231,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.FEED_REPORT,
|
||||
translation_key="last_amount",
|
||||
icon="mdi:counter",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
),
|
||||
@ -387,7 +379,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.BRIGHT_STATE,
|
||||
translation_key="luminosity",
|
||||
icon="mdi:brightness-6",
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.BRIGHT_VALUE,
|
||||
@ -438,7 +429,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
key=DPCode.REMAIN_TIME,
|
||||
translation_key="remaining_time",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
icon="mdi:timer",
|
||||
),
|
||||
),
|
||||
# PIR Detector
|
||||
@ -512,7 +502,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.GAS_SENSOR_VALUE,
|
||||
name=None,
|
||||
icon="mdi:gas-cylinder",
|
||||
translation_key="gas",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
*BATTERY_SENSORS,
|
||||
@ -523,7 +513,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TIME_USE,
|
||||
translation_key="total_watering_time",
|
||||
icon="mdi:history",
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
@ -658,7 +647,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.SMOKE_SENSOR_VALUE,
|
||||
translation_key="smoke_amount",
|
||||
icon="mdi:smoke-detector",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
@ -858,55 +846,46 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.CLEAN_AREA,
|
||||
translation_key="cleaning_area",
|
||||
icon="mdi:texture-box",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.CLEAN_TIME,
|
||||
translation_key="cleaning_time",
|
||||
icon="mdi:progress-clock",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TOTAL_CLEAN_AREA,
|
||||
translation_key="total_cleaning_area",
|
||||
icon="mdi:texture-box",
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TOTAL_CLEAN_TIME,
|
||||
translation_key="total_cleaning_time",
|
||||
icon="mdi:history",
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TOTAL_CLEAN_COUNT,
|
||||
translation_key="total_cleaning_times",
|
||||
icon="mdi:counter",
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.DUSTER_CLOTH,
|
||||
translation_key="duster_cloth_life",
|
||||
icon="mdi:ticket-percent-outline",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.EDGE_BRUSH,
|
||||
translation_key="side_brush_life",
|
||||
icon="mdi:ticket-percent-outline",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.FILTER_LIFE,
|
||||
translation_key="filter_life",
|
||||
icon="mdi:ticket-percent-outline",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.ROLL_BRUSH,
|
||||
translation_key="rolling_brush_life",
|
||||
icon="mdi:ticket-percent-outline",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
),
|
||||
@ -917,7 +896,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
key=DPCode.TIME_TOTAL,
|
||||
translation_key="last_operation_duration",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:progress-clock",
|
||||
),
|
||||
),
|
||||
# Humidifier
|
||||
@ -945,7 +923,6 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
key=DPCode.LEVEL_CURRENT,
|
||||
translation_key="water_level",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:waves-arrow-up",
|
||||
),
|
||||
),
|
||||
# Air Purifier
|
||||
@ -955,14 +932,12 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
key=DPCode.FILTER,
|
||||
translation_key="filter_utilization",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:ticket-percent-outline",
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.PM25,
|
||||
translation_key="pm25",
|
||||
device_class=SensorDeviceClass.PM25,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
icon="mdi:molecule",
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TEMP,
|
||||
@ -991,21 +966,18 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TOTAL_TIME,
|
||||
translation_key="total_operating_time",
|
||||
icon="mdi:history",
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.TOTAL_PM,
|
||||
translation_key="total_absorption_particles",
|
||||
icon="mdi:texture-box",
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
TuyaSensorEntityDescription(
|
||||
key=DPCode.AIR_QUALITY,
|
||||
translation_key="air_quality",
|
||||
icon="mdi:air-filter",
|
||||
),
|
||||
),
|
||||
# Fan
|
||||
@ -1191,10 +1163,6 @@ class TuyaSensorEntity(TuyaEntity, SensorEntity):
|
||||
self._attr_device_class = None
|
||||
return
|
||||
|
||||
# If we still have a device class, we should not use an icon
|
||||
if self.device_class:
|
||||
self._attr_icon = None
|
||||
|
||||
# Found unit of measurement, use the standardized Unit
|
||||
# Use the target conversion unit (if set)
|
||||
self._attr_native_unit_of_measurement = (
|
||||
|
@ -30,7 +30,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.START,
|
||||
translation_key="start",
|
||||
icon="mdi:kettle-steam",
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.WARM,
|
||||
@ -44,12 +43,10 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.DISINFECTION,
|
||||
translation_key="disinfection",
|
||||
icon="mdi:bacteria",
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.WATER,
|
||||
translation_key="water",
|
||||
icon="mdi:water",
|
||||
),
|
||||
),
|
||||
# Smart Pet Feeder
|
||||
@ -58,7 +55,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SLOW_FEED,
|
||||
translation_key="slow_feed",
|
||||
icon="mdi:speedometer-slow",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -68,13 +64,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.FILTER_RESET,
|
||||
translation_key="filter_reset",
|
||||
icon="mdi:filter",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.PUMP_RESET,
|
||||
translation_key="water_pump_reset",
|
||||
icon="mdi:pump",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
@ -84,13 +78,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.WATER_RESET,
|
||||
translation_key="reset_of_water_usage_days",
|
||||
icon="mdi:water-sync",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.UV,
|
||||
translation_key="uv_sterilization",
|
||||
icon="mdi:lightbulb",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -110,7 +102,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
@ -124,36 +115,30 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_1,
|
||||
translation_key="radio",
|
||||
icon="mdi:radio",
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_2,
|
||||
translation_key="alarm_1",
|
||||
icon="mdi:alarm",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_3,
|
||||
translation_key="alarm_2",
|
||||
icon="mdi:alarm",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_4,
|
||||
translation_key="alarm_3",
|
||||
icon="mdi:alarm",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_5,
|
||||
translation_key="alarm_4",
|
||||
icon="mdi:alarm",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_6,
|
||||
translation_key="sleep_aid",
|
||||
icon="mdi:power-sleep",
|
||||
),
|
||||
),
|
||||
# Two-way temperature and humidity switch
|
||||
@ -177,7 +162,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
@ -256,19 +240,16 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.ANION,
|
||||
translation_key="ionizer",
|
||||
icon="mdi:minus-circle-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.FILTER_RESET,
|
||||
translation_key="filter_cartridge_reset",
|
||||
icon="mdi:filter",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
@ -278,13 +259,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.WET,
|
||||
translation_key="humidification",
|
||||
icon="mdi:water-percent",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.UV,
|
||||
translation_key="uv_sterilization",
|
||||
icon="mdi:minus-circle-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -294,13 +273,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.ANION,
|
||||
translation_key="ionizer",
|
||||
icon="mdi:minus-circle-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -310,13 +287,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH,
|
||||
translation_key="switch",
|
||||
icon="mdi:power",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.START,
|
||||
translation_key="start",
|
||||
icon="mdi:pot-steam",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -326,7 +301,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
@ -404,13 +378,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.ANION,
|
||||
translation_key="ionizer",
|
||||
icon="mdi:minus-circle-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -420,13 +392,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_DISTURB,
|
||||
translation_key="do_not_disturb",
|
||||
icon="mdi:minus-circle",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.VOICE_SWITCH,
|
||||
translation_key="mute_voice",
|
||||
icon="mdi:account-voice",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -435,7 +405,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH,
|
||||
translation_key="switch",
|
||||
icon="mdi:sprinkler-variant",
|
||||
),
|
||||
),
|
||||
# Siren Alarm
|
||||
@ -453,67 +422,56 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.WIRELESS_BATTERYLOCK,
|
||||
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",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.DECIBEL_SWITCH,
|
||||
translation_key="sound_detection",
|
||||
icon="mdi:microphone-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.RECORD_SWITCH,
|
||||
translation_key="video_recording",
|
||||
icon="mdi:record-rec",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.MOTION_RECORD,
|
||||
translation_key="motion_recording",
|
||||
icon="mdi:record-rec",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.BASIC_PRIVATE,
|
||||
translation_key="privacy_mode",
|
||||
icon="mdi:eye-off",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.BASIC_FLIP,
|
||||
translation_key="flip",
|
||||
icon="mdi:flip-horizontal",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.BASIC_OSD,
|
||||
translation_key="time_watermark",
|
||||
icon="mdi:watermark",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.BASIC_WDR,
|
||||
translation_key="wide_dynamic_range",
|
||||
icon="mdi:watermark",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.MOTION_TRACKING,
|
||||
translation_key="motion_tracking",
|
||||
icon="mdi:motion-sensor",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.MOTION_SWITCH,
|
||||
translation_key="motion_alarm",
|
||||
icon="mdi:motion-sensor",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -522,7 +480,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH,
|
||||
translation_key="switch",
|
||||
icon="mdi:cursor-pointer",
|
||||
),
|
||||
),
|
||||
# IoT Switch?
|
||||
@ -551,7 +508,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -561,7 +517,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_SAVE_ENERGY,
|
||||
translation_key="energy_saving",
|
||||
icon="mdi:leaf",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -571,13 +526,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.WINDOW_CHECK,
|
||||
translation_key="open_window_detection",
|
||||
icon="mdi:window-open",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -603,7 +556,6 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.DO_NOT_DISTURB,
|
||||
translation_key="do_not_disturb",
|
||||
icon="mdi:minus-circle-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -617,12 +569,10 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_SPRAY,
|
||||
translation_key="spray",
|
||||
icon="mdi:spray",
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_VOICE,
|
||||
translation_key="voice",
|
||||
icon="mdi:account-voice",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -640,37 +590,31 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.ANION,
|
||||
translation_key="anion",
|
||||
icon="mdi:atom",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.HUMIDIFIER,
|
||||
translation_key="humidification",
|
||||
icon="mdi:air-humidifier",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.OXYGEN,
|
||||
translation_key="oxygen_bar",
|
||||
icon="mdi:molecule",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.FAN_COOL,
|
||||
translation_key="natural_wind",
|
||||
icon="mdi:weather-windy",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.FAN_BEEP,
|
||||
translation_key="sound",
|
||||
icon="mdi:minus-circle",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
translation_key="child_lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -680,13 +624,11 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CONTROL_BACK,
|
||||
translation_key="reverse",
|
||||
icon="mdi:swap-horizontal",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.OPPOSITE,
|
||||
translation_key="reverse",
|
||||
icon="mdi:swap-horizontal",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -696,19 +638,16 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_SOUND,
|
||||
translation_key="voice",
|
||||
icon="mdi:account-voice",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SLEEP,
|
||||
translation_key="sleep",
|
||||
icon="mdi:power-sleep",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.STERILIZATION,
|
||||
translation_key="sterilization",
|
||||
icon="mdi:minus-circle-outline",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user