Use shorthand attributes in tesla_fleet device tracker (#126736)
This commit is contained in:
parent
a1906b434f
commit
10b9e3b29c
1 changed files with 0 additions and 13 deletions
|
@ -32,9 +32,6 @@ class TeslaFleetDeviceTrackerEntity(
|
|||
):
|
||||
"""Base class for Tesla Fleet device tracker entities."""
|
||||
|
||||
_attr_latitude: float | None = None
|
||||
_attr_longitude: float | None = None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
vehicle: TeslaFleetVehicleData,
|
||||
|
@ -53,16 +50,6 @@ class TeslaFleetDeviceTrackerEntity(
|
|||
self._attr_latitude = state.attributes.get("latitude")
|
||||
self._attr_longitude = state.attributes.get("longitude")
|
||||
|
||||
@property
|
||||
def latitude(self) -> float | None:
|
||||
"""Return latitude value of the device."""
|
||||
return self._attr_latitude
|
||||
|
||||
@property
|
||||
def longitude(self) -> float | None:
|
||||
"""Return longitude value of the device."""
|
||||
return self._attr_longitude
|
||||
|
||||
|
||||
class TeslaFleetDeviceTrackerLocationEntity(TeslaFleetDeviceTrackerEntity):
|
||||
"""Vehicle Location device tracker Class."""
|
||||
|
|
Loading…
Add table
Reference in a new issue