diff --git a/homeassistant/components/modbus/__init__.py b/homeassistant/components/modbus/__init__.py index 09112e16767..d008f5d167c 100644 --- a/homeassistant/components/modbus/__init__.py +++ b/homeassistant/components/modbus/__init__.py @@ -97,7 +97,6 @@ from .const import ( # noqa: F401 CONF_PARITY, CONF_PRECISION, CONF_RETRIES, - CONF_RETRY_ON_EMPTY, CONF_SCALE, CONF_SLAVE_COUNT, CONF_STATE_CLOSED, @@ -375,7 +374,6 @@ MODBUS_SCHEMA = vol.Schema( vol.Optional(CONF_TIMEOUT, default=3): cv.socket_timeout, vol.Optional(CONF_DELAY, default=0): 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( cv.ensure_list, [BINARY_SENSOR_SCHEMA] diff --git a/homeassistant/components/modbus/const.py b/homeassistant/components/modbus/const.py index 3a7b25ad786..425bd744a1e 100644 --- a/homeassistant/components/modbus/const.py +++ b/homeassistant/components/modbus/const.py @@ -29,7 +29,6 @@ CONF_MSG_WAIT = "message_wait_milliseconds" CONF_NAN_VALUE = "nan_value" CONF_PARITY = "parity" CONF_RETRIES = "retries" -CONF_RETRY_ON_EMPTY = "retry_on_empty" CONF_PRECISION = "precision" CONF_SCALE = "scale" CONF_SLAVE_COUNT = "slave_count" diff --git a/homeassistant/components/modbus/modbus.py b/homeassistant/components/modbus/modbus.py index 36c081df616..7138341d445 100644 --- a/homeassistant/components/modbus/modbus.py +++ b/homeassistant/components/modbus/modbus.py @@ -54,7 +54,6 @@ from .const import ( CONF_MSG_WAIT, CONF_PARITY, CONF_RETRIES, - CONF_RETRY_ON_EMPTY, CONF_STOPBITS, DEFAULT_HUB, MODBUS_DOMAIN as DOMAIN, @@ -272,24 +271,6 @@ class ModbusHub: ) else: client_config[CONF_RETRIES] = 3 - if CONF_RETRY_ON_EMPTY in client_config: - async_create_issue( - hass, - DOMAIN, - "deprecated_retry_on_empty", - breaks_in_ha_version="2024.4.0", - is_fixable=False, - severity=IssueSeverity.WARNING, - translation_key="deprecated_retry_on_empty", - translation_placeholders={ - "config_key": "retry_on_empty", - "integration": DOMAIN, - "url": "https://www.home-assistant.io/integrations/modbus", - }, - ) - _LOGGER.warning( - "`retry_on_empty`: is deprecated and will be removed in version 2024.4" - ) # generic configuration self._client: ModbusBaseClient | None = None self._async_cancel_listener: Callable[[], None] | None = None diff --git a/homeassistant/components/modbus/strings.json b/homeassistant/components/modbus/strings.json index 12023579669..4f7bb1c60e3 100644 --- a/homeassistant/components/modbus/strings.json +++ b/homeassistant/components/modbus/strings.json @@ -77,10 +77,6 @@ "deprecated_retries": { "title": "`{config_key}` configuration key is being removed", "description": "Please remove the `{config_key}` key from the {integration} entry in your configuration.yaml file and restart Home Assistant to fix this issue.\n\nThe maximum number of retries is now fixed to 3." - }, - "deprecated_retry_on_empty": { - "title": "`{config_key}` configuration key is being removed", - "description": "Please remove the `{config_key}` key from the {integration} entry in your configuration.yaml file and restart Home Assistant to fix this issue.\n\nRetry on empty is automatically applied, see [the documentation]({url}) for other error handling parameters." } } } diff --git a/tests/components/modbus/test_init.py b/tests/components/modbus/test_init.py index 20eecf49591..aaf2b335b90 100644 --- a/tests/components/modbus/test_init.py +++ b/tests/components/modbus/test_init.py @@ -60,7 +60,6 @@ from homeassistant.components.modbus.const import ( CONF_MSG_WAIT, CONF_PARITY, CONF_RETRIES, - CONF_RETRY_ON_EMPTY, CONF_SLAVE_COUNT, CONF_STOPBITS, CONF_SWAP, @@ -974,7 +973,6 @@ async def test_no_duplicate_names(do_config) -> None: CONF_TYPE: TCP, CONF_HOST: TEST_MODBUS_HOST, CONF_PORT: TEST_PORT_TCP, - CONF_RETRY_ON_EMPTY: True, }, { CONF_TYPE: TCP,