mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Deprecate knx config_file (#46874)
* deprecate config_file * removed cv.deprecated for now, added persistent notification * Update homeassistant/components/knx/__init__.py Co-authored-by: Philip Allgaier <philip.allgaier@gmx.de> * remove notification, add cv.deprecated again * Update homeassistant/components/knx/__init__.py Co-authored-by: Franck Nijhof <frenck@frenck.nl> * remove cv.deprecated again Co-authored-by: Philip Allgaier <philip.allgaier@gmx.de> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
92afcb6b4b
commit
dadc99dbd3
@ -78,6 +78,7 @@ SERVICE_KNX_READ = "read"
|
|||||||
CONFIG_SCHEMA = vol.Schema(
|
CONFIG_SCHEMA = vol.Schema(
|
||||||
{
|
{
|
||||||
DOMAIN: vol.All(
|
DOMAIN: vol.All(
|
||||||
|
# deprecated since 2021.2
|
||||||
cv.deprecated(CONF_KNX_FIRE_EVENT),
|
cv.deprecated(CONF_KNX_FIRE_EVENT),
|
||||||
cv.deprecated("fire_event_filter", replacement_key=CONF_KNX_EVENT_FILTER),
|
cv.deprecated("fire_event_filter", replacement_key=CONF_KNX_EVENT_FILTER),
|
||||||
vol.Schema(
|
vol.Schema(
|
||||||
@ -242,6 +243,15 @@ async def async_setup(hass, config):
|
|||||||
"https://www.home-assistant.io/blog/2020/09/17/release-115/#breaking-changes"
|
"https://www.home-assistant.io/blog/2020/09/17/release-115/#breaking-changes"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# deprecation warning since 2021.3
|
||||||
|
if CONF_KNX_CONFIG in config[DOMAIN]:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"The 'config_file' option is deprecated. Please replace it with Home Assistant config schema "
|
||||||
|
"directly in `configuration.yaml` (see https://www.home-assistant.io/integrations/knx/). \n"
|
||||||
|
"An online configuration converter tool for your `%s` is available at https://xknx.io/config-converter/",
|
||||||
|
config[DOMAIN][CONF_KNX_CONFIG],
|
||||||
|
)
|
||||||
|
|
||||||
hass.services.async_register(
|
hass.services.async_register(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_KNX_SEND,
|
SERVICE_KNX_SEND,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user