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