mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Remove entity description mixin in Kostal Plenticore (#112898)
This commit is contained in:
parent
d82ffb4e07
commit
067c222bd9
@ -27,9 +27,9 @@ from .helper import PlenticoreDataFormatter, SettingDataUpdateCoordinator
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreNumberEntityDescriptionMixin:
|
||||
"""Define an entity description mixin for number entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class PlenticoreNumberEntityDescription(NumberEntityDescription):
|
||||
"""Describes a Plenticore number entity."""
|
||||
|
||||
module_id: str
|
||||
data_id: str
|
||||
@ -37,13 +37,6 @@ class PlenticoreNumberEntityDescriptionMixin:
|
||||
fmt_to: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreNumberEntityDescription(
|
||||
NumberEntityDescription, PlenticoreNumberEntityDescriptionMixin
|
||||
):
|
||||
"""Describes a Plenticore number entity."""
|
||||
|
||||
|
||||
NUMBER_SETTINGS_DATA = [
|
||||
PlenticoreNumberEntityDescription(
|
||||
key="battery_min_soc",
|
||||
|
@ -20,20 +20,13 @@ from .helper import Plenticore, SelectDataUpdateCoordinator
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreRequiredKeysMixin:
|
||||
"""A class that describes required properties for plenticore select entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class PlenticoreSelectEntityDescription(SelectEntityDescription):
|
||||
"""A class that describes plenticore select entities."""
|
||||
|
||||
module_id: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreSelectEntityDescription(
|
||||
SelectEntityDescription, PlenticoreRequiredKeysMixin
|
||||
):
|
||||
"""A class that describes plenticore select entities."""
|
||||
|
||||
|
||||
SELECT_SETTINGS_DATA = [
|
||||
PlenticoreSelectEntityDescription(
|
||||
module_id="devices:local",
|
||||
|
@ -34,21 +34,14 @@ from .helper import PlenticoreDataFormatter, ProcessDataUpdateCoordinator
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreRequiredKeysMixin:
|
||||
"""A class that describes required properties for plenticore sensor entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class PlenticoreSensorEntityDescription(SensorEntityDescription):
|
||||
"""A class that describes plenticore sensor entities."""
|
||||
|
||||
module_id: str
|
||||
formatter: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreSensorEntityDescription(
|
||||
SensorEntityDescription, PlenticoreRequiredKeysMixin
|
||||
):
|
||||
"""A class that describes plenticore sensor entities."""
|
||||
|
||||
|
||||
SENSOR_PROCESS_DATA = [
|
||||
PlenticoreSensorEntityDescription(
|
||||
module_id="devices:local",
|
||||
|
@ -21,9 +21,9 @@ from .helper import SettingDataUpdateCoordinator
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreRequiredKeysMixin:
|
||||
"""A class that describes required properties for plenticore switch entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class PlenticoreSwitchEntityDescription(SwitchEntityDescription):
|
||||
"""A class that describes plenticore switch entities."""
|
||||
|
||||
module_id: str
|
||||
is_on: str
|
||||
@ -33,13 +33,6 @@ class PlenticoreRequiredKeysMixin:
|
||||
off_label: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PlenticoreSwitchEntityDescription(
|
||||
SwitchEntityDescription, PlenticoreRequiredKeysMixin
|
||||
):
|
||||
"""A class that describes plenticore switch entities."""
|
||||
|
||||
|
||||
SWITCH_SETTINGS_DATA = [
|
||||
PlenticoreSwitchEntityDescription(
|
||||
module_id="devices:local",
|
||||
|
Loading…
x
Reference in New Issue
Block a user