Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.8.6 (draft)

This is a minor release that fixes a validation issue that caused the integration to stop working for users with at least one charger they only have the User role for.

In addition, it also fixes an issue where calls to the localSettings-API triggered an error on validating the response.

## 0.8.5

This is a minor release that fixes a bug in the setting of the Min/Max current of a charger.
Expand Down
17 changes: 1 addition & 16 deletions custom_components/zaptec/zaptec/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Installation(BaseModel):
model_config = ConfigDict(extra="allow")
Id: str
Active: bool
AuthenticationType: int
CurrentUserRoles: int
InstallationType: int
NetworkType: int
Expand Down Expand Up @@ -88,20 +87,6 @@ class ChargerFirmware(BaseModel):
IsUpToDate: bool


class ChargerLocalSettings(BaseModel):
"""
Pydantic model for the local settings of a Zaptec charger.

Note: This model is used in an undocumented API-call, and should be removed as soon as we have
official API-calls that can cover the necessary functionality
"""

model_config = ConfigDict(extra="allow")
Id: str
Name: str | None = None
DeviceId: str | None = None


class InstallationConnectionDetails(BaseModel):
"""Pydantic model for the servicebus connection details of a Zaptec installation."""

Expand Down Expand Up @@ -136,7 +121,7 @@ class InstallationConnectionDetails(BaseModel):
r"chargers/[0-9a-f\-]+/state": CHARGER_STATES,
r"chargers/[0-9a-f\-]+/authorizecharge": None,
r"chargers/[0-9a-f\-]+/SendCommand/[0-9]+": None,
r"chargers/[0-9a-f\-]+/localSettings": ChargerLocalSettings,
r"chargers/[0-9a-f\-]+/localSettings": None,
r"chargers/[0-9a-f\-]+/update": None,
r"chargerFirmware/installation/[0-9a-f\-]+": CHARGER_FIRMWARES,
}
Expand Down
Loading