From 4a98f3f223ac8fc50b0da5184847ca85c36b113a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 12 Feb 2024 14:25:17 -0600 Subject: [PATCH] Migrate ping to use async_update_entry to alter config entries (#110404) --- tests/components/ping/test_binary_sensor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/components/ping/test_binary_sensor.py b/tests/components/ping/test_binary_sensor.py index b1066895e2b..68f647008e3 100644 --- a/tests/components/ping/test_binary_sensor.py +++ b/tests/components/ping/test_binary_sensor.py @@ -50,8 +50,10 @@ async def test_disabled_after_import( entity_registry: er.EntityRegistry, ): """Test if binary sensor is disabled after import.""" - config_entry.data = {CONF_IMPORTED_BY: "device_tracker"} config_entry.add_to_hass(hass) + hass.config_entries.async_update_entry( + config_entry, data={CONF_IMPORTED_BY: "device_tracker"} + ) assert await async_setup_component(hass, DOMAIN, {}) await hass.async_block_till_done()