Skip to content

Releases: pnbruckner/ha-google-maps

Use UTC datetimes internally & make last_seen attr HA's local tz

20 Nov 15:15
Compare
Choose a tag to compare

What's Changed

  • Python datetime object comparisons and math don't work as expected when the objects are aware and have the same tzinfo attribute. Basically, the fold attribute is ignored in this case, which can lead to wrong results. Avoid this problem by using aware times in UTC internally. Only use local time zone for user visible attributes.
  • Also, use HA's local time zone instead of the OS's time zone.

Full Changelog: 1.3.4...1.3.5

Add missing server request timeout

31 Oct 14:16
Compare
Choose a tag to compare

What's Changed

  • Add timeout to server requests. In some cases, it was possible for server requests to not finish and to hang forever. If this happens, the timeout should abort the request so the integration can retry.

Full Changelog: 1.3.3...1.3.4

Fix config flow when cookies file expires

12 Aug 15:11
dcdf302
Compare
Choose a tag to compare

What's Changed

  • Fix config flow when cookies file expires by @pnbruckner in #32
  • Fix hassfest warning

Full Changelog: 1.3.2...1.3.3

Add online binary sensor & make device_tracker always available

24 Apr 14:40
134f066
Compare
Choose a tag to compare

Breaking Change

This is considered a breaking change since some automations, etc. may take certain steps when the Google Maps server becomes unavailable. This is still possible but will require using the new binary sensor instead.

What's Changed

Add an "online" binary sensor and make device_tracker entities always available, retaining their previous state, even when server dropouts occur.

This effectively moves the "server unavailable" status to an "out of band" signal. The way it was (i.e., "in band"), although the way the core team seems to think entities should work, makes the entities more difficult to use in automations, etc. Users often have to create template sensors and/or complicated conditions to ignore the "unavailable" state of these entities. This change makes them much easier to use, but still provides the server status, in case that is desired or necessary.

Also fix two problems. First, locationsharinglib was removed from manifest.json, breaking legacy configs. This change adds that back in. Second, due to some buggy device tracker component and entity registry code, this integration's entities may not appear after a HA restart. The buggy code was fixed in 2024.4. This change adds a workaround to avoid the problem for earlier HA versions.

Provide troubleshooting section in docs

18 Mar 16:24
ddb1eaf
Compare
Choose a tag to compare

A troubleshooting section has been added to the documentation. There have been no functional changes in this release.

Do not record entity_picture attribute in database

29 Feb 19:37
Compare
Choose a tag to compare

Attributes address & nickname were already not recorded in the database. entity_picture has a relatively large value and will almost never change, so add it to the list of attributes to not record.

Replace locationsharinglib, reorg code & other misc improvements

28 Feb 15:02
a4e23fc
Compare
Choose a tag to compare
  • Create replacement for locationsharinglib which more directly implements capabilities needed/used by integration.
  • Migrate configuration entry from version 1 to 2.
  • Add note to README.md about purging history of legacy trackers.
  • Remove support for initial beta versions when it comes to how entities are restored.
  • Write cookies & parsed data to log when invalid session indicated. This should help diagnosing cookies/expiration issues.
  • When loading new cookies file, store in newly named file in .storage/google_maps instead of overwriting existing file. This makes code much cleaner. Existing file will be deleted when config is reloaded.
  • Reorganize code to simplify, creating new helpers & coordinator modules.

Do not add serial number to device info in HA before 2023.11

19 Feb 20:27
c624841
Compare
Choose a tag to compare

In HA 2023.11 a new serial number field was added to device info. In some, but not all, versions before that, an exception can occur when this integration attempts to create a device with a serial number specified. This change does not attempt to add a serial number in older HA versions that do not support this field.

Save updated cookies & retry failed requests

18 Feb 16:12
ca5f4b6
Compare
Choose a tag to compare

A long existing issue with the Google Maps integration is that the cookies in the cookies file will eventually expire, and a new cookies file will need to be obtained and installed. For many that is not a huge inconvenience because the obtained cookies are generally good for a year or so. But for many, and for some unknown reason, they expire very quickly, often upon restarting HA.

This release adds a feature to save updated cookies sent by the server. Hopefully this will avoid the issue of expiring cookies altogether. But since the way these cookies work is still a bit of a mystery, debug logging has been added that lists out the cookies at startup and if an invalid cookies error ever happens. (It only outputs the names & expiration dates of the cookies and not their values.) It also writes a debug message whenever updated cookies are received & saved listing the names of the cookies that have been updated. So, if anyone still has issues with prematurely expiring cookies, hopefully this debug output will help diagnose the problem.

In addition to the above, failed requests will now be retried so hopefully connection & 500 errors etc. will no longer be seen by the user (which used to result in temporary unavailable states.)

Miscellaneous bug fixes

12 Feb 20:54
55df516
Compare
Choose a tag to compare
  • Depending on configuration, it might have queried server twice per update period per account. Now it will only ever poll once per update period per account.
  • When tracker entity was first created, and no restored state was available, the state would be unknown until the next update period. This change fixes that.
  • Update documentation with suggested improvements.