Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Schedule periodic coordinator updates as background tasks.
Currently, the coordinator's periodic refreshes delay startup because they are not scheduled as background tasks. We will wait if the startup takes long enough for the first planned refresh. Another coordinator's scheduled refresh will be fired on busy systems, further delaying the startup. This chain of events results in the startup taking a long time and hitting the safety timeout because too many coordinators are refreshing.
This case can also happen with scheduled entity refreshes, but it's less common. A future PR will address that case.
* periodic_tasks
* periodic_tasks
* periodic_tasks
* merge
* merge
* merge
* merge
* merge
* fix test that call the sync api from async
* one more place
* cannot chain
* async_run_periodic_hass_job
* sun and pattern time changes from automations also block startup
* Revert "sun and pattern time changes from automations also block startup"
This reverts commit 6de2defa05.
* make sure polling is cancelled when config entry is unloaded
* Revert "Revert "sun and pattern time changes from automations also block startup""
This reverts commit e8f12aad55.
* remove DisabledError from homewizard test as it relies on a race
* fix race
* direct coverage
* Backport code from #86386
* Add tests
* Remove local dev change
* Implement device class validation based on unit
* Swap sensor and externalsensor classes (based on importance)
* Use translations for external sensor entities
* Re-add meter identifier as sensor for external devices
* Add migration for Gas identifier
* Rename HomeWizardExternalIdentifierSensorEntity class
* Fix all existing tests
* Reimplement tests for extenal devices with smapshots
* Remove non-used 'None' type in unit
* Add migration test
* Clean up parameterize
* Add test to fix last coverage issue
* Fix non-frozen mypy issue
* Set device name via added EntityDescription field
* Remove device key translations for external sensors,
* Bring back translation keys
* Set device unique_id as serial number
* Remove meter identifier sensor
* Simplify external device initialization
* Adjust tests
* Remove unused gas_meter_id migration
* Remove external_devices redaction
* Remove old gas meter id sensor after migration