From 5528ae97071f3ef949180289c3e88b647eb8d29a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 12 Feb 2024 02:39:05 -0600 Subject: [PATCH] Migrate knx to use async_update_entry to alter config entries (#110312) --- tests/components/knx/test_telegrams.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/components/knx/test_telegrams.py b/tests/components/knx/test_telegrams.py index 964b9ea2a11..d523a0d646a 100644 --- a/tests/components/knx/test_telegrams.py +++ b/tests/components/knx/test_telegrams.py @@ -105,9 +105,10 @@ async def test_remove_telegam_history( ): """Test telegram history removal when configured to size 0.""" hass_storage["knx/telegrams_history.json"] = {"version": 1, "data": MOCK_TELEGRAMS} - knx.mock_config_entry.data = knx.mock_config_entry.data | { - CONF_KNX_TELEGRAM_LOG_SIZE: 0 - } + hass.config_entries.async_update_entry( + knx.mock_config_entry, + data=knx.mock_config_entry.data | {CONF_KNX_TELEGRAM_LOG_SIZE: 0}, + ) await knx.setup_integration({}) # Store.async_remove() is mocked by hass_storage - check that data was removed. assert "knx/telegrams_history.json" not in hass_storage