* Move setup of legacy device_tracker see service to legacy setup task
device_tracker can setup synchronously now if there are no legacy
platforms that have to be import to validate the config
The see service is not useful until at least one legacy platform
is loaded so there is no reason to wait for it in the base
setup.
* collapse
* Refactor setup time tracking to exclude time waiting on other operations
We now exclude the import time and th time waiting on
base platforms to setup from the setup times
* tweak
* tweak
* tweak
* tweak
* adjust
* fixes
* fixes
* preen
* preen
* tweak
* tweak
* adjust
* tweak
* reduce
* do not count integrtion platforms against their parent integration
* handle legacy tts platforms
* stt as well
* one more wait
* use the same pattern in all the legacy
* fix tts and stt legacy
* fix
* fix
* reduce
* preen
* entity comp does not wait for platforms
* scene blocks as well
* fix test
* test fixes
* coverage
* coverage
* coverage
* fix test
* Update tests/test_setup.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/test_setup.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/setup.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* strip
* strip WAIT_PLATFORM_INTEGRATION
* strip WAIT_PLATFORM_INTEGRATION
* strip WAIT_PLATFORM_INTEGRATION
* strip WAIT_PLATFORM_INTEGRATION
* remove complexity
* Apply suggestions from code review
* no longer works that way
* fixes
* fixes
* fixes
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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
* Prevent legacy device tracker from creating hundreds of executor jobs
The legacy device tracker would create an executor job for
each set of extra state attributes and device name lookup.
For routers this meant hundreds of jobs
* Prevent legacy device tracker from creating hundreds of executor jobs
The legacy device tracker would create an executor job for
each set of extra state attributes and device name lookup.
For routers this meant hundreds of jobs
* tweak
* simplify
* Allow passing an optional name to async_track_time_interval
This is the same idea as passing a name to asyncio.create_task which
makes it easier to track down bugs
* more
* short
* still cannot find it
* add a few more
* test
* Adjust base helper
* Filter type is not None in mailbox
* Filter empty platforms in device_tracker
* Filter out empty platform in notify
* Filter out empty platform in entity_component
Co-authored-by: epenet <epenet@users.noreply.github.com>