mirror of
https://github.com/home-assistant/core.git
synced 2026-09-27 18:08:37 -04:00
Add missing entity category in Midea (#182414)
This commit is contained in:
@@ -87,6 +87,7 @@ BINARY_SENSORS: list[BinarySensorEntityDescription] = [
|
||||
key="arofene_link",
|
||||
translation_key="arofene_link",
|
||||
device_class=BinarySensorDeviceClass.PLUG,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
BinarySensorEntityDescription(
|
||||
key="header_exist",
|
||||
|
||||
@@ -13,7 +13,7 @@ from homeassistant.components.number import (
|
||||
NumberEntity,
|
||||
NumberEntityDescription,
|
||||
)
|
||||
from homeassistant.const import UnitOfMass, UnitOfTime, UnitOfVolume
|
||||
from homeassistant.const import EntityCategory, UnitOfMass, UnitOfTime, UnitOfVolume
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
|
||||
@@ -64,6 +64,7 @@ NUMBERS: list[MideaNumberEntityDescription] = [
|
||||
native_max_value=360,
|
||||
native_step=1,
|
||||
native_unit_of_measurement=UnitOfTime.DAYS,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaNumberEntityDescription(
|
||||
key="water_hardness",
|
||||
@@ -72,6 +73,7 @@ NUMBERS: list[MideaNumberEntityDescription] = [
|
||||
native_min_value=0,
|
||||
native_max_value=65535,
|
||||
native_step=1,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaNumberEntityDescription(
|
||||
key="flushing_days",
|
||||
@@ -82,6 +84,7 @@ NUMBERS: list[MideaNumberEntityDescription] = [
|
||||
native_max_value=99,
|
||||
native_step=1,
|
||||
native_unit_of_measurement=UnitOfTime.DAYS,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaNumberEntityDescription(
|
||||
key="leak_water_protection_value",
|
||||
@@ -92,6 +95,7 @@ NUMBERS: list[MideaNumberEntityDescription] = [
|
||||
native_max_value=2550,
|
||||
native_step=50,
|
||||
native_unit_of_measurement=UnitOfVolume.LITERS,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaNumberEntityDescription(
|
||||
key="salt_setting",
|
||||
|
||||
@@ -69,7 +69,7 @@ rules:
|
||||
dynamic-devices:
|
||||
status: exempt
|
||||
comment: One config entry per physical device, no hub.
|
||||
entity-category: todo
|
||||
entity-category: done
|
||||
entity-device-class: done
|
||||
entity-disabled-by-default: done
|
||||
entity-translations: done
|
||||
|
||||
@@ -6,6 +6,7 @@ from typing import cast, override
|
||||
from midealocal.const import DeviceType
|
||||
|
||||
from homeassistant.components.select import SelectEntity, SelectEntityDescription
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
|
||||
@@ -106,6 +107,7 @@ SELECTS: list[MideaSelectEntityDescription] = [
|
||||
translation_key="screen_display",
|
||||
models=[DeviceType.FC, DeviceType.FD],
|
||||
options_attribute="screen_displays",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ from typing import Any, override
|
||||
from midealocal.const import DeviceType
|
||||
|
||||
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
|
||||
@@ -28,11 +29,13 @@ SWITCHES: list[MideaSwitchEntityDescription] = [
|
||||
translation_key="pump",
|
||||
models=[DeviceType.A1],
|
||||
capability="pump",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="aux_heating",
|
||||
translation_key="aux_heating",
|
||||
models=[DeviceType.AC, DeviceType.CC, DeviceType.CF],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="child_lock",
|
||||
@@ -48,36 +51,43 @@ SWITCHES: list[MideaSwitchEntityDescription] = [
|
||||
DeviceType.FB,
|
||||
DeviceType.FC,
|
||||
],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="prompt_tone",
|
||||
translation_key="prompt_tone",
|
||||
models=[DeviceType.AC],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="screen_display",
|
||||
translation_key="screen_display",
|
||||
models=[DeviceType.AC],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="out_silent",
|
||||
translation_key="out_silent",
|
||||
models=[DeviceType.AC],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="smart_eye",
|
||||
translation_key="smart_eye",
|
||||
models=[DeviceType.AC],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="anion",
|
||||
translation_key="anion",
|
||||
models=[DeviceType.AC],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="sound",
|
||||
translation_key="sound",
|
||||
models=[DeviceType.AC],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="self_clean",
|
||||
@@ -88,26 +98,31 @@ SWITCHES: list[MideaSwitchEntityDescription] = [
|
||||
key="disinfect",
|
||||
translation_key="disinfect",
|
||||
models=[DeviceType.C3],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="tbh",
|
||||
translation_key="tbh",
|
||||
models=[DeviceType.C3],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="zone1_curve",
|
||||
translation_key="zone1_curve",
|
||||
models=[DeviceType.C3],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="zone2_curve",
|
||||
translation_key="zone2_curve",
|
||||
models=[DeviceType.C3],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="night_light",
|
||||
translation_key="night_light",
|
||||
models=[DeviceType.CC],
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
MideaSwitchEntityDescription(
|
||||
key="ai_switch",
|
||||
|
||||
@@ -4,6 +4,7 @@ from datetime import time
|
||||
from typing import cast, override
|
||||
|
||||
from homeassistant.components.time import TimeEntity, TimeEntityDescription
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
|
||||
|
||||
@@ -14,7 +15,9 @@ PARALLEL_UPDATES = 0
|
||||
|
||||
TIMES: list[TimeEntityDescription] = [
|
||||
TimeEntityDescription(
|
||||
key="timing_regeneration", translation_key="timing_regeneration"
|
||||
key="timing_regeneration",
|
||||
translation_key="timing_regeneration",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.heat_pump_water_heater_vacation_days',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -255,7 +255,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.water_drinking_appliance_flushing_days',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -316,7 +316,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.water_drinking_appliance_leak_water_protection_value',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -438,7 +438,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.water_drinking_appliance_water_hardness',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
||||
@@ -816,7 +816,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'select',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'select.air_purifier_screen_display',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -944,7 +944,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'select',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'select.humidifier_screen_display',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.dehumidifier_pump',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -62,7 +62,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.air_conditioner_anion',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -112,7 +112,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.air_conditioner_auxiliary_heating',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -162,7 +162,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.air_conditioner_outdoor_silent_mode',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -212,7 +212,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.air_conditioner_prompt_tone',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -262,7 +262,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.air_conditioner_screen_display',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -362,7 +362,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.air_conditioner_smart_eye',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -412,7 +412,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.air_conditioner_sound',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -462,7 +462,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.toilet_child_lock',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -512,7 +512,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.heat_pump_wi_fi_controller_disinfect',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -562,7 +562,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.heat_pump_wi_fi_controller_tbh',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -612,7 +612,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.heat_pump_wi_fi_controller_zone_1_curve',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -662,7 +662,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.heat_pump_wi_fi_controller_zone_2_curve',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -712,7 +712,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.mdv_wi_fi_controller_auxiliary_heating',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -762,7 +762,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.mdv_wi_fi_controller_night_light',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -812,7 +812,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.heat_pump_auxiliary_heating',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'time',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'time.water_drinking_appliance_regeneration_time',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -62,7 +62,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'time',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'time.water_drinking_appliance_regeneration_time',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -112,7 +112,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'time',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'time.water_drinking_appliance_regeneration_time',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -162,7 +162,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'time',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'time.water_drinking_appliance_regeneration_time',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -212,7 +212,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'time',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'time.water_drinking_appliance_regeneration_time',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -262,7 +262,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'time',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'time.water_drinking_appliance_regeneration_time',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
@@ -312,7 +312,7 @@
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'time',
|
||||
'entity_category': None,
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'time.water_drinking_appliance_regeneration_time',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
|
||||
Reference in New Issue
Block a user