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__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class EcobeeNumberEntityDescriptionBase:
|
class EcobeeNumberEntityDescription(NumberEntityDescription):
|
||||||
"""Required values when describing Ecobee number entities."""
|
"""Class describing Ecobee number entities."""
|
||||||
|
|
||||||
ecobee_setting_key: str
|
ecobee_setting_key: str
|
||||||
set_fn: Callable[[EcobeeData, int, int], Awaitable]
|
set_fn: Callable[[EcobeeData, int, int], Awaitable]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class EcobeeNumberEntityDescription(
|
|
||||||
NumberEntityDescription, EcobeeNumberEntityDescriptionBase
|
|
||||||
):
|
|
||||||
"""Class describing Ecobee number entities."""
|
|
||||||
|
|
||||||
|
|
||||||
VENTILATOR_NUMBERS = (
|
VENTILATOR_NUMBERS = (
|
||||||
EcobeeNumberEntityDescription(
|
EcobeeNumberEntityDescription(
|
||||||
key="home",
|
key="home",
|
||||||
|
@ -25,20 +25,13 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||||||
from .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
|
from .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class EcobeeSensorEntityDescriptionMixin:
|
class EcobeeSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Represent the required ecobee entity description attributes."""
|
"""Represent the ecobee sensor entity description."""
|
||||||
|
|
||||||
runtime_key: str | None
|
runtime_key: str | None
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class EcobeeSensorEntityDescription(
|
|
||||||
SensorEntityDescription, EcobeeSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Represent the ecobee sensor entity description."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_TYPES: tuple[EcobeeSensorEntityDescription, ...] = (
|
SENSOR_TYPES: tuple[EcobeeSensorEntityDescription, ...] = (
|
||||||
EcobeeSensorEntityDescription(
|
EcobeeSensorEntityDescription(
|
||||||
key="temperature",
|
key="temperature",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user