Skip to content

Releases: mwatson2/pygaposa

0.2.7

Choose a tag to compare

@mwatson2 mwatson2 released this 14 Jul 17:44
baad851

Addresses the two newest pygaposa-related review comments on the Home Assistant integration PR (home-assistant/core#161442).

Security

  • Do not log Firebase request URLs verbatim. FirebaseAuth.sign_in, FirebaseAuth.refresh_id_token and Firestore._get previously logged the raw ClientResponse at debug level; the sign-in and token-refresh URLs include ?key=<api key>, so enabling debug logging leaked the configured Firebase API key. These now log only the method, query-stripped URL and status.

Fixed

  • Make polling cancellation-safe. When a caller of Device.update() / PollManager.wait_for_condition() is cancelled (e.g. an outer timeout expires), the waiter is now removed and the detached background polling task is cancelled when it was the last waiter. Previously the poll continued in the background and could later notify listeners with stale data after the caller had given up.

0.2.6

Choose a tag to compare

@mwatson2 mwatson2 released this 14 Jul 05:33
915bcd2

Addresses further feedback from the Home Assistant integration review (home-assistant/core#161442).

Fixed

  • Track and finalize fire-and-forget command-poll tasks. Motor/Group commands issued with waitForUpdate=False previously created untracked asyncio tasks. These are now tracked on the device, their failures are logged instead of surfacing as "Task exception was never retrieved" errors (which could otherwise occur during an outage now that polling failures propagate), and they are cancelled by Gaposa.close() so nothing keeps polling after shutdown.
  • Gaposa.close() now cancels each device's outstanding background tasks and stops its polling before closing the session. PollManager gained a close() method to support this.

0.2.5

Choose a tag to compare

@mwatson2 mwatson2 released this 14 Jul 04:34
afb9729

Addresses feedback from the Home Assistant integration review (home-assistant/core#161442).

Security

  • Redact the authorization (Firebase bearer token) and auth headers before writing request headers to the debug log, so enabling debug logging no longer leaks reusable credentials.
  • Remove the module-level logging.basicConfig(level=logging.DEBUG) calls so the library no longer forces global debug logging on the consuming application.

Fixed

  • Reuse the caller-supplied aiohttp session for Firebase requests instead of letting FirebaseApp create its own, and close it on Gaposa.close(). Previously a separate Firebase session was created and never closed, leaking a session per login/entry.
  • Propagate polling failures: PollManager.execute() no longer swallows every exception; if polling keeps failing until the retry limit, the originating exception is raised so Gaposa.update() fails instead of returning stale/empty data.

Changed

  • Gaposa.update() no longer fires per-device listeners by default (via a notifyListeners flag); command-driven polls still notify. This avoids a redundant intermediate update per device on every scheduled refresh.

Release 0.2.0

Choose a tag to compare

@mwatson2 mwatson2 released this 12 Nov 19:50

This release adds support for the state property on groups.