Move legacy device_tracker setup to a tracked task (#113715)

* Move legacy device_tracker setup to a tracked task

Legacy platforms are now loaded in a tracked task which
allows anything waiting on device_tracker (such as
a config entry that uses the device_tracker
platform) to proceed.

This also allows us to remove the workaround
of adding device_tracker to
hass.config.components in its setup

* tweak

* tweak

* fix tests
This commit is contained in:
J. Nick Koston 2024-03-17 23:39:59 -10:00 committed by GitHub
parent 3844ade572
commit 8a144d16f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 25 deletions

View file

@ -310,6 +310,7 @@ async def test_entity_attributes(
with assert_setup_component(1, device_tracker.DOMAIN):
assert await async_setup_component(hass, device_tracker.DOMAIN, TEST_PLATFORM)
await hass.async_block_till_done()
attrs = hass.states.get(entity_id).attributes