mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17: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
|
from __future__ import annotations
|
||||||
|
|
||||||
@ -27,22 +27,15 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||||||
from .entity import BasePrivateDeviceEntity
|
from .entity import BasePrivateDeviceEntity
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class PrivateDeviceSensorEntityDescriptionRequired:
|
class PrivateDeviceSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Required domain specific fields for sensor entity."""
|
"""Describes sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[
|
value_fn: Callable[
|
||||||
[HomeAssistant, bluetooth.BluetoothServiceInfoBleak], str | int | float | None
|
[HomeAssistant, bluetooth.BluetoothServiceInfoBleak], str | int | float | None
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class PrivateDeviceSensorEntityDescription(
|
|
||||||
SensorEntityDescription, PrivateDeviceSensorEntityDescriptionRequired
|
|
||||||
):
|
|
||||||
"""Describes sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSOR_DESCRIPTIONS = (
|
SENSOR_DESCRIPTIONS = (
|
||||||
PrivateDeviceSensorEntityDescription(
|
PrivateDeviceSensorEntityDescription(
|
||||||
key="rssi",
|
key="rssi",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user