homeassistant-phonetrack icon indicating copy to clipboard operation
homeassistant-phonetrack copied to clipboard

Deprecation notice

Open jose1711 opened this issue 1 year ago • 14 comments

Latest HA reports:

SOURCE_TYPE_GPS was used from phonetrack, this is a deprecated constant which will be removed in HA Core 2025.1. Use
SourceType.GPS instead, please report it to the author of the 'phonetrack' custom integration

jose1711 avatar Feb 03 '24 20:02 jose1711

@jose1711 - I noticed the same thing, played with it today.

If you edit the device_tracker.py and change two lines: Line 12 to be "SourceType," Line 112 to be "source_type=GPS,"

c2bull avatar Mar 17 '24 20:03 c2bull

@c2bull Thank you, however it looks like maintainer lost interest in this project.

jose1711 avatar Mar 17 '24 20:03 jose1711

I do agree, but it looks like this easy change should keep it working when the new HA core comes out

c2bull avatar Mar 17 '24 20:03 c2bull

@c2bull - just a little correction:

Line 12 to be "SourceType," Line 112 to be "source_type=SourceType.GPS,"

tslpre avatar Mar 19 '24 10:03 tslpre

When I tried line 112 to be SourceType.GPS it ran into an error on start. Also when I looked at the developer doc at :

https://developers.home-assistant.io/docs/core/entity/device-tracker/

it shows the following (just the word GPS or Router is what you should use as the source_type):

source_type SourceType Required The source type, eg gps or router, of the device.

c2bull avatar Mar 20 '24 15:03 c2bull

I went ahead and created a pull request with the updates that work for me. Hopefully @j1nx will get a look at them before the source type change is required.

c2bull avatar Mar 20 '24 16:03 c2bull

@c2bull - just a little correction:

Line 12 to be "SourceType," Line 112 to be "source_type=SourceType.GPS,"

Works for me in 2024.6.2

dbiczo avatar Jun 13 '24 09:06 dbiczo

@j1nx - the above comment by @tslpre is correct, line 123 of the device_tracker.py should be:

source_type=SourceType.GPS,

(while just GPS was working for me a for a while it recently broke, this is the correct fix)

c2bull avatar Jun 13 '24 18:06 c2bull

@c2bull I just merged some open PR's. Does this fix the issue at hand?

Secondly; As stated above. I am currently swamped with development and other tasks related to OpenVoiceOS project and although HomeAssistant integration will also be part of that project together with Nextcloud integration for CalDav, so at some point in time this repo becomes interesting for me again. However, that still takes quite some time and I am more then happy to handover this repository to anyone that wants to take it further.

If anyone is interested in taking over this repository under his account, please feel free to reach out to me.

j1nx avatar Jun 14 '24 07:06 j1nx

Hi @j1nx - I appreciate you coming back to the project and doing the merges. I just created a new pull request that should set the source_type to what HA now requires. Apologies for having to do the re-work.

c2bull avatar Jun 19 '24 14:06 c2bull

All good and no worries.

PR is merged. Thx

j1nx avatar Jun 19 '24 14:06 j1nx

Hello. I am here because my phonetrack integration suddenly stopped working. I checked line 12 and 123 device_tracker.py both on my Home Assistant and in this repository. Line 123 is OK (source_type=SourceType.GPS). Line 12 is not (SOURCE_TYPE). I corrected line 12 -> SourceType and it's seems OK now for me :+1: So I think this is still to be fixed on this repository.

chrisaga avatar Jul 05 '24 09:07 chrisaga

That should be covert via #10, but as mentioned above, @j1nx is busy so it might take a while to get merged

the01 avatar Jul 05 '24 10:07 the01

Merged, so should be fixed again then.

j1nx avatar Jul 09 '24 10:07 j1nx