mirror of
https://github.com/home-assistant/core
synced 2024-09-12 15:16:21 +02:00
Remove ipma entity description required fields mixin (#106039)
This commit is contained in:
parent
24191545a1
commit
ed9e738985
@ -23,18 +23,13 @@ from .entity import IPMADevice
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class IPMARequiredKeysMixin:
|
class IPMASensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes a IPMA sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[Location, IPMA_API], Coroutine[Location, IPMA_API, int | None]]
|
value_fn: Callable[[Location, IPMA_API], Coroutine[Location, IPMA_API, int | None]]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class IPMASensorEntityDescription(SensorEntityDescription, IPMARequiredKeysMixin):
|
|
||||||
"""Describes IPMA sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
async def async_retrieve_rcm(location: Location, api: IPMA_API) -> int | None:
|
async def async_retrieve_rcm(location: Location, api: IPMA_API) -> int | None:
|
||||||
"""Retrieve RCM."""
|
"""Retrieve RCM."""
|
||||||
fire_risk: RCM = await location.fire_risk(api)
|
fire_risk: RCM = await location.fire_risk(api)
|
||||||
|
Loading…
Reference in New Issue
Block a user