mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Cleanup source_type type hints in device tracker components (#126592)
This commit is contained in:
parent
61ff40c299
commit
2df6824856
@ -56,7 +56,7 @@ class StarlinkDeviceTrackerEntity(StarlinkEntity, TrackerEntity):
|
||||
entity_description: StarlinkDeviceTrackerEntityDescription
|
||||
|
||||
@property
|
||||
def source_type(self) -> SourceType | str:
|
||||
def source_type(self) -> SourceType:
|
||||
"""Return the source type, eg gps or router, of the device."""
|
||||
return SourceType.GPS
|
||||
|
||||
|
@ -65,7 +65,7 @@ class TeslaFleetDeviceTrackerEntity(
|
||||
return self._attr_longitude
|
||||
|
||||
@property
|
||||
def source_type(self) -> SourceType | str:
|
||||
def source_type(self) -> SourceType:
|
||||
"""Return the source type of the device tracker."""
|
||||
return SourceType.GPS
|
||||
|
||||
|
@ -44,7 +44,7 @@ class TessieDeviceTrackerEntity(TessieEntity, TrackerEntity):
|
||||
super().__init__(vehicle, self.key)
|
||||
|
||||
@property
|
||||
def source_type(self) -> SourceType | str:
|
||||
def source_type(self) -> SourceType:
|
||||
"""Return the source type of the device tracker."""
|
||||
return SourceType.GPS
|
||||
|
||||
|
@ -62,7 +62,7 @@ class VolvoTrackerEntity(VolvoEntity, TrackerEntity):
|
||||
return longitude
|
||||
|
||||
@property
|
||||
def source_type(self) -> SourceType | str:
|
||||
def source_type(self) -> SourceType:
|
||||
"""Return the source type (GPS)."""
|
||||
return SourceType.GPS
|
||||
|
||||
|
@ -69,7 +69,7 @@ class MockScannerEntity(ScannerEntity):
|
||||
self._mac_address = "ad:de:ef:be:ed:fe"
|
||||
|
||||
@property
|
||||
def source_type(self):
|
||||
def source_type(self) -> SourceType:
|
||||
"""Return the source type, eg gps or router, of the device."""
|
||||
return SourceType.ROUTER
|
||||
|
||||
|
@ -162,7 +162,7 @@ class MockTrackerEntity(TrackerEntity):
|
||||
return self._battery_level
|
||||
|
||||
@property
|
||||
def source_type(self) -> SourceType | str:
|
||||
def source_type(self) -> SourceType:
|
||||
"""Return the source type, eg gps or router, of the device."""
|
||||
return SourceType.GPS
|
||||
|
||||
@ -249,7 +249,7 @@ class MockScannerEntity(ScannerEntity):
|
||||
return False
|
||||
|
||||
@property
|
||||
def source_type(self) -> SourceType | str:
|
||||
def source_type(self) -> SourceType:
|
||||
"""Return the source type, eg gps or router, of the device."""
|
||||
return SourceType.ROUTER
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user