* Turn on thread safety checks in async_dispatcher_send
We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash
* Turn on thread safety checks in async_dispatcher_send
We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash
* adjust
* Adjust async_load_platform comment
Its likely the deadlock here has been fixed for a long time, however
we should still do these in a task because it has to wait for base
components if they are not loaded yet.
* Adjust async_load_platform comment
Its likely the deadlock here has been fixed for a long time, however
we should still do these in a task because it has to wait for base
components if they are not loaded yet.
* Run coroutines as eager tasks in async_run_hass_job
Note that this does not change async_add_hass_job
Do not merge this. For test run only
* Phase out periodic tasks
* false by default or some tests will block forever, will need to fix each one manually
* kwarg works
* kwarg works
* kwarg works
* fixes
* fix more tests
* fix more tests
* fix lifx
* opensky
* pvpc_hourly_pricing
* adjust more
* adjust more
* smarttub
* adjust more
* adjust more
* adjust more
* adjust more
* adjust
* no eager executor
* zha
* qnap_qsw
* fix more
* fix fix
* docs
* its a wrapper now
* add more coverage
* coverage
* cover all combos
* more fixes
* more fixes
* more fixes
* remaining issues are legit bugs in tests
* make tplink test more predictable
* more fixes
* feedreader
* grind out some more
* make test race safe
* limit first scope to triggers
* one more
* Start tasks eagerly in for async_at_start(ed)
A few of these can avoid being scheduled on the loop
during startup
* fix cloud
* Revert "fix cloud"
This reverts commit 5eb3ce695d.
* fix test to do what start does
* flip flag
* flip flag
* Fix here_travel_time creating many refresh requests at startup
- Each entity would try to refresh the coordinator which
created many tasks. Move the refresh to a single
async_at_started
- The tests fired the EVENT_HOMEASSISTANT_START event
but the code used async_at_started which only worked
because the tests did not set CoreState to not_running
* fix azure
* remove kw
* remove kw
* rip
* cover
* more rips
* more rips
* more rips
* Avoid more task creation in the discovery helper
There is no longer a reason to awaiti the jobs being dispatched
since nothing was using the result and there is no risk of
job being garbage collected prematurely anymore since
the task revamp
* Update homeassistant/helpers/discovery.py
* Fix notify discovery setup
* add test
* unsubscribe at reset
* Add guard
* move dispatcher to reload module
* only unsubscribe if platform was setup
* initialize dispatcher once and tests
* test get_service too
* add tests
* fix test
* use get_service for test invalid platform
* Test built-in reload method
* set to None after clearing dispatcher - tests
* Pathing services file
* Update tests/components/notify/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* dispatcher is not set twice if integration loaded
* empty discovery payload
* Removed not needed services.yaml mock
* Update tests/components/notify/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* flake8
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Type check all helpers, add inline exclusions for work in progress
* Remove unused Script._template_cache
* Add some missing type hints
* Remove unneeded type: ignore
* Type hint fixes
* Mypy assistance tweaks
* Don't look for None in deprecated config "at most once" check
* Avoid None name slugify attempt when generating entity id
* Avoid None state store attempt on entity remove
* phue -> aiohue
* Clean up
* Fix config
* Address comments
* Typo
* Fix rebase error
* Mark light as unavailable when bridge is disconnected
* Tests
* Make Throttle work with double delay and async
* Rework update logic
* Don't resolve host to IP
* Clarify comment
* No longer do unnecessary updates
* Add more doc
* Another comment update
* Wrap up tests
* Lint
* Fix tests
* PyLint does not like mix 'n match async and coroutine
* Lint
* Update aiohue to 1.2
* Lint
* Fix await MagicMock