diff --git a/homeassistant/components/tolo/number.py b/homeassistant/components/tolo/number.py index 257b96edd6e..6a9783aacd4 100644 --- a/homeassistant/components/tolo/number.py +++ b/homeassistant/components/tolo/number.py @@ -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 diff --git a/homeassistant/components/tolo/sensor.py b/homeassistant/components/tolo/sensor.py index 5af8abfb117..27aa331c9cf 100644 --- a/homeassistant/components/tolo/sensor.py +++ b/homeassistant/components/tolo/sensor.py @@ -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