Skip to content

Commit

Permalink
fix: replace deprecated SOURCE_TYPE_GPS with SourceType.GPS (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasbrett authored Feb 28, 2024
1 parent 3c838c9 commit 892c031
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/weenect/device_tracker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Device tracker platform for weenect."""
from typing import List

from homeassistant.components.device_tracker import SOURCE_TYPE_GPS
from homeassistant.components.device_tracker import SourceType
from homeassistant.components.device_tracker.config_entry import TrackerEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, ServiceCall, callback
Expand Down Expand Up @@ -153,9 +153,9 @@ def longitude(self):
return self.coordinator.data[self.id]["position"][0]["longitude"]

@property
def source_type(self):
def source_type(self) -> SourceType:
"""Return the source type, e.g. GPS or router, of the device."""
return SOURCE_TYPE_GPS
return SourceType.GPS

@property
def location_accuracy(self):
Expand Down

0 comments on commit 892c031

Please sign in to comment.