Skip to content

Commit

Permalink
Merge pull request #123 from sfstar/feature/patch_compatibility_with_…
Browse files Browse the repository at this point in the history
…ha_core_2023.9.1

Bump pymodbus 3.5.1 for 2023.9 patch compatibility
  • Loading branch information
sfstar authored Sep 9, 2023
2 parents 3b7fd20 + 91e58a3 commit 2e492a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions custom_components/victron/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def _async_update_data(self) -> dict:
"""Get the latest data from victron"""
self.logger.debug("Fetching victron data")
self.logger.debug(self.decodeInfo)

parsed_data = OrderedDict()
unavailable_entities = OrderedDict()

Expand All @@ -72,7 +72,7 @@ async def _async_update_data(self) -> dict:
full_key = str(unit) + "." + key
# self.data["data"][full_key] = None
unavailable_entities[full_key] = False

_LOGGER.warning(f"no valid data returned for entities of slave: {unit} (if the device continues to no longer update) check if the device was physically removed. Before opening an issue please force a rescan to attempt to resolve this issue")
else:
parsed_data = OrderedDict(list(parsed_data.items()) + list(self.parse_register_data(data, register_info_dict[name], unit).items()))
Expand All @@ -88,7 +88,7 @@ async def _async_update_data(self) -> dict:

def parse_register_data(self, buffer: ReadHoldingRegistersResponse, registerInfo: OrderedDict(str, RegisterInfo), unit: int) -> dict:
decoder = BinaryPayloadDecoder.fromRegisters(
buffer.registers, byteorder=Endian.Big
buffer.registers, byteorder=Endian.BIG
)
decoded_data = OrderedDict()
for key,value in registerInfo.items():
Expand Down
2 changes: 1 addition & 1 deletion custom_components/victron/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/sfstar/hass-victron/issues",
"requirements": [
"pymodbus>=3.3.1"
"pymodbus>=3.5.1"
],
"ssdp": [],
"version": "0.0.11",
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Victron GX modbus TCP",
"render_readme": true,
"homeassistant": "2023.2.0",
"homeassistant": "2023.9.1",
"hacs": "1.28.4"
}

0 comments on commit 2e492a3

Please sign in to comment.