* Fix late load of anyio doing blocking I/O in the event loop
httpx loads anyio which loads the asyncio backend in the event loop
as soon as httpx makes the first request
* tweak
* Mark executor jobs as background unless created from a tracked task
If the current task is not tracked the executor job should not
be a background task to avoid delaying startup and shutdown.
Currently any executor job created in a untracked task or
background task would end up being tracked and delaying
startup/shutdown
* import exec has the same issue
* Avoid tracking import executor jobs
There is no reason to track these jobs as they are always awaited
and we do not want to support fire and forget import executor jobs
* fix xiaomi_miio
* lots of fire time changed without background await
* revert changes moved to other PR
* more
* more
* more
* m
* m
* p
* fix fire and forget tests
* scrape
* sonos
* system
* more
* capture callback before block
* coverage
* more
* more races
* more races
* more
* missed some
* more fixes
* missed some more
* fix
* remove unneeded
* one more race
* two
* Add missing platforms_exist guard to check_config
related issue #112811
When the exception hits, the config will end up being saved in the traceback
so the memory is never released.
This matches the check_config code to homeassistant.config to avoid having
the exception thrown.
* patch
* merge branch
* Fix memory leak when importing a platform fails
re-raising ImportError would trigger a memory leak
* fixes, coverage
* Apply suggestions from code review
* Default agent as entity
* Migrate constant to point at new value
* Fix tests
* Fix more tests
* Move assist pipeline back to cloud after dependenceis
* Fix for URL encoding problem #102557
Fixes the problem "Cannot play media with spaces in folder names to Sonos #102557" removing the encoding of the strings in the music library.
* Fix type casting problem
* Update media_browser.py to fix pr check findings
Added required casting for all unquote statements to avoid further casting findings in the pr checks
* Update media_browser.py
Checked on linting, lets give it another try
* Update media_browser.py
Updated ruff run
* Update media_browser.py - added version run through ruff
* Update media_browser.py - ruff changes
* Apply ruff formatting
* Update homeassistant/components/sonos/media_browser.py
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* Update homeassistant/components/sonos/media_browser.py
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* Update homeassistant/components/sonos/media_browser.py
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
* Update homeassistant/components/sonos/media_browser.py
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
---------
Co-authored-by: computeq-admin <51021172+computeq-admin@users.noreply.github.com>
Co-authored-by: Jason Lawrence <jjlawren@users.noreply.github.com>
* call entity state update calls in one executer task
* remove not needed wrapping
* mark as "non-public" method
* add guard against changes on _entity_update_functions
* Ensure coverage entries are sorted
* Use autofix
* Adjust
* Add comment to coverage file
* test CI
* revert CI test
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add uptime sensor to Glances
* Merge upstream
* Merge upstream
* Fix coverage
* Add uptime sensor to Glances
* Merge upstream
* Merge upstream
* Fix coverage
* Move most uptime specific code to DataUpdateCoordinator
* Add last_reported after merge with upstream
* Add unit tests for uptime sensor
* Add unit tests for uptime sensor
* Add unit tests for uptime sensor
* Add unit tests for uptime sensor
* Move update code out of getter native_value()
* Add unit tests for uptime sensor
* Update uptime method signatures
* Set uptime icon in icons.json
* Use freezer.tick for uptime tests
* Frozen time test fails on github
* Add MIN_UPTIME_VARIATION const value
* Only update uptime on startup or when remote server restarts
* Fix for 0 values
* Set value to None to set state to Unknown if key is not found
* Add unit test for uptime change
* Code reduction
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>