* Never update the device path from config flows
* Bring coverage up to 100%
* Update tests/components/zha/test_config_flow.py
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
---------
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
* Bump python-telegram-bot package version to the latest.
* PySocks is no longer required as python-telegram-bot doesn't use urllib3 anymore.
* Fix moved ParseMode import
* Update filters import to new structure.
* Refactor removed Request objects to HTTPXRequest objects.
* Update to support asyncc functions
* Update timeout to new kwarg
connect_timeout is the most obvious option based on current param description, but this may need changing.
* Compatibility typo.
* Make methods async and use Bot client async natively
* Type needs to be Optional
That's what the source types are from the library
Also handle new possibility of None value
* Add socks support version of the library
* Refactor load_data function
Update to be async friendly
Refactor to use httpx instead of requests.
* Refactor Dispatcher references to Application
This is the newer model of the same class.
* Make more stuff async-friendly.
* Update tests to refactor Dispatcher usage out.
* Remove import and reference directly
* Refactor typing method
* Use async_fire now we have async support
* Fix some over complicate inheritance.
* Add the polling test telegram_text event fired back in.
* Add extra context to comment
* Handler should also be async
* Use underscores instead of camelCase
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Renamed kwarg.
* Refactor current timeout param to be read timeout
Reading the old version of the library code I believe this matches the existing functionality best
* Combine unload methods into one listener
* Fix test by stopping HA as part of fixture
* Add new fixture to mock stop_polling call
Use this in all polling tests.
* No longer need to check if application is running
It was to stop a test failing.
* Make sure the updater is started in tests
Mock external call methods
Remove stop_polling mock.
* Use cleaner references to patched methods
* Improve test by letting the library create the Update object
* Mock component tear down methods to be async
* Bump mypy cache version
* Update dependency to install from git
Allows use as a custom component in 2024.3
Allows us to track mypy issue resolution.
* Update manifest and requirements for new python-telegram-bot release.
* Remove pytest filterwarnings entry for old version of python-telegram-bot library.
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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
Move analytics setup to stage 1 to avoid delaying frontend startup
analytics was only needed in the frontend startup phase for onboarding.
Its very unlikely the user will be able to complete the onboarding
steps and get to the analytics screen before analytics is done loading
so we can delay loading it until stage 1. To be absolutely sure that
it is ready, the core_config step in onboarding will wait to proceed
if it is some how still being setup
* Avoid errors when no internet connection
* Add error
* Create task in HA
* change from matter to automower
* tests
* Update homeassistant/components/husqvarna_automower/coordinator.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* address review
* Make websocket optional
* fix aioautomower version
* Fix tests
* Use stored websocket
* reset reconnect time after sucessful connection
* Typo
* Remove comment
* Add test
* Address review
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Dont remove api key during migration
* Fix return
* Fix test
* Make lambda more readable
* Move fixtures to init, move migration test to test_init.py
* Refactor config_entry data assignment
* Refactor system_bridge migration tests
* Fix type for debug message
* Fix type for debug message
* Remove duplicated unused code (rebase error)
* Refactor test_migration_minor_2_to_1 to test_migration_minor_future_to_2
* Fix version check in async_migrate_entry
* Update migration logic to handle future minor version
* Add ConfigEntryState assertion in test_init.py
* Change condition to minor_version < 2
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Refactor system bridge migration tests
* Remove minor downgrade code
* Update tests/components/system_bridge/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/system_bridge/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Move dataclass to store requested data to data.py
* Use dataclass in config flow
* Move media player and sensor onto data.py dataclass
* Move data and handler inside validate
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add system_health to the hassio pre-imports to avoid a late executor job
`2024-03-05 17:01:33.034 DEBUG (MainThread) [homeassistant.loader] Importing platforms for hassio executor=[system_health] loop=[] took 0.12s`
This one does not take that much time but it happens at a time where
the import executor is the most busy during startup
* key
* move patch as its too early now
* Fix config modules being imported in the event loop
There was a late import in this integration because of the circular import.
The code has been rearranged to avoid the circular imports
* fixes
* fixes
* fix patching
* make eager
* remove unrelated change from this branch