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 fb03d6f..84cd5f4 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 = None 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 } 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 7656186..50e5871 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: Optional[str] = None class SimulatorLatitudeLongitude(SimulatorBase):