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
2 changes: 1 addition & 1 deletion pyemvue/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.18.8"
VERSION = "0.18.9"
6 changes: 5 additions & 1 deletion pyemvue/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def __init__(
self.channel_type_gid = channelTypeGid
self.nested_devices = {}
self.type = ""
self.parent_channel_num = None

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

# Known types: Main, FiftyAmp, FiftyAmpBidirectional
Expand All @@ -169,7 +172,8 @@ def as_dictionary(self) -> "dict[str, Any]":
"channelNum": self.channel_num,
"channelMultiplier": self.channel_multiplier,
"channelTypeGid": self.channel_type_gid,
"type": self.type
"type": self.type,
"parentChannelNum": self.parent_channel_num
}


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ classifiers=[
"Topic :: Home Automation",
]
dependencies = [
"pycognito>=2024.2.0",
"pycognito>=2024.5.0",
"python-dateutil>=2.8.2",
"requests>=2.26.0",
"typing_extensions>=4.0.1"
Expand Down
1 change: 1 addition & 0 deletions simulator/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class SimulatorChannel(SimulatorBase):
channelMultiplier: float = 1.0
channelTypeGid: Optional[int]
type: str
parentChannelNum: Optional[str] = None
Comment thread
magico13 marked this conversation as resolved.


class SimulatorLatitudeLongitude(SimulatorBase):
Expand Down
Loading