Skip to content

Commit

Permalink
Remove sun entity description required fields mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede committed Dec 16, 2023
1 parent 9c134c6 commit 9bfe146
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
class SunEntityDescriptionMixin:
"""Mixin for required Sun base description keys."""
@dataclass(kw_only=True)
class SunSensorEntityDescription(SensorEntityDescription):
"""Describes a Sun sensor entity."""

value_fn: Callable[[Sun], StateType | datetime]
signal: str


@dataclass
class SunSensorEntityDescription(SensorEntityDescription, SunEntityDescriptionMixin):
"""Describes Sun sensor entity."""


SENSOR_TYPES: tuple[SunSensorEntityDescription, ...] = (
SunSensorEntityDescription(
key="next_dawn",
Expand Down

0 comments on commit 9bfe146

Please sign in to comment.