mirror of
https://github.com/home-assistant/core.git
synced 2026-09-14 18:25:47 -05:00
Remove entity description mixin in Tolo (#112951)
This commit is contained in:
@@ -19,20 +19,13 @@ from . import ToloSaunaCoordinatorEntity, ToloSaunaUpdateCoordinator
|
||||
from .const import DOMAIN, FAN_TIMER_MAX, POWER_TIMER_MAX, SALT_BATH_TIMER_MAX
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ToloNumberEntityDescriptionBase:
|
||||
"""Required values when describing TOLO Number entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class ToloNumberEntityDescription(NumberEntityDescription):
|
||||
"""Class describing TOLO Number entities."""
|
||||
|
||||
getter: Callable[[SettingsInfo], int | None]
|
||||
setter: Callable[[ToloClient, int | None], Any]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ToloNumberEntityDescription(
|
||||
NumberEntityDescription, ToloNumberEntityDescriptionBase
|
||||
):
|
||||
"""Class describing TOLO Number entities."""
|
||||
|
||||
entity_category = EntityCategory.CONFIG
|
||||
native_min_value = 0
|
||||
native_step = 1
|
||||
|
||||
@@ -27,20 +27,13 @@ from . import ToloSaunaCoordinatorEntity, ToloSaunaUpdateCoordinator
|
||||
from .const import DOMAIN
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ToloSensorEntityDescriptionBase:
|
||||
"""Required values when describing TOLO Sensor entities."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class ToloSensorEntityDescription(SensorEntityDescription):
|
||||
"""Class describing TOLO Sensor entities."""
|
||||
|
||||
getter: Callable[[StatusInfo], int | None]
|
||||
availability_checker: Callable[[SettingsInfo, StatusInfo], bool] | None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ToloSensorEntityDescription(
|
||||
SensorEntityDescription, ToloSensorEntityDescriptionBase
|
||||
):
|
||||
"""Class describing TOLO Sensor entities."""
|
||||
|
||||
state_class = SensorStateClass.MEASUREMENT
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user