Skip to content

Commit 9aa85c5

Browse files
authored
v0.18.9 - Adds missing ParentChannelNum Property (#97)
* Add parent_channel_num to VueDeviceChannel * Add parentChannelNum attribute to SimulatorChannel model * 0.18.9 update
1 parent 972e338 commit 9aa85c5

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

pyemvue/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.18.8"
1+
VERSION = "0.18.9"

pyemvue/device.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def __init__(
142142
self.channel_type_gid = channelTypeGid
143143
self.nested_devices = {}
144144
self.type = ""
145+
self.parent_channel_num = None
145146

146147
def from_json_dictionary(self, js: "dict[str, Any]") -> Self:
147148
"""Populate device channel data from a dictionary extracted from the response json."""
@@ -157,6 +158,8 @@ def from_json_dictionary(self, js: "dict[str, Any]") -> Self:
157158
self.channel_type_gid = js["channelTypeGid"]
158159
if "type" in js:
159160
self.type = js["type"]
161+
if "parentChannelNum" in js:
162+
self.parent_channel_num = js["parentChannelNum"]
160163
return self
161164

162165
# Known types: Main, FiftyAmp, FiftyAmpBidirectional
@@ -169,7 +172,8 @@ def as_dictionary(self) -> "dict[str, Any]":
169172
"channelNum": self.channel_num,
170173
"channelMultiplier": self.channel_multiplier,
171174
"channelTypeGid": self.channel_type_gid,
172-
"type": self.type
175+
"type": self.type,
176+
"parentChannelNum": self.parent_channel_num
173177
}
174178

175179

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ classifiers=[
1818
"Topic :: Home Automation",
1919
]
2020
dependencies = [
21-
"pycognito>=2024.2.0",
21+
"pycognito>=2024.5.0",
2222
"python-dateutil>=2.8.2",
2323
"requests>=2.26.0",
2424
"typing_extensions>=4.0.1"

simulator/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class SimulatorChannel(SimulatorBase):
8686
channelMultiplier: float = 1.0
8787
channelTypeGid: Optional[int]
8888
type: str
89+
parentChannelNum: Optional[str] = None
8990

9091

9192
class SimulatorLatitudeLongitude(SimulatorBase):

0 commit comments

Comments
 (0)