mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Remove entity description mixin in Skybell (#112939)
This commit is contained in:
parent
37e0a9d9c7
commit
a1a0738e58
@ -23,20 +23,13 @@ from homeassistant.helpers.typing import StateType
|
|||||||
from .entity import DOMAIN, SkybellEntity
|
from .entity import DOMAIN, SkybellEntity
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class SkybellSensorEntityDescriptionMixIn:
|
class SkybellSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for Skybell sensor."""
|
"""Class to describe a Skybell sensor."""
|
||||||
|
|
||||||
value_fn: Callable[[SkybellDevice], StateType | datetime]
|
value_fn: Callable[[SkybellDevice], StateType | datetime]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class SkybellSensorEntityDescription(
|
|
||||||
SensorEntityDescription, SkybellSensorEntityDescriptionMixIn
|
|
||||||
):
|
|
||||||
"""Class to describe a Skybell sensor."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_TYPES: tuple[SkybellSensorEntityDescription, ...] = (
|
SENSOR_TYPES: tuple[SkybellSensorEntityDescription, ...] = (
|
||||||
SkybellSensorEntityDescription(
|
SkybellSensorEntityDescription(
|
||||||
key="chime_level",
|
key="chime_level",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user