Skip to content

Commit

Permalink
Remove sun entity description required fields mixin (#105848)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede authored Dec 19, 2023
1 parent ef59394 commit bb6f78d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions homeassistant/components/sun/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,14 @@
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",
Expand Down

0 comments on commit bb6f78d

Please sign in to comment.