Skip to content

Add sensors for who authorized a charging session - #431

Open
rhammen wants to merge 1 commit into
custom-components:masterfrom
rhammen:feat/issue-200-420-authorized-by
Open

rhammen wants to merge 1 commit into
custom-components:masterfrom
rhammen:feat/issue-200-420-authorized-by

Conversation

@rhammen

@rhammen rhammen commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Zaptec has no "is authorized" observation: ChargerCurrentUserUuid (722) holds
the token of whoever authorized the current session, and is empty when nothing
is authorized.

  • Authorized by — the live token: the RFID card, or "HA/Zaptec App" for a
    remote authorize, which this integration cannot distinguish from one made in
    the Zaptec app.
  • Last session authorized by — the same, from
    CompletedSession.AuthenticationCode. Zaptec leaves that empty for
    remote-authorized sessions, which therefore read Unknown.
  • Authorized — binary sensor, deliberately not diagnostic: with delayed
    charging the charger stays in Connected_Requesting after authorizing, so
    this is the only way to tell "authorized, waiting for the car" from "waiting
    for authorization" (Time delyaed charging and release status #420).

Where the installation does not require authorization the binary sensor reports
Unknown rather than "Not authorized", which would otherwise look like a fault
while the car charges normally.

The prefix rule lives in authorization.py, so both platforms derive their
value from it and cannot disagree.

Depends on #425: Zaptec clears 722 by sending it without a value, and without
that fix the token never clears.

Verified on a Go 2 (fw 3.3.0.0): 722 is not pushed over the live stream — 710
and 721 are — so it follows the poll interval. Authorizing from HA's own button
is picked up within a couple of seconds, since the button triggers a poll.

Fixes #200, #420

🤖 Generated with Claude Code

, custom-components#420)

Zaptec has no "is authorized" observation: ChargerCurrentUserUuid (722)
holds the token of whoever authorized the current session, and is empty
when nothing is authorized.

- "Authorized by" and "Last session authorized by" sensors show the RFID
  token, or "HA/Zaptec App" for a remote authorize, which this
  integration cannot distinguish from one made in the Zaptec app.
- An "Authorized" binary sensor, deliberately not diagnostic: with
  delayed charging the charger stays in Connected_Requesting after
  authorizing, so this is the only way to tell "authorized, waiting for
  the car" from "waiting for authorization" (custom-components#420).

The prefix rule lives in authorization.py so both platforms derive their
value from it and cannot disagree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request : Identify which rfid tag is used to start a session

1 participant