From 0f616340bb17147e7e2d7cca06b798fb8f7ae70c Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sat, 19 Aug 2023 07:48:45 -0700 Subject: [PATCH 01/15] Pin to pymodbus 3.4.1 --- README.md | 4 ++-- custom_components/solaredge_modbus_multi/manifest.json | 2 +- hacs.json | 2 +- info.md | 2 +- requirements.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2e7442da..2827b824 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,9 @@ After rebooting Home Assistant, this integration can be configured through the i [WillCodeForCats/solaredge-modbus-multi/wiki](https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki) ### Required Versions -* Home Assistant 2023.7.0 or newer +* Home Assistant 2023.8.0 or newer * Python 3.10 or newer -* pymodbus 3.3.1 or newer +* pymodbus 3.4.1 or newer ## Specifications [WillCodeForCats/solaredge-modbus-multi/tree/main/doc](https://github.com/WillCodeForCats/solaredge-modbus-multi/tree/main/doc) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index ca51f1af..b751c025 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -9,6 +9,6 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], - "requirements": ["pymodbus>=3.3.1"], + "requirements": ["pymodbus==3.4.1"], "version": "2.4.2" } diff --git a/hacs.json b/hacs.json index 416d38b6..dc500deb 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "SolarEdge Modbus Multi", "content_in_root": false, - "homeassistant": "2023.7.0", + "homeassistant": "2023.8.0", "render_readme": false } diff --git a/info.md b/info.md index 7af484c2..07e3fe0a 100644 --- a/info.md +++ b/info.md @@ -22,4 +22,4 @@ Read more on the wiki: [WillCodeForCats/solaredge-modbus-multi/wiki](https://git * Supports status and error reporting sensors. * User friendly configuration through Config Flow. -Requires Home Assistant 2023.7.0 and newer. +Requires Home Assistant 2023.8.0 and newer. diff --git a/requirements.txt b/requirements.txt index 0e91f2de..52e1727b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -pymodbus>=3.3.1 +pymodbus==3.4.1 From b99fdec72f6390dd79379a7ceb55f18f482c8775 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sun, 27 Aug 2023 11:30:16 -0700 Subject: [PATCH 02/15] Expected for HA 2023.9 --- README.md | 2 +- hacs.json | 2 +- info.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2827b824..27c18983 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ After rebooting Home Assistant, this integration can be configured through the i [WillCodeForCats/solaredge-modbus-multi/wiki](https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki) ### Required Versions -* Home Assistant 2023.8.0 or newer +* Home Assistant 2023.9.0 or newer * Python 3.10 or newer * pymodbus 3.4.1 or newer diff --git a/hacs.json b/hacs.json index dc500deb..f7ada0da 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "SolarEdge Modbus Multi", "content_in_root": false, - "homeassistant": "2023.8.0", + "homeassistant": "2023.9.0", "render_readme": false } diff --git a/info.md b/info.md index 07e3fe0a..df7490ab 100644 --- a/info.md +++ b/info.md @@ -22,4 +22,4 @@ Read more on the wiki: [WillCodeForCats/solaredge-modbus-multi/wiki](https://git * Supports status and error reporting sensors. * User friendly configuration through Config Flow. -Requires Home Assistant 2023.8.0 and newer. +Requires Home Assistant 2023.9.0 and newer. From 5795735390d85353f73497474b87cddcaf9dca12 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:59:02 -0700 Subject: [PATCH 03/15] Bump version for pre-release --- custom_components/solaredge_modbus_multi/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index 088f449b..415aba31 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,5 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus>=3.3.1"], - "version": "2.4.4-pre.1" + "version": "2.4.4-pre.2" } From 1b701acf06589d37504d39b77e484cc6bae3a46b Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Thu, 31 Aug 2023 08:31:25 -0700 Subject: [PATCH 04/15] Update manifest.json --- custom_components/solaredge_modbus_multi/manifest.json | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index f24cd4eb..164ffe8f 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,6 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus==3.4.1"], - "version": "2.4.4-pre.1" "version": "2.4.4-pre.2" } From 7a3297e715692cc37faeb295d9e992e1a6643869 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:55:10 -0700 Subject: [PATCH 05/15] Bump version for release --- custom_components/solaredge_modbus_multi/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index 415aba31..1990881d 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,5 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus>=3.3.1"], - "version": "2.4.4-pre.2" + "version": "2.4.4" } From de61485bfd091d826e4b0456f064cce0915a7551 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:04:22 -0700 Subject: [PATCH 06/15] Bump version for pre-release --- custom_components/solaredge_modbus_multi/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index e68f7099..4e4ebee2 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,5 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus==3.4.1"], - "version": "2.4.4" + "version": "2.4.5-pre.1" } From ff62f03e202030626682270882074c614ca934b1 Mon Sep 17 00:00:00 2001 From: Seth <48533968+WillCodeForCats@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:22:45 -0700 Subject: [PATCH 07/15] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index eec0f73a..d0260ee3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -77,8 +77,9 @@ body: required: true - label: My configuration follows https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki/Configuration required: true + - label: This issue is not about a template error (template errors should not be reported as an issue, read https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki/Template-Design-Notes) - type: textarea id: additional-context attributes: label: Additional Context - description: Add any other context about the problem here. \ No newline at end of file + description: Add any other context about the problem here. From 3b6601d7125ab2b0fa32ad4975bcf7b13fd65818 Mon Sep 17 00:00:00 2001 From: Seth <48533968+WillCodeForCats@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:23:42 -0700 Subject: [PATCH 08/15] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d0260ee3..4ff035b4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -78,6 +78,7 @@ body: - label: My configuration follows https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki/Configuration required: true - label: This issue is not about a template error (template errors should not be reported as an issue, read https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki/Template-Design-Notes) + required: true - type: textarea id: additional-context attributes: From e8a2b7bb324500b120f8e76e05e30900e39a3156 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:07:12 -0700 Subject: [PATCH 09/15] HA 2023.9.1 pymodbus 3.5.1 --- README.md | 2 +- custom_components/solaredge_modbus_multi/manifest.json | 2 +- hacs.json | 2 +- requirements.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fc9a20a8..0b9aadb4 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ After rebooting Home Assistant, this integration can be configured through the i ### Required Versions * Home Assistant 2023.9.0 or newer * Python 3.11 or newer -* pymodbus 3.4.1 or newer +* pymodbus 3.5.1 or newer ## Specifications [WillCodeForCats/solaredge-modbus-multi/tree/main/doc](https://github.com/WillCodeForCats/solaredge-modbus-multi/tree/main/doc) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index e68f7099..249cb35c 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -9,6 +9,6 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], - "requirements": ["pymodbus==3.4.1"], + "requirements": ["pymodbus==3.5.1"], "version": "2.4.4" } diff --git a/hacs.json b/hacs.json index f7ada0da..8219afed 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "SolarEdge Modbus Multi", "content_in_root": false, - "homeassistant": "2023.9.0", + "homeassistant": "2023.9.1", "render_readme": false } diff --git a/requirements.txt b/requirements.txt index 52e1727b..44989165 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -pymodbus==3.4.1 +pymodbus==3.5.1 From 46d4e988b3ac1b6f16ef94293b0f286f417baf0c Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:08:46 -0700 Subject: [PATCH 10/15] HA 2023.9.1 in docs --- README.md | 2 +- info.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b9aadb4..339313dd 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ After rebooting Home Assistant, this integration can be configured through the i [WillCodeForCats/solaredge-modbus-multi/wiki](https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki) ### Required Versions -* Home Assistant 2023.9.0 or newer +* Home Assistant 2023.9.1 or newer * Python 3.11 or newer * pymodbus 3.5.1 or newer diff --git a/info.md b/info.md index df7490ab..a605530c 100644 --- a/info.md +++ b/info.md @@ -22,4 +22,4 @@ Read more on the wiki: [WillCodeForCats/solaredge-modbus-multi/wiki](https://git * Supports status and error reporting sensors. * User friendly configuration through Config Flow. -Requires Home Assistant 2023.9.0 and newer. +Requires Home Assistant 2023.9.1 and newer. From c4fa69d1fe022e8a4d5160ac873f90ce47d6a1a8 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:13:09 -0700 Subject: [PATCH 11/15] Bump version for pre-release --- custom_components/solaredge_modbus_multi/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index e3539962..b9d77080 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,5 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus==3.5.1"], - "version": "2.4.5-pre.1" + "version": "2.4.5-pre.2" } From 6c3bb43fb601d52543137bf9283431023b2d83a7 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sat, 9 Sep 2023 06:46:07 -0700 Subject: [PATCH 12/15] Pymodbus constants from enum.Enum --- .../solaredge_modbus_multi/hub.py | 40 +++++++++---------- .../solaredge_modbus_multi/number.py | 18 ++++----- .../solaredge_modbus_multi/switch.py | 4 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/custom_components/solaredge_modbus_multi/hub.py b/custom_components/solaredge_modbus_multi/hub.py index a6ea27f0..bc6edc48 100644 --- a/custom_components/solaredge_modbus_multi/hub.py +++ b/custom_components/solaredge_modbus_multi/hub.py @@ -724,7 +724,7 @@ async def init_device(self) -> None: ) decoder = BinaryPayloadDecoder.fromRegisters( - inverter_data.registers, byteorder=Endian.Big + inverter_data.registers, byteorder=Endian.BIG ) self.decoded_common = OrderedDict( @@ -782,7 +782,7 @@ async def init_device(self) -> None: ) decoder = BinaryPayloadDecoder.fromRegisters( - mmppt_common.registers, byteorder=Endian.Big + mmppt_common.registers, byteorder=Endian.BIG ) self.decoded_mmppt = OrderedDict( @@ -846,7 +846,7 @@ async def read_modbus_data(self) -> None: ) decoder = BinaryPayloadDecoder.fromRegisters( - inverter_data.registers, byteorder=Endian.Big + inverter_data.registers, byteorder=Endian.BIG ) self.decoded_model = OrderedDict( @@ -925,7 +925,7 @@ async def read_modbus_data(self) -> None: ) decoder = BinaryPayloadDecoder.fromRegisters( - inverter_data.registers, byteorder=Endian.Big + inverter_data.registers, byteorder=Endian.BIG ) if self.decoded_mmppt["mmppt_Units"] in [2, 3]: @@ -1011,8 +1011,8 @@ async def read_modbus_data(self) -> None: decoder = BinaryPayloadDecoder.fromRegisters( inverter_data.registers, - byteorder=Endian.Big, - wordorder=Endian.Little, + byteorder=Endian.BIG, + wordorder=Endian.LITTLE, ) self.decoded_model.update( @@ -1051,8 +1051,8 @@ async def read_modbus_data(self) -> None: decoder = BinaryPayloadDecoder.fromRegisters( inverter_data.registers, - byteorder=Endian.Big, - wordorder=Endian.Little, + byteorder=Endian.BIG, + wordorder=Endian.LITTLE, ) self.decoded_model.update( @@ -1091,8 +1091,8 @@ async def read_modbus_data(self) -> None: decoder = BinaryPayloadDecoder.fromRegisters( inverter_data.registers, - byteorder=Endian.Big, - wordorder=Endian.Little, + byteorder=Endian.BIG, + wordorder=Endian.LITTLE, ) self.decoded_model.update( @@ -1129,8 +1129,8 @@ async def read_modbus_data(self) -> None: decoder = BinaryPayloadDecoder.fromRegisters( inverter_data.registers, - byteorder=Endian.Big, - wordorder=Endian.Little, + byteorder=Endian.BIG, + wordorder=Endian.LITTLE, ) self.decoded_model.update( @@ -1181,8 +1181,8 @@ async def read_modbus_data(self) -> None: decoder = BinaryPayloadDecoder.fromRegisters( inverter_data.registers, - byteorder=Endian.Big, - wordorder=Endian.Little, + byteorder=Endian.BIG, + wordorder=Endian.LITTLE, ) self.decoded_storage_control = OrderedDict( @@ -1299,7 +1299,7 @@ async def init_device(self) -> None: raise ModbusReadError(meter_info) decoder = BinaryPayloadDecoder.fromRegisters( - meter_info.registers, byteorder=Endian.Big + meter_info.registers, byteorder=Endian.BIG ) self.decoded_common = OrderedDict( [ @@ -1364,7 +1364,7 @@ async def read_modbus_data(self) -> None: ) decoder = BinaryPayloadDecoder.fromRegisters( - meter_data.registers, byteorder=Endian.Big + meter_data.registers, byteorder=Endian.BIG ) self.decoded_model = OrderedDict( @@ -1524,8 +1524,8 @@ async def init_device(self) -> None: decoder = BinaryPayloadDecoder.fromRegisters( battery_info.registers, - byteorder=Endian.Big, - wordorder=Endian.Little, + byteorder=Endian.BIG, + wordorder=Endian.LITTLE, ) self.decoded_common = OrderedDict( [ @@ -1620,8 +1620,8 @@ async def read_modbus_data(self) -> None: decoder = BinaryPayloadDecoder.fromRegisters( battery_data.registers, - byteorder=Endian.Big, - wordorder=Endian.Little, + byteorder=Endian.BIG, + wordorder=Endian.LITTLE, ) self.decoded_model = OrderedDict( diff --git a/custom_components/solaredge_modbus_multi/number.py b/custom_components/solaredge_modbus_multi/number.py index 8b0f3297..d2f0393c 100644 --- a/custom_components/solaredge_modbus_multi/number.py +++ b/custom_components/solaredge_modbus_multi/number.py @@ -164,7 +164,7 @@ def native_value(self) -> float | None: async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_float(float(value)) await self._platform.write_registers( address=57350, payload=builder.to_registers() @@ -208,7 +208,7 @@ def native_value(self) -> float | None: async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_float(float(value)) await self._platform.write_registers( address=57352, payload=builder.to_registers() @@ -259,7 +259,7 @@ def native_value(self) -> int | None: async def async_set_native_value(self, value: int) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_uint(int(value)) await self._platform.write_registers( address=57355, payload=builder.to_registers() @@ -310,7 +310,7 @@ def native_value(self) -> float | None: async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_float(float(value)) await self._platform.write_registers( address=57358, payload=builder.to_registers() @@ -361,7 +361,7 @@ def native_value(self) -> float | None: async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_float(float(value)) await self._platform.write_registers( address=57360, payload=builder.to_registers() @@ -415,7 +415,7 @@ def native_value(self) -> float | None: async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_float(float(value)) await self._platform.write_registers( address=57346, payload=builder.to_registers() @@ -472,7 +472,7 @@ def native_value(self) -> float | None: async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_float(float(value)) await self._platform.write_registers( address=57362, payload=builder.to_registers() @@ -525,7 +525,7 @@ def native_value(self) -> int: async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_16bit_uint(int(value)) await self._platform.write_registers( address=61441, payload=builder.to_registers() @@ -579,7 +579,7 @@ def native_value(self): async def async_set_native_value(self, value: float) -> None: _LOGGER.debug(f"set {self.unique_id} to {value}") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_float(float(value)) await self._platform.write_registers( address=61442, payload=builder.to_registers() diff --git a/custom_components/solaredge_modbus_multi/switch.py b/custom_components/solaredge_modbus_multi/switch.py index 723e1a9f..a06aa639 100644 --- a/custom_components/solaredge_modbus_multi/switch.py +++ b/custom_components/solaredge_modbus_multi/switch.py @@ -214,7 +214,7 @@ def is_on(self) -> bool | None: async def async_turn_on(self, **kwargs: Any) -> None: _LOGGER.debug(f"set {self.unique_id} to 0x1") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_int(0x1) await self._platform.write_registers( address=61762, payload=builder.to_registers() @@ -223,7 +223,7 @@ async def async_turn_on(self, **kwargs: Any) -> None: async def async_turn_off(self, **kwargs: Any) -> None: _LOGGER.debug(f"set {self.unique_id} to 0x0") - builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little) + builder = BinaryPayloadBuilder(byteorder=Endian.BIG, wordorder=Endian.LITTLE) builder.add_32bit_int(0x0) await self._platform.write_registers( address=61762, payload=builder.to_registers() From 76321f8ba8ae5a70c26c7de11dedba1f0747f372 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sat, 9 Sep 2023 07:00:17 -0700 Subject: [PATCH 13/15] Bump version for pre-release --- custom_components/solaredge_modbus_multi/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index b9d77080..85565504 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,5 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus==3.5.1"], - "version": "2.4.5-pre.2" + "version": "2.4.5-pre.3" } From e5621892c0afc7a309dbc73a1c9d3a3fc8573cf1 Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sat, 9 Sep 2023 07:00:43 -0700 Subject: [PATCH 14/15] Bump version for pre-release --- custom_components/solaredge_modbus_multi/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index 85565504..02204174 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,5 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus==3.5.1"], - "version": "2.4.5-pre.3" + "version": "2.4.5-pre.4" } From ddf936b84585f07e523057d401e9dfff784f47ba Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Sat, 9 Sep 2023 07:10:26 -0700 Subject: [PATCH 15/15] Bump version for release --- custom_components/solaredge_modbus_multi/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/manifest.json b/custom_components/solaredge_modbus_multi/manifest.json index 02204174..0e0bdd2d 100644 --- a/custom_components/solaredge_modbus_multi/manifest.json +++ b/custom_components/solaredge_modbus_multi/manifest.json @@ -10,5 +10,5 @@ "issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues", "loggers": ["custom_components.solaredge_modbus_multi"], "requirements": ["pymodbus==3.5.1"], - "version": "2.4.5-pre.4" + "version": "2.4.5" }