Cleanup source_type type hints in device tracker components (#126592)

This commit is contained in:
epenet 2024-09-24 08:54:55 +02:00 committed by GitHub
parent 61ff40c299
commit 2df6824856
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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