Consistent entity configuration for my-PV integration boost entities (#183901)

This commit is contained in:
rrooggiieerr
2026-10-02 12:33:36 +02:00
committed by GitHub
parent c019f5849e
commit 0646c70c77
5 changed files with 7 additions and 4 deletions
+2
View File
@@ -20,10 +20,12 @@ from .entity import MyPVSetupEntity
NUMBER_DESCRIPTIONS: Final[dict[str, dict[str, Any]]] = {
"bsttemp": {
"device_class": NumberDeviceClass.TEMPERATURE,
"entity_category": EntityCategory.CONFIG,
"translation_key": "ww1boost",
},
"ww1boost": {
"device_class": NumberDeviceClass.TEMPERATURE,
"entity_category": EntityCategory.CONFIG,
"translation_key": "ww1boost",
},
"ww_boost_h": {
-1
View File
@@ -28,7 +28,6 @@ async def async_setup_entry(
key="bstmode",
entity_category=EntityCategory.CONFIG,
translation_key="bstmode",
entity_registry_enabled_default=False,
options=list(config.get("options", {}).keys()),
)
entities.append(
+2
View File
@@ -7,6 +7,7 @@ from homeassistant.components.switch import (
SwitchEntity,
SwitchEntityDescription,
)
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -29,6 +30,7 @@ async def async_setup_entry(
if config and config.get("type") == "boolean":
entity_description = SwitchEntityDescription(
key="bstmode",
entity_category=EntityCategory.CONFIG,
device_class=SwitchDeviceClass.SWITCH,
translation_key="bstmode",
)
@@ -17,7 +17,7 @@
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'number.my_pv_ac_elwa_2_boost_target_temperature',
'has_entity_name': True,
'hidden_by': None,
@@ -78,7 +78,7 @@
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'number.my_pv_ac_elwa_2_boost_target_temperature_2',
'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.my_pv_ac_elwa_2_boost_mode',
'has_entity_name': True,
'hidden_by': None,