Commit Graph

18215 Commits (55b2d1a00c4dab390cc749eef2ed0f4a0e6eedc0)

Author SHA1 Message Date
puddly 55b2d1a00c
Disable updating ZHA coordinator path from discovery info (#112415)
* 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>
2024-03-08 14:33:33 -05:00
Marc Mueller 959826c4b4
Update byte string formatting (#112752) 2024-03-08 20:32:40 +01:00
Sid 0e86f182cc
Add diagnostics to webmin (#112543) 2024-03-08 20:09:31 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller cb8c14496c
Use more f-strings [ruff] (#112695) 2024-03-08 18:44:42 +01:00
jan iversen ea89fa6b1e
Allow duplicate names in different modbus entities (#112701)
Allow duplicate names in different entities.
2024-03-08 15:10:35 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Marc Mueller c88b337600
Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
Marc Mueller 7d6251ca08
Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
Marc Mueller 87165c0d6e
Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
Marc Mueller 2d701d5a7d
Use aiohttp.AppKey for http cors keys (#112658) 2024-03-08 11:51:59 +01:00
Thomas55555 9ba5159ae2
Add reauthentication for husqvarna_automower (#109930)
* Add reauthentication for husqvarna_automower

* Remove unneded lines

* Don't extract token on reauth

* Update homeassistant/components/husqvarna_automower/config_flow.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update tests/components/husqvarna_automower/conftest.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Use helper

* Test if authentication is done with the right account

* switch to ConfigFlowResult

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-08 11:30:39 +01:00
Marc Mueller eb8f8e1ae4
Use aiohttp.AppKey for http ban keys (#112657) 2024-03-08 11:13:24 +01:00
Jim d2effd8693
Bump python-telegram-bot package to 21.0.1 (#110297)
* 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>
2024-03-08 08:56:26 +01:00
J. Nick Koston a6b17dbe68
Schedule polling as periodic tasks (#112640)
* 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
2024-03-07 23:32:26 -05:00
Joost Lekkerkerker c1d45f63f5
Fix Bang and olufsen naming (#111344)
* Fix Bang and olufsen naming

* Fix

* Fix tests

* Fix tests
2024-03-07 20:15:52 +01:00
Marc Mueller f3594c543d
Use KEY_HASS [a-g] (#112609) 2024-03-07 18:09:20 +01:00
Marc Mueller 8ca127df2a
Use KEY_HASS [h-z] (#112610) 2024-03-07 18:03:44 +01:00
Erik Montnemery fa4c0d78e9
Restore the juicenet integration (#112578) 2024-03-07 16:41:54 +01:00
Marc Mueller 531e25cbc6
Change KEY_HASS to be an aiohttp AppKey (#111954) 2024-03-07 13:37:48 +01:00
Joost Lekkerkerker d42dd0114d
Add icon translations to Twinkly (#112328) 2024-03-07 12:33:28 +01:00
J. Nick Koston 1fb9cfe37e
Speed up the frame helper (#112562) 2024-03-06 20:54:09 -10:00
J. Nick Koston 1772e5257c
Move analytics setup to later stage to avoid delaying frontend startup (#112535)
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
2024-03-06 20:37:41 -05:00
Joost Lekkerkerker 74dabff4a7
Add icon translations to Waze Travel Time (#112352)
* Add icon translations to Waze Travel Time

* Fix tests
2024-03-06 17:06:41 -05:00
J. Nick Koston 675b1a392b
Fix homekit creating executor jobs to resolve default listen ips (#112522) 2024-03-06 11:46:23 -10:00
Sid d50e4f6645
Add snapshot tests to webmin (#112518)
add snapshot tests to webmin
2024-03-06 20:22:08 +01:00
Erik Montnemery 770e48d512
Simplify color mode logic in Tuya light (#110327)
* Simplify color mode logic in Tuya light

* Remove exclusion from LightEntity.__should_report_light_issue

* Fix test
2024-03-06 18:28:12 +01:00
Joost Lekkerkerker c8f39911cc
Enable some PERF rules (#112498)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-06 17:50:41 +01:00
Joost Lekkerkerker 656ef143da
Add icon translations to Wallbox (#112350)
* Add icon translations to Wallbox

* fix
2024-03-06 16:27:13 +01:00
Joost Lekkerkerker f368457544
Add icon translations to Sonarr (#112233) 2024-03-06 16:05:35 +01:00
Joost Lekkerkerker 0cdc90468e
Add icon translations to Tailscale (#112302) 2024-03-06 13:38:32 +01:00
Joost Lekkerkerker a23dbe4727
Add icon translations to Whois (#112356) 2024-03-06 13:36:01 +01:00
Joost Lekkerkerker 6be2fa1293
Add icon translations to Zerproc (#112366) 2024-03-06 13:35:08 +01:00
Joost Lekkerkerker 503d39ef0d
Add icon translations to TP-Link Omada (#112318)
* Add icon translations to TP-Link Omada

* Add icon translations to TP-Link Omada
2024-03-06 12:36:20 +01:00
Joost Lekkerkerker dc2d83f131
Add icon translations to ViCare (#112346)
* Add icon translations to ViCare

* Add icon translations to ViCare
2024-03-06 12:35:30 +01:00
Joost Lekkerkerker c00426293d
Add icon translations to Twentemilieu (#112327) 2024-03-06 11:51:23 +01:00
Joost Lekkerkerker c8f340966e
Add icon translations to Elgato (#111423) 2024-03-06 11:49:36 +01:00
Joost Lekkerkerker 2c42517ac4
Add icon translations to Tailwind (#112303) 2024-03-06 11:37:05 +01:00
Thomas55555 0a11cb5382
Avoid errors when there is no internet connection in Husqvarna Automower (#111101)
* 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>
2024-03-06 11:25:56 +01:00
Aidan Timson 2599252600
Post System Bridge 4.x.x integration improvements (#112189)
* 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>
2024-03-06 10:47:21 +01:00
J. Nick Koston 72ac2f127f
Wait to start emulated_hue until the started event (#112477) 2024-03-05 22:25:11 -10:00
Brett Adams f801ec45ce
Bump tesla-fleet-api to 0.4.9 (#112288)
* Bump to 0.4.9

* Use SubscriptionRequired instead of PaymentRequired
2024-03-06 09:09:15 +01:00
J. Nick Koston f3a9756f81
Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10:00
Joost Lekkerkerker fdb85f9e9e
Add icon translations to TechnoVE (#112306)
* Add icon translations to TechnoVE

* Add icon translations to TechnoVE
2024-03-06 06:31:58 +01:00
J. Nick Koston aa216f0298
Add system_health to the hassio pre-imports to avoid a late executor job (#112466)
* 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
2024-03-05 21:31:38 -05:00
J. Nick Koston 3f9dbd3e25
Fix config modules being imported in the event loop (#112462)
* 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
2024-03-05 21:18:57 -05:00
J. Nick Koston 235771aaa2
Bump SQLAlchemy to 2.0.28 (#112314) 2024-03-05 12:14:30 -10:00
jan iversen 4a1681bb4b
Allow duplicate modbus addresses on different devices (#112434) 2024-03-05 22:11:04 +01:00
Robert Svensson 7c9891fff9
Break out UniFi config handling to own class (#111325) 2024-03-05 21:36:26 +01:00