mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove sun entity description required fields mixin (#105848)
This commit is contained in:
parent
ef59394ef4
commit
bb6f78dcc4
@ -26,19 +26,14 @@ from .const import DOMAIN, SIGNAL_EVENTS_CHANGED, SIGNAL_POSITION_CHANGED
|
||||
ENTITY_ID_SENSOR_FORMAT = SENSOR_DOMAIN + ".sun_{}"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SunEntityDescriptionMixin:
|
||||
"""Mixin for required Sun base description keys."""
|
||||
@dataclass(kw_only=True, frozen=True)
|
||||
class SunSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes a Sun sensor entity."""
|
||||
|
||||
value_fn: Callable[[Sun], StateType | datetime]
|
||||
signal: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SunSensorEntityDescription(SensorEntityDescription, SunEntityDescriptionMixin):
|
||||
"""Describes Sun sensor entity."""
|
||||
|
||||
|
||||
SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
|
||||
SunSensorEntityDescription(
|
||||
key="next_dawn",
|
||||
|
Loading…
x
Reference in New Issue
Block a user