Remove unnecessary OpenUV entity description mixins (#108195)
This commit is contained in:
parent
10014838ef
commit
858004628e
1 changed files with 3 additions and 10 deletions
|
@ -71,20 +71,13 @@ def get_uv_label(uv_index: int) -> str:
|
|||
return label.value
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class OpenUvSensorEntityDescriptionMixin:
|
||||
"""Define a mixin for OpenUV sensor descriptions."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class OpenUvSensorEntityDescription(SensorEntityDescription):
|
||||
"""Define a class that describes OpenUV sensor entities."""
|
||||
|
||||
value_fn: Callable[[dict[str, Any]], int | str]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class OpenUvSensorEntityDescription(
|
||||
SensorEntityDescription, OpenUvSensorEntityDescriptionMixin
|
||||
):
|
||||
"""Define a class that describes OpenUV sensor entities."""
|
||||
|
||||
|
||||
SENSOR_DESCRIPTIONS = (
|
||||
OpenUvSensorEntityDescription(
|
||||
key=TYPE_CURRENT_OZONE_LEVEL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue