mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove entity description mixin in iBeacon (#112779)
This commit is contained in:
parent
bfd9199ad9
commit
cf5b11576b
@ -24,18 +24,13 @@ from .coordinator import IBeaconCoordinator
|
|||||||
from .entity import IBeaconEntity
|
from .entity import IBeaconEntity
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class IBeaconRequiredKeysMixin:
|
class IBeaconSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes iBeacon sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[iBeaconAdvertisement], str | int | None]
|
value_fn: Callable[[iBeaconAdvertisement], str | int | None]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class IBeaconSensorEntityDescription(SensorEntityDescription, IBeaconRequiredKeysMixin):
|
|
||||||
"""Describes iBeacon sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_DESCRIPTIONS = (
|
SENSOR_DESCRIPTIONS = (
|
||||||
IBeaconSensorEntityDescription(
|
IBeaconSensorEntityDescription(
|
||||||
key="rssi",
|
key="rssi",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user