From d37e858fa1b0d138fba9df40f210405005f0c2fe Mon Sep 17 00:00:00 2001 From: magico13 Date: Wed, 4 Jun 2025 19:08:25 -0400 Subject: [PATCH 1/3] Add parent_channel_num to VueDeviceChannel --- pyemvue/device.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyemvue/device.py b/pyemvue/device.py index fb03d6f..f0ed681 100644 --- a/pyemvue/device.py +++ b/pyemvue/device.py @@ -142,6 +142,7 @@ def __init__( self.channel_type_gid = channelTypeGid self.nested_devices = {} self.type = "" + self.parent_channel_num = "" def from_json_dictionary(self, js: "dict[str, Any]") -> Self: """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: 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 @@ -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 } From e37d3ebaf8866247f9005dba2279fda41c588d1d Mon Sep 17 00:00:00 2001 From: magico13 Date: Wed, 4 Jun 2025 19:10:04 -0400 Subject: [PATCH 2/3] Add parentChannelNum attribute to SimulatorChannel model --- simulator/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/simulator/models.py b/simulator/models.py index 7656186..2ec7a6c 100644 --- a/simulator/models.py +++ b/simulator/models.py @@ -86,6 +86,7 @@ class SimulatorChannel(SimulatorBase): channelMultiplier: float = 1.0 channelTypeGid: Optional[int] type: str + parentChannelNum: str = "" class SimulatorLatitudeLongitude(SimulatorBase): From 0250c4394919cc7bb536c29ad241c126fcd82064 Mon Sep 17 00:00:00 2001 From: magico13 Date: Wed, 4 Jun 2025 21:05:07 -0400 Subject: [PATCH 3/3] 0.18.9 update --- pyemvue/__version__.py | 2 +- pyemvue/device.py | 2 +- pyproject.toml | 2 +- simulator/models.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyemvue/__version__.py b/pyemvue/__version__.py index ec22ee3..65c9308 100644 --- a/pyemvue/__version__.py +++ b/pyemvue/__version__.py @@ -1 +1 @@ -VERSION = "0.18.8" +VERSION = "0.18.9" diff --git a/pyemvue/device.py b/pyemvue/device.py index f0ed681..84cd5f4 100644 --- a/pyemvue/device.py +++ b/pyemvue/device.py @@ -142,7 +142,7 @@ def __init__( self.channel_type_gid = channelTypeGid self.nested_devices = {} self.type = "" - self.parent_channel_num = "" + 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.""" diff --git a/pyproject.toml b/pyproject.toml index 8d07a28..b8be670 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/simulator/models.py b/simulator/models.py index 2ec7a6c..50e5871 100644 --- a/simulator/models.py +++ b/simulator/models.py @@ -86,7 +86,7 @@ class SimulatorChannel(SimulatorBase): channelMultiplier: float = 1.0 channelTypeGid: Optional[int] type: str - parentChannelNum: str = "" + parentChannelNum: Optional[str] = None class SimulatorLatitudeLongitude(SimulatorBase):