Skip to content

Commit

Permalink
Merge pull request #596 from WillCodeForCats/595-after-update-to-late…
Browse files Browse the repository at this point in the history
…st-version-error-list-indices-must-be-integers-or-slices-not-str

MMPPT id and idstr as properties
  • Loading branch information
WillCodeForCats authored May 2, 2024
2 parents 9c8c439 + 294b051 commit 0250ef3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions custom_components/solaredge_modbus_multi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,8 +1413,6 @@ def __init__(
self.hub = hub
self.unit = unit
self.mmppt_key = f"mmppt_{self.unit}"
self.mmppt_id = self.inverter.decoded_model[self.mmppt_key]["ID"]
self.mmppt_idstr = self.inverter.decoded_model[self.mmppt_key]["IDStr"]

@property
def online(self) -> bool:
Expand All @@ -1433,6 +1431,14 @@ def device_info(self) -> DeviceInfo:
via_device=(DOMAIN, self.inverter.uid_base),
)

@property
def mmppt_id(self) -> str:
return self.inverter.decoded_model[self.mmppt_key]["ID"]

@property
def mmppt_idstr(self) -> str:
return self.inverter.decoded_model[self.mmppt_key]["IDStr"]


class SolarEdgeMeter:
"""Defines a SolarEdge meter."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solaredge_modbus_multi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues",
"loggers": ["custom_components.solaredge_modbus_multi"],
"requirements": ["pymodbus>=3.6.6"],
"version": "2.4.14"
"version": "2.4.15-pre.1"
}

0 comments on commit 0250ef3

Please sign in to comment.