Migrate ping to use async_update_entry to alter config entries (#110404)

pull/110414/head
J. Nick Koston 2024-02-12 14:25:17 -06:00 committed by GitHub
parent 7dcf2e94b4
commit 4a98f3f223
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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()