mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Remove entity description mixin in Ecobee (#112408)
This commit is contained in:
parent
a626a698f0
commit
4a7eab92bb
@ -18,21 +18,14 @@ from .entity import EcobeeBaseEntity
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcobeeNumberEntityDescriptionBase:
|
||||
"""Required values when describing Ecobee number entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class EcobeeNumberEntityDescription(NumberEntityDescription):
|
||||
"""Class describing Ecobee number entities."""
|
||||
|
||||
ecobee_setting_key: str
|
||||
set_fn: Callable[[EcobeeData, int, int], Awaitable]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcobeeNumberEntityDescription(
|
||||
NumberEntityDescription, EcobeeNumberEntityDescriptionBase
|
||||
):
|
||||
"""Class describing Ecobee number entities."""
|
||||
|
||||
|
||||
VENTILATOR_NUMBERS = (
|
||||
EcobeeNumberEntityDescription(
|
||||
key="home",
|
||||
|
@ -25,20 +25,13 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcobeeSensorEntityDescriptionMixin:
|
||||
"""Represent the required ecobee entity description attributes."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class EcobeeSensorEntityDescription(SensorEntityDescription):
|
||||
"""Represent the ecobee sensor entity description."""
|
||||
|
||||
runtime_key: str | None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class EcobeeSensorEntityDescription(
|
||||
SensorEntityDescription, EcobeeSensorEntityDescriptionMixin
|
||||
):
|
||||
"""Represent the ecobee sensor entity description."""
|
||||
|
||||
|
||||
SENSOR_TYPES: tuple[EcobeeSensorEntityDescription, ...] = (
|
||||
EcobeeSensorEntityDescription(
|
||||
key="temperature",
|
||||
|
Loading…
x
Reference in New Issue
Block a user