homeassistant-phonetrack
homeassistant-phonetrack copied to clipboard
Deprecation notice
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 - 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 Thank you, however it looks like maintainer lost interest in this project.
I do agree, but it looks like this easy change should keep it working when the new HA core comes out
@c2bull - just a little correction:
Line 12 to be "SourceType," Line 112 to be "source_type=SourceType.GPS,"
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.
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 - just a little correction:
Line 12 to be "SourceType," Line 112 to be "source_type=SourceType.GPS,"
Works for me in 2024.6.2
@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 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.
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.
All good and no worries.
PR is merged. Thx
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.
That should be covert via #10, but as mentioned above, @j1nx is busy so it might take a while to get merged
Merged, so should be fixed again then.