From f0d4b7f682d12f78f10cec9472162de691bcecd4 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 30 Dec 2023 12:41:25 +0100 Subject: [PATCH] Update device_tracker.py fix for #249 --- custom_components/skodaconnect/device_tracker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/skodaconnect/device_tracker.py b/custom_components/skodaconnect/device_tracker.py index 185a9c0..1ad6087 100644 --- a/custom_components/skodaconnect/device_tracker.py +++ b/custom_components/skodaconnect/device_tracker.py @@ -3,7 +3,7 @@ """ import logging -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.helpers.dispatcher import async_dispatcher_connect from homeassistant.util import slugify @@ -54,7 +54,7 @@ async def see_vehicle(): await async_see( dev_id=dev_id, host_name=host_name, - source_type=SOURCE_TYPE_GPS, + source_type=SourceType.GPS, gps=instrument.state, icon="mdi:car", ) @@ -78,7 +78,7 @@ def longitude(self) -> float: @property def source_type(self): """Return the source type, eg gps or router, of the device.""" - return SOURCE_TYPE_GPS + return SourceType.GPS @property def force_update(self):