Flume code quality improvments (#79815)
parent
b28ad1282a
commit
f43c802a03
|
@ -33,6 +33,11 @@ from .coordinator import (
|
|||
from .entity import FlumeEntity
|
||||
from .util import get_valid_flume_devices
|
||||
|
||||
BINARY_SENSOR_DESCRIPTION_CONNECTED = BinarySensorEntityDescription(
|
||||
name="Connected",
|
||||
key="connected",
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class FlumeBinarySensorRequiredKeysMixin:
|
||||
|
@ -93,10 +98,7 @@ async def async_setup_entry(
|
|||
|
||||
connection_sensor = FlumeConnectionBinarySensor(
|
||||
coordinator=connection_coordinator,
|
||||
description=BinarySensorEntityDescription(
|
||||
name="Connected",
|
||||
key="connected",
|
||||
),
|
||||
description=BINARY_SENSOR_DESCRIPTION_CONNECTED,
|
||||
device_id=device_id,
|
||||
location_name=device_location_name,
|
||||
is_bridge=(device[KEY_DEVICE_TYPE] is FLUME_TYPE_BRIDGE),
|
||||
|
|
|
@ -10,7 +10,7 @@ from homeassistant.helpers.update_coordinator import (
|
|||
from .const import DOMAIN
|
||||
|
||||
|
||||
class FlumeEntity(CoordinatorEntity[DataUpdateCoordinator]):
|
||||
class FlumeEntity(CoordinatorEntity[DataUpdateCoordinator[None]]):
|
||||
"""Base entity class."""
|
||||
|
||||
_attr_attribution = "Data provided by Flume API"
|
||||
|
|
Loading…
Reference in New Issue