This test currently relies on event loop overhead and since #110899
will remove another task in the config entry init flow, it needs
another async_block_till_done. In the future it should be refactored
to have better synchronization without having to rely on iterations
of the event loop.
* Show WebRTC cameras in the media browser
* Only show webrtc cameras with source in the browser
* Address code review
* Refactor BrowseMediaSource creation
* Refactor
* Address code review
* Refactor integration startup time tracking to reduce overhead
- Use monotonic time for watching integration startup time as it avoids incorrect values if time moves backwards because of ntp during startup and reduces many time conversions since we want durations in seconds and not local time
- Use loop scheduling instead of a task
- Moves all the dispatcher logic into the new _WatchPendingSetups
* websocket as well
* tweaks
* simplify logic
* preserve logic
* preserve logic
* lint
* adjust
* Avoid creating tasks for checking integrations platforms
This is a followup to #110743 to avoid creating a task to check
if the integration platform exists. We created tasks because
we needed to await async_get_integrations but since its always
called from EVENT_COMPONENT_LOADED firing, we can use the
async_get_loaded_integration version which does not need
to be awaited. This eliminates one task for every loaded
component
* there is no more race risk
* reduce
* coro or callback
* reduce
* tweak
* race safe
* fix type
* fixes
* use built-in helper to make it smaller
* use built-in helper to make it smaller
* use built-in helper to make it smaller
* add coverage to ensure exceptions are logged
* improve readability a bit
* platforms
* Improve performance of async_get_integration_with_requirements
- Migrate to the future pattern instead of using asyncio.Event
- Use sets in a few places to avoid linear searching
- Check the cache when processing deps so we do not
create tasks to process requirements for deps that
have already been processed
* name
* add concurrency test
* Update homeassistant/requirements.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/requirements.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/requirements.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/requirements.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* reset_mock
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* WIP test
* WIP
* WIP Reauth flow. Test fail otherways OK.
* Minor adjustments to tests
* Merge
* Merge
* Next level...
* Cleanup according to review
* It works!
* Simplify setup
* Remove default
* Remove files from PR
* Add back test_init
* Add back test_sensor
* Adjust error message
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
reverts #110751 and replaces it with a change to wait for the
assist_pipeline.async_pipeline_from_audio_stream to be called
which will actually solve the problem and unblock #110743