Commit Graph

74155 Commits (d7e7dc96cc7f79d15095704f78869ba860a5042a)

Author SHA1 Message Date
Marc Mueller d7e7dc96cc
Make Event data generic (#111955) 2024-03-08 13:46:16 +01:00
Aidan Timson f8b05a0a81
Update systembridgeconnector to version 4.0.3 (#112608) 2024-03-08 12:11:17 +01:00
Robert Resch 7926a76da5
Bump devcontainer to 1-3.12 (#108709) 2024-03-08 12:00:48 +01:00
Mr. Bubbles 6e807df22e
Fix incorrect filtering of unsupported locales in bring-api (#112589) 2024-03-08 11:55:18 +01:00
Marc Mueller 2d701d5a7d
Use aiohttp.AppKey for http cors keys (#112658) 2024-03-08 11:51:59 +01:00
Aaron Bach 9555e8764a
Bump `aionotion` to 2024.03.0 (#112675) 2024-03-08 11:51:05 +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 4893087a7e
Add TypeVar defaults for DataUpdateCoordinator (#111949) 2024-03-08 11:14:16 +01:00
Marc Mueller eb8f8e1ae4
Use aiohttp.AppKey for http ban keys (#112657) 2024-03-08 11:13:24 +01:00
J. Nick Koston 7dcf275966
Speed up importing mqtt platforms (#112682)
Use async_forward_entry_setups so platforms can be loaded in a single
executor job instead of many:

Currently they all have to create a new job because it did not use
async_forward_entry_setups

```
2024-03-08 08:29:29.819 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[light] loop=[] took 12.12s
2024-03-08 08:29:29.822 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[number] loop=[] took 12.12s
2024-03-08 08:29:29.826 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[scene] loop=[] took 12.13s
2024-03-08 08:29:29.829 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[select] loop=[] took 12.13s
2024-03-08 08:29:29.833 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[sensor] loop=[] took 12.14s
2024-03-08 08:29:30.882 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[update] loop=[] took 13.18s
2024-03-08 08:29:30.948 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[button] loop=[] took 13.18s
2024-03-08 08:29:30.949 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[climate] loop=[] took 13.19s
2024-03-08 08:29:31.012 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[fan] loop=[] took 13.25s
2024-03-08 08:29:31.019 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[humidifier] loop=[] took 13.25s
2024-03-08 08:29:31.024 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[image] loop=[] took 13.26s
2024-03-08 08:29:31.034 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[lock] loop=[] took 13.27s
2024-03-08 08:29:31.045 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[vacuum] loop=[] took 13.28s
2024-03-08 08:29:31.050 DEBUG (MainThread) [homeassistant.loader] Importing platforms for mqtt executor=[valve] loop=[] took 13.28s
```
2024-03-08 10:30:31 +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
Robert Svensson 15b59d310a
Bump axis to v52 (#112632)
* Bump axis to v51

* Bump to v52
2024-03-08 07:42:37 +01:00
J. Nick Koston caefdc6192
Avoid writing registries to disk during startup (#112662) 2024-03-07 19:14:42 -10:00
J. Nick Koston 0382d628a3
Close hue api if setup fails (#112164)
fixes #109722
2024-03-07 23:39:44 -05:00
J. Nick Koston a12fa0383b
Make zeroconf lookups background tasks (#112669)
* Make zeroconf lookups background tasks

There were blocking startup and shutdown

* disable for now
2024-03-07 23:37:56 -05:00
J. Nick Koston d40bd0f6c8
Fix dhcp delaying shutdown (#112670) 2024-03-07 23:37:43 -05:00
J. Nick Koston c101eb5001
Fix homekit_controller delaying startup and shutdown (#112671)
The alive poll was scheduled as a tracked task but should have
been a background task so it was cancelled.
2024-03-07 23:37:22 -05: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
J. Nick Koston 5da629b3e5
Log waiting tasks in bootstrap that are delaying startup (#112637) 2024-03-07 13:18:18 -10:00
jan iversen 27af6f1466
Bump pymodbus to v3.6.5 (#112629) 2024-03-07 22:38:51 +01:00
Erik Montnemery 49d20eedd4
Remove local imports of hass-nabucasa (#112634) 2024-03-07 20:37:35 +01: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
jan iversen 714777e853
modbus scan_interval: 0 is correct configuration (#112619) 2024-03-07 17:55:06 +01:00
Erik Montnemery 177d8f3209
Make hass-nabucasa a core requirement (#112623) 2024-03-07 17:11:45 +01:00
J. Nick Koston 70a3f67e03
Avoid extracting the stack twice in system_log (#112572) 2024-03-07 11:00:05 -05:00
Bram Kragten 1b824a4fea
Update frontend to 20240307.0 (#112620) 2024-03-07 10:58:49 -05: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
Erik Montnemery 82efb3d35b
Make FlowResult a generic type (#111952) 2024-03-07 12:41:14 +01:00
Jeef 008e025d5c
Bump weatherflow4py to 0.1.14 (#112554)
adding missing rain states
2024-03-07 12:39:38 +01:00
Joost Lekkerkerker d42dd0114d
Add icon translations to Twinkly (#112328) 2024-03-07 12:33:28 +01:00
Franck Nijhof bf23672d39
Merge branch 'master' into dev 2024-03-07 12:12:48 +01:00
dependabot[bot] a92e65bc54
Bump Wandalen/wretry.action from 1.4.5 to 1.4.7 (#112575)
Bumps [Wandalen/wretry.action](https://github.com/wandalen/wretry.action) from 1.4.5 to 1.4.7.
- [Release notes](https://github.com/wandalen/wretry.action/releases)
- [Commits](https://github.com/wandalen/wretry.action/compare/v1.4.5...v1.4.7)

---
updated-dependencies:
- dependency-name: Wandalen/wretry.action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 09:33:31 +01:00
J. Nick Koston 1fb9cfe37e
Speed up the frame helper (#112562) 2024-03-06 20:54:09 -10:00
Jesse Hills 3ccbb2c87a
Bump aioesphomeapi to 23.1.0 (#112560) 2024-03-07 16:44:58 +13:00
J. Nick Koston e12e129065
Make HassJob job_type lookup lazy (#112563) 2024-03-06 17:03:27 -10:00
J. Nick Koston a7b4cd3512
Pass job type to event listeners when creating entities (#112551) 2024-03-06 16:10:07 -10:00
J. Nick Koston 84455dbe1d
Avoid having to work out the job type for each entity service at startup (#112557) 2024-03-06 16:09:55 -10:00
J. Nick Koston 869128e951
Pre import the rest of the recorder platforms before asyncio starts (#112289)
* Pre import the rest of the recorder platforms before asyncio starts

I removed these from #112131 since I had trouble with the weather
tests passing due to a race that I could not figure out. The race
seems to have gone away now (at least locally) so hopefully the CI
will pass now

* Avoid importing counter and proximity integrations in logbook

* Avoid importing counter and proximity integrations in logbook
2024-03-06 20:38:52 -05: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
J. Nick Koston 67a177679e
Log tasks that are being waited on when startup is blocked (#112542) 2024-03-06 13:33:44 -10: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 581a4f82b2
Avoid importing counter and proximity integrations in logbook (#112528) 2024-03-06 11:46:38 -10:00
J. Nick Koston 675b1a392b
Fix homekit creating executor jobs to resolve default listen ips (#112522) 2024-03-06 11:46:23 -10:00
J. Nick Koston b8e39bd968
Increase bootstrap preload test timeout (#112520) 2024-03-06 11:06:55 -10:00
J. Nick Koston 96b2d4f9f0
Reduce executor jobs needed to setup filesize (#112490)
* Reduce executor jobs needed to setup filesize

Move the _get_full_path check into the coordinator so everything
can happen in the executor at setup time

* Reduce executor jobs needed to setup filesize

Move the _get_full_path check into the coordinator so everything
can happen in the executor at setup time

* Update homeassistant/components/filesize/coordinator.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-03-06 20:54:01 +01:00
G Johansson 248f2ac2fb
Remove hourly weather entity from Environment Canada (#112447)
* Remove hourly weather entity from Environment Canada

* Remove from strings
2024-03-06 20:53:44 +01:00
Michael Hansen 457e27ecfd
Bump intents to 2024.3.6 (#112515) 2024-03-06 13:47:58 -06:00