Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/solaredge_modbus_multi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class SunSpecNotImpl(IntEnum):
}

VENDOR_STATUS = {
SunSpecNotImpl.INT16: None,
SunSpecNotImpl.UINT16: None,
0: "No Error",
17: "Temperature Too High",
25: "Isolation Faults",
Expand Down
7 changes: 4 additions & 3 deletions custom_components/solaredge_modbus_multi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,13 +1094,16 @@ async def read_modbus_data(self) -> None:
"AC_Energy_WH_SF",
"I_DC_Current",
"I_DC_Voltage",
"I_Status",
"I_Status_Vendor",
]
uint16_data = (
inverter_data.registers[0:6]
+ inverter_data.registers[7:13]
+ [inverter_data.registers[16]]
+ inverter_data.registers[26:28]
+ [inverter_data.registers[29]]
+ inverter_data.registers[38:40]
)
self.decoded_model = dict(
zip(
Expand Down Expand Up @@ -1134,15 +1137,13 @@ async def read_modbus_data(self) -> None:
"I_Temp_Trns",
"I_Temp_Other",
"I_Temp_SF",
"I_Status",
"I_Status_Vendor",
]
int16_data = (
[inverter_data.registers[6]]
+ inverter_data.registers[13:16]
+ inverter_data.registers[17:24]
+ [inverter_data.registers[28]]
+ inverter_data.registers[30:40]
+ inverter_data.registers[30:38]
)

self.decoded_model.update(
Expand Down
4 changes: 2 additions & 2 deletions custom_components/solaredge_modbus_multi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ class SolarEdgeInverterStatus(SolarEdgeStatusSensor):
@property
def native_value(self):
try:
if self._platform.decoded_model["I_Status"] == SunSpecNotImpl.INT16:
if self._platform.decoded_model["I_Status"] == SunSpecNotImpl.UINT16:
return None

return str(DEVICE_STATUS[self._platform.decoded_model["I_Status"]])
Expand Down Expand Up @@ -1410,7 +1410,7 @@ def entity_registry_enabled_default(self) -> bool:
@property
def native_value(self):
try:
if self._platform.decoded_model["I_Status_Vendor"] == SunSpecNotImpl.INT16:
if self._platform.decoded_model["I_Status_Vendor"] == SunSpecNotImpl.UINT16:
return None

else:
Expand Down
Loading