Skip to content

Conversation

@steinmn
Copy link
Contributor

@steinmn steinmn commented Nov 6, 2025

Validation of ChargerLocalSettings-response:
We don't use the response for anything, and it is an undocumented API, so we shouldn't require any validation.

Validation of Installation(s)-response:
Users without the Owner role don't get the full installation object, specifically not the AuthenticationType-entry that was in the validation. Since the Installations-response includes all installations the user has access to, not just the one(s) they have added to HA, that causes issues. Since we don't use Authentication type for anything (other than displaying it in a sensor), we can just remove the requirement.

Fixes #354. Fixes #357

We don't use the response for anything, and it is an undocumented API, so we shouldn't require any validation.
@steinmn
Copy link
Contributor Author

steinmn commented Nov 6, 2025

Addresses #354

Given that this issue only applies to the cable lock and the HMI-brightness, I don't think it is critical enough to warrant an immediate release, I think we can leave it for a bit and see if any additional issues pop up.

For users without the Owner role, AuthenticationType is not included in the Installation response, which causes a problem in the initial setup of the integration.

Since we don't use Authentication type for anything (other than displaying it in a sensor), we can just remove the requirement.
@steinmn steinmn changed the title Remove validation of ChargerLocalSettings-response Remove incorrect or too restrictive validations Nov 8, 2025
@steinmn
Copy link
Contributor Author

steinmn commented Nov 8, 2025

Added validation-relaxing for Installation to address #357 as well. I think this one is severe enough for another release. Do you think we need a more thorough review of the validation models to see if we really need the values we have set as required @sveinse?

Copy link
Collaborator

@sveinse sveinse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

But as mentioned, we shouldn't validate anything except the data we use in the integration. I.e. the point of validation is to prevent error deeper in the integration, not check all of Zaptec's data.

@sveinse sveinse added this to the v0.8.6 milestone Nov 9, 2025
@sveinse sveinse merged commit add4421 into custom-components:master Nov 9, 2025
6 checks passed
@steinmn steinmn deleted the more-incorrect-validators branch November 9, 2025 18:52
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.

Cannot connect when not being owner of charger Unable to change settings due to too strict validation checks

2 participants