* Report non-awaited/non-locked config entry platform forwards
Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.
In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.
If config platform forwards are happening during setup, they should be awaited
If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup
* Report non-awaited/non-locked config entry platform forwards
Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.
In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.
If config platform forwards are happening during setup, they should be awaited
If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup
* run with error on to find them
* cert_exp, hold lock
* cert_exp, hold lock
* shelly async_late_forward_entry_setups
* compact
* compact
* found another
* patch up mobileapp
* patch up hue tests
* patch up smartthings
* fix mqtt
* fix esphome
* zwave_js
* mqtt
* rework
* fixes
* fix mocking
* fix mocking
* do not call async_forward_entry_setup directly
* docstrings
* docstrings
* docstrings
* add comments
* doc strings
* fixed all in core, turn off strict
* coverage
* coverage
* missing
* coverage
* Add title feature to notify entity platform
* Add overload variants
* Remove overloads, update signatures
* Improve test coverage
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Do not use const
* fix typo
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add notify entity component
* Device classes, restore state, icons
* Add icons file
* Add tests for kitchen_sink
* Remove notify from no_entity_platforms in hassfest icons, translation link
* ruff
* Remove `data` feature
* Only message support
* Complete initial device classes
* mypy pylint
* Remove device_class implementation
* format
* Follow up comments
* Remove _attr_supported_features
* Use setup_test_component_platform
* User helper at other places
* last comment
* Add entry unload test and non async test
* Avoid default mutable object in constructor
* Support notification_id in notify.persistent_notification
* Apply suggestions from code review
Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>
* Complete migration of persistent notifications
Persistent notifications are no longer stored in
the state machine and no longer fire events
* Complete migration of persistent notifications
Persistent notifications are no longer stored in
the state machine and no longer fire events
* fixes
* fixes
* fixes
* ws test
* update tests
* update tests
* fix more tests
* fix more tests
* more fixes
* fix
* fix person
* fix person
* keep whitelist
* use singleton
* 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>
* Convert persistent notification tests to async
* Create/dismiss persistent notifications in exposed functions, not service calls
* Fix notify persistent_notification
* Remove setting up persistent_notification
* Drop more setups
* Empty methods
* Undeprecate sync methods because too big task
* Fix setup clearing notifications
* Fix a bunch of tests
* Fix more tests
* Uno mas
* Test persistent notification events
* Clean up stale comment
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add notify.html5_dismiss service
* fix test
* add can_dismiss
* fix service data payload
* fix hasattr -> getattr
* fixes
* move dismiss service to html5
* fix services.yaml
* fix line to long
* Add notify.homematic_signalgen
* Update homematic_signalgen.py, test_homematic_signalgen.py
* Added new files to .coveragerc
* Fixed review comments from houndci-bot
* Fixed pylint errors
* Regenerate requirements_test_all.txt by script/gen_requirements_all.py
* Fix flake8 warnings
* Renamed notify.homematic_signalgen to notify.homematic and made it generic
* Update .coveragerc and requirements_test_all.txt
* Removed the terms signal generator from the sources.
* YesssSMS handling more errors, upgrade to version 0.2.1
- handling missing internet connection nicely
- disabling login with non-working credentials (website locked account for 1 hour)
- upgrade to new upstream version of YesssSMS
* notify.yessssms tests
* test requirements
* flake8 fix
* fixing tests, new upstream version 0.2.3
fixing tests based on requested changes, coverage
* removing unmotivated print
* passing exception to ConnectionError and SMSSendingError logger
## Description:
More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).
## Checklist:
- [ ] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**