Use Final type only when needed in Tractive (#57000)
This commit is contained in:
parent
1488019cd9
commit
946a265c9e
6 changed files with 27 additions and 28 deletions
|
@ -1,7 +1,7 @@
|
|||
"""Support for Tractive binary sensors."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_BATTERY_CHARGING,
|
||||
|
@ -24,7 +24,7 @@ from .const import (
|
|||
)
|
||||
from .entity import TractiveEntity
|
||||
|
||||
TRACKERS_WITH_BUILTIN_BATTERY: Final = ("TRNJA4", "TRAXL1")
|
||||
TRACKERS_WITH_BUILTIN_BATTERY = ("TRNJA4", "TRAXL1")
|
||||
|
||||
|
||||
class TractiveBinarySensor(TractiveEntity, BinarySensorEntity):
|
||||
|
@ -73,7 +73,7 @@ class TractiveBinarySensor(TractiveEntity, BinarySensorEntity):
|
|||
)
|
||||
|
||||
|
||||
SENSOR_TYPE: Final = BinarySensorEntityDescription(
|
||||
SENSOR_TYPE = BinarySensorEntityDescription(
|
||||
key=ATTR_BATTERY_CHARGING,
|
||||
name="Battery Charging",
|
||||
device_class=DEVICE_CLASS_BATTERY_CHARGING,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue