Skip to content

Commit 0250ef3

Browse files
Merge pull request #596 from WillCodeForCats/595-after-update-to-latest-version-error-list-indices-must-be-integers-or-slices-not-str
MMPPT id and idstr as properties
2 parents 9c8c439 + 294b051 commit 0250ef3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

custom_components/solaredge_modbus_multi/hub.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,8 +1413,6 @@ def __init__(
14131413
self.hub = hub
14141414
self.unit = unit
14151415
self.mmppt_key = f"mmppt_{self.unit}"
1416-
self.mmppt_id = self.inverter.decoded_model[self.mmppt_key]["ID"]
1417-
self.mmppt_idstr = self.inverter.decoded_model[self.mmppt_key]["IDStr"]
14181416

14191417
@property
14201418
def online(self) -> bool:
@@ -1433,6 +1431,14 @@ def device_info(self) -> DeviceInfo:
14331431
via_device=(DOMAIN, self.inverter.uid_base),
14341432
)
14351433

1434+
@property
1435+
def mmppt_id(self) -> str:
1436+
return self.inverter.decoded_model[self.mmppt_key]["ID"]
1437+
1438+
@property
1439+
def mmppt_idstr(self) -> str:
1440+
return self.inverter.decoded_model[self.mmppt_key]["IDStr"]
1441+
14361442

14371443
class SolarEdgeMeter:
14381444
"""Defines a SolarEdge meter."""

custom_components/solaredge_modbus_multi/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"issue_tracker": "https://github.com/WillCodeForCats/solaredge-modbus-multi/issues",
1111
"loggers": ["custom_components.solaredge_modbus_multi"],
1212
"requirements": ["pymodbus>=3.6.6"],
13-
"version": "2.4.14"
13+
"version": "2.4.15-pre.1"
1414
}

0 commit comments

Comments
 (0)