Remove deprecated CLOSE_COMM_ON_ERROR from modbus (#112821)
parent
6534943837
commit
797983236f
|
@ -61,7 +61,6 @@ from .const import ( # noqa: F401
|
|||
CONF_BAUDRATE,
|
||||
CONF_BYTESIZE,
|
||||
CONF_CLIMATES,
|
||||
CONF_CLOSE_COMM_ON_ERROR,
|
||||
CONF_DATA_TYPE,
|
||||
CONF_DEVICE_ADDRESS,
|
||||
CONF_FAN_MODE_AUTO,
|
||||
|
@ -374,7 +373,6 @@ MODBUS_SCHEMA = vol.Schema(
|
|||
{
|
||||
vol.Optional(CONF_NAME, default=DEFAULT_HUB): cv.string,
|
||||
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): cv.positive_int,
|
||||
vol.Optional(CONF_RETRY_ON_EMPTY): cv.boolean,
|
||||
|
|
|
@ -16,7 +16,6 @@ from homeassistant.const import (
|
|||
CONF_BAUDRATE = "baudrate"
|
||||
CONF_BYTESIZE = "bytesize"
|
||||
CONF_CLIMATES = "climates"
|
||||
CONF_CLOSE_COMM_ON_ERROR = "close_comm_on_error"
|
||||
CONF_DATA_TYPE = "data_type"
|
||||
CONF_DEVICE_ADDRESS = "device_address"
|
||||
CONF_FANS = "fans"
|
||||
|
|
|
@ -51,7 +51,6 @@ from .const import (
|
|||
CALL_TYPE_WRITE_REGISTERS,
|
||||
CONF_BAUDRATE,
|
||||
CONF_BYTESIZE,
|
||||
CONF_CLOSE_COMM_ON_ERROR,
|
||||
CONF_MSG_WAIT,
|
||||
CONF_PARITY,
|
||||
CONF_RETRIES,
|
||||
|
@ -273,24 +272,6 @@ class ModbusHub:
|
|||
)
|
||||
else:
|
||||
client_config[CONF_RETRIES] = 3
|
||||
if CONF_CLOSE_COMM_ON_ERROR in client_config:
|
||||
async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"deprecated_close_comm_config",
|
||||
breaks_in_ha_version="2024.4.0",
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
translation_key="deprecated_close_comm_config",
|
||||
translation_placeholders={
|
||||
"config_key": "close_comm_on_error",
|
||||
"integration": DOMAIN,
|
||||
"url": "https://www.home-assistant.io/integrations/modbus",
|
||||
},
|
||||
)
|
||||
_LOGGER.warning(
|
||||
"`close_comm_on_error`: is deprecated and will be removed in version 2024.4"
|
||||
)
|
||||
if CONF_RETRY_ON_EMPTY in client_config:
|
||||
async_create_issue(
|
||||
hass,
|
||||
|
|
|
@ -78,10 +78,6 @@
|
|||
"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_close_comm_config": {
|
||||
"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. All errors will be reported, as `lazy_error_count` is accepted but ignored."
|
||||
},
|
||||
"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."
|
||||
|
|
|
@ -42,7 +42,6 @@ from homeassistant.components.modbus.const import (
|
|||
CONF_BAUDRATE,
|
||||
CONF_BYTESIZE,
|
||||
CONF_CLIMATES,
|
||||
CONF_CLOSE_COMM_ON_ERROR,
|
||||
CONF_DATA_TYPE,
|
||||
CONF_DEVICE_ADDRESS,
|
||||
CONF_FAN_MODE_HIGH,
|
||||
|
@ -964,7 +963,6 @@ async def test_no_duplicate_names(do_config) -> None:
|
|||
CONF_TYPE: TCP,
|
||||
CONF_HOST: TEST_MODBUS_HOST,
|
||||
CONF_PORT: TEST_PORT_TCP,
|
||||
CONF_CLOSE_COMM_ON_ERROR: True,
|
||||
},
|
||||
{
|
||||
CONF_TYPE: TCP,
|
||||
|
|
Loading…
Reference in New Issue