Skip to content

Commit

Permalink
SOURCE_TYPE_GPS deprecated, Issue #15
Browse files Browse the repository at this point in the history
  • Loading branch information
rodpayne committed Apr 18, 2024
1 parent d9b78b3 commit 43e36da
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/person_location/process_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from datetime import datetime, timedelta, timezone
from functools import partial

from homeassistant.components.device_tracker import SourceType
from homeassistant.components.device_tracker.const import (
ATTR_SOURCE_TYPE,
SOURCE_TYPE_GPS,
)
from homeassistant.components.mobile_app.const import (
ATTR_VERTICAL_ACCURACY,
Expand All @@ -23,7 +23,6 @@
STATE_UNAVAILABLE,
STATE_UNKNOWN,
)
from homeassistant.exceptions import ServiceNotFound
from homeassistant.helpers.event import (
track_point_in_time,
)
Expand Down Expand Up @@ -304,7 +303,7 @@ def handle_process_trigger(call):
trigger.entity_id,
target.entity_id,
)
elif triggerSourceType == SOURCE_TYPE_GPS: # gps device?
elif triggerSourceType == SourceType.GPS: # gps device?
if triggerTo != triggerFrom: # did it change zones?
saveThisUpdate = True # gps changing zones is assumed to be new, correct info
_LOGGER.debug(
Expand Down

0 comments on commit 43e36da

Please sign in to comment.