Skip to content

Commit 4328d7e

Browse files
Log warning for polling under 30 seconds
Short polling intervals are not well suited to sync modbus polling in an async environment. Future work will explore async polling.
1 parent f3948d6 commit 4328d7e

File tree

1 file changed

+3
-0
lines changed
  • custom_components/solaredge_modbus_multi

1 file changed

+3
-0
lines changed

custom_components/solaredge_modbus_multi/hub.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def __init__(
6868
_LOGGER.warning("Polling frequency < 10, enabling keep modbus open option.")
6969
self._keep_modbus_open = True
7070

71+
if scan_interval < 30:
72+
_LOGGER.warning("Polling frequency < 30 is not recommended.")
73+
7174
self._client = ModbusTcpClient(host=self._host, port=self._port)
7275

7376
self._id = name.lower()

0 commit comments

Comments
 (0)