mirror of
https://github.com/home-assistant/core.git
synced 2026-10-06 14:29:21 -04:00
Consistent entity configuration for my-PV integration boost entities (#183901)
This commit is contained in:
@@ -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": {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user