mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Remove entity description mixin in Private BLE Device (#112922)
This commit is contained in:
parent
34d316e7b5
commit
201f733394
@ -1,4 +1,4 @@
|
||||
"""Support for iBeacon device sensors."""
|
||||
"""Support for Private BLE Device sensors."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@ -27,22 +27,15 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from .entity import BasePrivateDeviceEntity
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PrivateDeviceSensorEntityDescriptionRequired:
|
||||
"""Required domain specific fields for sensor entity."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class PrivateDeviceSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes sensor entity."""
|
||||
|
||||
value_fn: Callable[
|
||||
[HomeAssistant, bluetooth.BluetoothServiceInfoBleak], str | int | float | None
|
||||
]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PrivateDeviceSensorEntityDescription(
|
||||
SensorEntityDescription, PrivateDeviceSensorEntityDescriptionRequired
|
||||
):
|
||||
"""Describes sensor entity."""
|
||||
|
||||
|
||||
SENSOR_DESCRIPTIONS = (
|
||||
PrivateDeviceSensorEntityDescription(
|
||||
key="rssi",
|
||||
|
Loading…
x
Reference in New Issue
Block a user