From 5ab4b5d15a0e185b428614eceb16e5a755626073 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Fri, 4 Mar 2022 12:39:29 +0100 Subject: [PATCH] MQTT Improve warning override deprecated settings (#67609) --- homeassistant/components/mqtt/__init__.py | 6 +++--- tests/components/mqtt/test_init.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index bbe773f141c..199b6238770 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -615,9 +615,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: override = {k: entry.data[k] for k in shared_keys} if CONF_PASSWORD in override: override[CONF_PASSWORD] = "********" - _LOGGER.info( - "Data in your configuration entry is going to override your " - "configuration.yaml: %s", + _LOGGER.warning( + "Deprecated configuration settings found in configuration.yaml. " + "These settings from your configuration entry will override: %s", override, ) diff --git a/tests/components/mqtt/test_init.py b/tests/components/mqtt/test_init.py index 44803f2a5f6..87eddd4421f 100644 --- a/tests/components/mqtt/test_init.py +++ b/tests/components/mqtt/test_init.py @@ -1248,7 +1248,8 @@ async def test_setup_override_configuration(hass, caplog, tmp_path): await hass.async_block_till_done() assert ( - "Data in your configuration entry is going to override your configuration.yaml:" + "Deprecated configuration settings found in configuration.yaml. " + "These settings from your configuration entry will override:" in caplog.text )