Remove entity description mixin in Private BLE Device (#112922)

This commit is contained in:
Joost Lekkerkerker 2024-03-10 15:21:12 +01:00 committed by GitHub
parent 34d316e7b5
commit 201f733394
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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",