Remove default value from modbus retries (#106551)

Solve retries issue.
This commit is contained in:
jan iversen 2023-12-28 14:20:56 +01:00 committed by GitHub
parent 1a6e81767d
commit 21dbc57fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -374,7 +374,7 @@ MODBUS_SCHEMA = vol.Schema(
vol.Optional(CONF_TIMEOUT, default=3): cv.socket_timeout,
vol.Optional(CONF_CLOSE_COMM_ON_ERROR): cv.boolean,
vol.Optional(CONF_DELAY, default=0): cv.positive_int,
vol.Optional(CONF_RETRIES, default=3): cv.positive_int,
vol.Optional(CONF_RETRIES): cv.positive_int,
vol.Optional(CONF_RETRY_ON_EMPTY): cv.boolean,
vol.Optional(CONF_MSG_WAIT): cv.positive_int,
vol.Optional(CONF_BINARY_SENSORS): vol.All(

View File

@ -278,6 +278,8 @@ class ModbusHub:
_LOGGER.warning(
"`retries`: is deprecated and will be removed in version 2024.7"
)
else:
client_config[CONF_RETRIES] = 3
if CONF_CLOSE_COMM_ON_ERROR in client_config:
async_create_issue(
hass,