Skip to content

Commit

Permalink
Add properties to the device class
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Blyler <andy@blyler.cc>
  • Loading branch information
ablyler committed Feb 8, 2024
1 parent bf42dc8 commit fe4e957
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions bradford_white_connect_client/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,6 @@
from dataclasses_json import LetterCase, dataclass_json


@dataclass_json(letter_case=LetterCase.CAMEL)
@dataclass
class Device:
product_name: str
model: str
dsn: str
oem_model: str
sw_version: str
template_id: int
mac: str
unique_hardware_id: Optional[str]
lan_ip: str
connected_at: str
key: int
lan_enabled: bool
connection_priority: List[str]
has_properties: bool
product_class: Optional[str]
connection_status: str
lat: str
lng: str
locality: Optional[str]
device_type: str
dealer: Optional[str]


@dataclass
class Property:
type: str
Expand Down Expand Up @@ -65,3 +39,30 @@ class Property:
@dataclass
class PropertyWrapper:
property: Property


@dataclass_json(letter_case=LetterCase.CAMEL)
@dataclass
class Device:
product_name: str
model: str
dsn: str
oem_model: str
sw_version: str
template_id: int
mac: str
unique_hardware_id: Optional[str]
lan_ip: str
connected_at: str
key: int
lan_enabled: bool
connection_priority: List[str]
has_properties: bool
product_class: Optional[str]
connection_status: str
lat: str
lng: str
locality: Optional[str]
device_type: str
dealer: Optional[str]
properties: Optional[List[Property]] = field(default=None)

0 comments on commit fe4e957

Please sign in to comment.