Remove entity description mixin in Steamist (#112944)
This commit is contained in:
parent
1bc6277c47
commit
ff88c46658
1 changed files with 3 additions and 10 deletions
|
@ -31,20 +31,13 @@ UNIT_MAPPINGS = {
|
|||
}
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SteamistSensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class SteamistSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes a Steamist sensor entity."""
|
||||
|
||||
value_fn: Callable[[SteamistStatus], int | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SteamistSensorEntityDescription(
|
||||
SensorEntityDescription, SteamistSensorEntityDescriptionMixin
|
||||
):
|
||||
"""Describes a Steamist sensor entity."""
|
||||
|
||||
|
||||
SENSORS: tuple[SteamistSensorEntityDescription, ...] = (
|
||||
SteamistSensorEntityDescription(
|
||||
key=_KEY_MINUTES_REMAIN,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue