mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +00:00
Remove unnecessary OpenUV entity description mixins (#108195)
This commit is contained in:
parent
10014838ef
commit
858004628e
@ -71,20 +71,13 @@ def get_uv_label(uv_index: int) -> str:
|
|||||||
return label.value
|
return label.value
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class OpenUvSensorEntityDescriptionMixin:
|
class OpenUvSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Define a mixin for OpenUV sensor descriptions."""
|
"""Define a class that describes OpenUV sensor entities."""
|
||||||
|
|
||||||
value_fn: Callable[[dict[str, Any]], int | str]
|
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 = (
|
SENSOR_DESCRIPTIONS = (
|
||||||
OpenUvSensorEntityDescription(
|
OpenUvSensorEntityDescription(
|
||||||
key=TYPE_CURRENT_OZONE_LEVEL,
|
key=TYPE_CURRENT_OZONE_LEVEL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user