Skip to content

Commit 921e9df

Browse files
committed
Add more attributes to pydantic models
1 parent 37fd70b commit 921e9df

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

custom_components/zaptec/validate.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ class Installation(BaseModel):
1616

1717
model_config = ConfigDict(extra="allow")
1818
Id: str
19+
Active: bool
20+
AuthenticationType: int
21+
CurrentUserRoles: int
22+
InstallationType: int
23+
NetworkType: int
1924

2025

2126
class Installations(BaseModel):
2227
"""Pydantic model for a list of Zaptec installations."""
2328

2429
model_config = ConfigDict(extra="allow")
2530
Data: list[Installation]
31+
Pages: int
2632

2733

2834
class Charger(BaseModel):
@@ -31,6 +37,8 @@ class Charger(BaseModel):
3137
model_config = ConfigDict(extra="allow")
3238
Id: str
3339
Name: str
40+
Active: bool
41+
DeviceType: int
3442

3543

3644
class ChargerState(BaseModel):
@@ -50,6 +58,7 @@ class Chargers(BaseModel):
5058

5159
model_config = ConfigDict(extra="allow")
5260
Data: list[Charger]
61+
Pages: int
5362

5463

5564
class Circuit(BaseModel):
@@ -67,6 +76,7 @@ class Hierarchy(BaseModel):
6776
model_config = ConfigDict(extra="allow")
6877
Id: str
6978
Name: str
79+
NetworkType: int
7080
Circuits: list[Circuit]
7181

7282

@@ -75,6 +85,8 @@ class ChargerFirmware(BaseModel):
7585

7686
model_config = ConfigDict(extra="allow")
7787
ChargerId: str
88+
DeviceType: int
89+
IsOnline: bool
7890
CurrentVersion: str
7991
AvailableVersion: str
8092
IsUpToDate: bool
@@ -103,9 +115,10 @@ class InstallationConnectionDetails(BaseModel):
103115
model_config = ConfigDict(extra="allow")
104116
Host: str
105117
Password: str
106-
Port: int | None = None
118+
Port: int
119+
UseSSL: bool
107120
Subscription: str
108-
Type: int | None = None
121+
Type: int
109122
Username: str
110123
Topic: str
111124

0 commit comments

Comments
 (0)