Skip to content

Commit

Permalink
Use translation placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST committed Sep 9, 2023
1 parent 28ce789 commit 0ceee82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions homeassistant/components/modbus/modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ def __init__(self, hass: HomeAssistant, client_config: dict[str, Any]) -> None:
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 remove in version 2024.4"
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/modbus/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
},
"issues": {
"deprecated_close_comm_config": {
"title": "`close_comm_on_error` configuration key is being removed",
"description": "Please remove the `close_comm_on_error` key from the modbus entry in your configuration.yaml file and restart Home Assistant to fix this issue.\n\nCommunication is automatically closed on errors. Please review the other parameters for error handling, please see https://www.home-assistant.io/integrations/modbus"
"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\nCommunication is automatically closed on errors, please review the other parameters for error handling, please see [the documentation]({url})."
}
}
}

0 comments on commit 0ceee82

Please sign in to comment.