File tree Expand file tree Collapse file tree 1 file changed +9
-17
lines changed
custom_components/solaredge_modbus_multi Expand file tree Collapse file tree 1 file changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -1703,28 +1703,20 @@ async def read_modbus_data(self) -> None:
1703
1703
)
1704
1704
self ._grid_status = True
1705
1705
1706
- except (ModbusIllegalAddress , ModbusIOException ) as e :
1707
-
1708
- if (
1709
- type (e ) is ModbusIOException
1710
- and "No response recieved after" not in e
1711
- ):
1712
- raise
1713
-
1714
- try :
1715
- del self .decoded_model ["I_Grid_Status" ]
1716
- except KeyError :
1717
- pass
1718
-
1706
+ except ModbusIllegalAddress :
1719
1707
self ._grid_status = False
1720
-
1721
- _LOGGER .debug (
1722
- (f"I{ self .inverter_unit_id } : Grid On/Off NOT available: { e } " )
1723
- )
1708
+ _LOGGER .debug ((f"I{ self .inverter_unit_id } : Grid On/Off NOT available" ))
1724
1709
1725
1710
if not self .hub .is_connected :
1726
1711
await self .hub .connect ()
1727
1712
1713
+ except ModbusIOException as e :
1714
+ _LOGGER .debug (
1715
+ f"I{ self .inverter_unit_id } : A modbus I/O exception occurred "
1716
+ "while reading data for Grid On/Off Status. This entity "
1717
+ f"will be unavailable: { e } "
1718
+ )
1719
+
1728
1720
except ModbusIOError :
1729
1721
raise ModbusReadError (
1730
1722
f"No response from inverter ID { self .inverter_unit_id } "
You can’t perform that action at this time.
0 commit comments