Commit Graph

73729 Commits (0134715e2ba4c6d64476f417c714791b467d2abf)

Author SHA1 Message Date
J. Nick Koston 80ad4f1232
Import thread in the executor to avoid blocking the event loop (#111586)
Import thread in the executor

DEBUG (MainThread) [homeassistant.loader] Importing platform thread.config_flow took 2.92s (loaded_executor=False)
2024-02-26 23:21:10 -05:00
J. Nick Koston 7a3f829eac
Import wemo in the executor to avoid blocking the event loop (#111587)
`2024-02-26 21:12:29.792 DEBUG (MainThread) [homeassistant.loader] Importing platform wemo.config_flow took 1.11s (loaded_executor=False)`
2024-02-26 23:20:55 -05:00
J. Nick Koston b1e2eafe26
Import samsungtv in the executor to avoid blocking the event loop (#111588)
`2024-02-26 21:12:28.305 DEBUG (MainThread) [homeassistant.loader] Importing platform samsungtv.config_flow took 1.10s (loaded_executor=False)`

This one has a long requirements list
2024-02-26 23:20:39 -05:00
J. Nick Koston d6d2ded546
Import dhcp in the executor to avoid blocking the event loop (#111589)
Discovery integrations load a lot earlier when many modules
are not yet loaded so they have a lot less overlapping deps

dhcp uses scapy which is large to import. I hope one
day to replace it with something more lightweight
2024-02-26 23:20:24 -05:00
J. Nick Koston 40190a2f1f
Import zeroconf in the executor to avoid blocking the event loop (#111591)
This one takes ~0.45s on the green
2024-02-26 23:20:03 -05:00
J. Nick Koston f56e4d6a09
Use eager task creation for entity platform polling (#111575)
* Use eager task creation for entity platform polling

We have lots of places where `async_update` does not suspend and
is only a coro because its required to be a coro to run in the
event loop

* try again
2024-02-26 23:16:39 -05:00
J. Nick Koston 1e02260bbe
Use eager start for august subscriber refreshes (#111581)
Since most of the time this call will be a noop since pubnub will be connected
we can avoid scheduling a task on the event loop every time it fires
2024-02-26 23:13:33 -05:00
J. Nick Koston cfe478245f
Migrate gather_with_limited_concurrency to use create_eager_task (#111565) 2024-02-26 16:31:52 -10:00
J. Nick Koston 4bdd8dbd40
Refactor rainmachine to increase chance of reusing the connection (#111573) 2024-02-26 16:31:18 -10:00
J. Nick Koston 26079a6eaf
Use eager_start for sonos ping background task (#111578) 2024-02-26 16:31:06 -10:00
J. Nick Koston bf866732c9
Make unifiprotect fallback update an eager task (#111580) 2024-02-26 16:30:53 -10:00
J. Nick Koston 86ced5a85f
Bump yalexs to 1.11.4 (#111567) 2024-02-26 16:30:37 -10:00
J. Nick Koston 6a62a39456
Start automations with eager tasks (#111568) 2024-02-26 16:30:00 -10:00
J. Nick Koston fb4e8a4f3b
Start the debouncer task eagerly (#111569) 2024-02-26 16:29:46 -10:00
J. Nick Koston 1e3af1b48f
Convert person start to be a callback function (#111571)
Nothing was being awaited here so there was no need to create
a task per person at the start event.

The async_update_config coro remains since its required
by the collection but is now a wrapper around a callback
_async_update_config
2024-02-26 21:04:33 -05:00
J. Nick Koston ebdfff4037
Reduce latency to connect websocket writer (#111559)
Reduce latancy to connect websocket writer

Use an eager start task to start the writer
2024-02-26 20:52:53 -05:00
J. Nick Koston 321295a872
Reduce latency to set up websocket forwarding in hassio (#111558)
Reduce latancy to set up websocket forwarding in hassio

Create the tasks eagerly to avoid one iteration of the event loop
to connect the proxy
2024-02-26 20:52:37 -05:00
J. Nick Koston ae2ce99cbd
Create tasks eagerly in the discovery flow helper (#111557)
The likely outcome from most discoveries is an near immediate abort
so we run them eagerly to avoid having to schedule on the event loop
for the common case
2024-02-26 20:52:04 -05:00
J. Nick Koston b75277cc24
Use an eager task to update multiple entities (#111556)
If there are multiple entities on the same platform its likely
that only one of them will suspend in the update so schedule
them eagerly
2024-02-26 20:49:09 -05:00
Michael Hansen f6622ea8e0
Add speech-to-text cooldown for local wake word (#108806)
* Deconflict based on wake word

* Undo test

* Make wake up key a string, rename error

* Update snapshot

* Change to "wake word phrase" and normalize

* Move normalization into the wake provider

* Working on describe

* Use satellite info to resolve wake word phrase

* Add test for wake word phrase

* Match phrase with model name in wake word provider

* Check model id

* Use one constant wake word cooldown

* Update homeassistant/components/assist_pipeline/error.py

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

* Fix wake word tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-02-26 20:35:19 -05:00
J. Nick Koston c38e0d22b8
Fix text in docstrings and debug logging for loader (#111560) 2024-02-26 15:14:15 -10:00
Joost Lekkerkerker 9e2db708b9
Add icon translations to Fritz (#111547)
* Add icon translations to Fritz

* Add icon translations to Fritz
2024-02-27 00:17:15 +01:00
Niels Perfors 951743551a
Add Tado add meter readings service (#111552) 2024-02-26 23:47:01 +01:00
Jan-Philipp Benecke 4de56c1751
Avoid call to `hass.helpers` in permobile (#111541) 2024-02-26 23:46:19 +01:00
Shay Levy 24dee11a4d
Bump aioshelly to 8.0.2 (#111414) 2024-02-27 00:37:25 +02:00
Joost Lekkerkerker 467659cb21
Add icon translations to Flo (#111542) 2024-02-26 22:52:26 +01:00
J. Nick Koston 359bd625c8
Import mqtt in the executor to avoid blocking the event loop (#111521) 2024-02-26 11:41:07 -10:00
Jeef bc20e7900c
WeatherFlow Forecast (REST API) (#106615)
* rebase off dev

* Update homeassistant/components/weatherflow_cloud/const.py

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

* Addressing 1st round of PR Comments

* Update homeassistant/components/weatherflow_cloud/config_flow.py

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

* addressing PR Comments

* fixing last comment that i can see

* Update homeassistant/components/weatherflow_cloud/coordinator.py

OOPS

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update homeassistant/components/weatherflow_cloud/weather.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update homeassistant/components/weatherflow_cloud/coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* switching to station id

* Update homeassistant/components/weatherflow_cloud/strings.json

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* addressing PR

* Updated tests to be better

* Updated tests accordingly

* REAuth flow and tests added

* Update homeassistant/components/weatherflow_cloud/strings.json

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update homeassistant/components/weatherflow_cloud/coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Addressing PR comments

* Apply suggestions from code review

* ruff fix

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-02-26 22:40:21 +01:00
J. Nick Koston b6393cc3a0
Import influxdb in the executor to avoid blocking the event loop (#111520)
was not added to the original PR to contain scope

identified at: https://github.com/home-assistant/core/pull/111336#issuecomment-1963062529
2024-02-26 16:00:16 -05:00
J. Nick Koston e742951993
Import radio_browser in the executor to avoid blocking the event loop (#111519)
was not added to the original PR to contain scope

identified at: https://github.com/home-assistant/core/pull/111336#issuecomment-1963062529
2024-02-26 15:59:51 -05:00
Tomer Shemesh 886a450cf4
Add support to Lutron lights for color and temperature control (#109019)
* Add support to lutron lights for color and temperature control

* Fix review comments for adding color and temperature to Lutron lights

* Add eclair4151 as codeowner Lutron Caseta Integration

* Fix review comments for add color support for Lutron lights

* Code cleanup suggestions from PR review for adding color support for Lutron Lights

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fix minor syntax errors from review comments for lutron light color support

* Fix review comments and code cleanup for Lutron light color support

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-26 10:58:20 -10:00
J. Nick Koston 30094acec7
Fix dict changing size during iteration in deconz (#111523) 2024-02-26 10:47:08 -10:00
On Freund 32dc8d9fcb
Improve code comment for Chrome frame bug in Camera (#111504) 2024-02-26 15:30:35 -05:00
J. Nick Koston 4ea1c5cc3c
Add support for importing integrations in the executor (#111336)
* Add support for pre-imports at setup time

alternative solution to #111331

* refactor

* refactor

* refactor

* mark >1.0s integrations

* no point in executor if already loaded

* no point in executor if already loaded

* cleanup

* cleanup

* two more

* one more

* analytics loads a lot more integrations

* cloud

* debug

* psutil, hardwre

* try zha

* Update homeassistant/setup.py

* await

* comments

* coverage

* coverage

* coverage

* move logic to loader

* move logic to loader

* preserve comments
2024-02-26 14:49:43 -05:00
starkillerOG 75e59167de
Reolink trigger ReAuth when credentials invalid during update (#111492)
Check for CredentialsInvalidError
2024-02-26 14:41:20 -05:00
spycle 53f0272357
Bump pyMicrobot to 0.0.17 (#111496)
* Update manifest.json

Up-version pyMicrobot to 0.0.17

* Update requirements_all.txt

Up-version pyMicrobot to 0.0.17

* Update requirements_test_all.txt

Up-version pyMicrobot to 0.0.17
2024-02-26 20:36:05 +01:00
Jonas Fors Lellky d44e389844
Add hvac_action to flexit_bacnet climate entity (#110498)
* Add hvac_action to flexit_bacnet climate entity

Also add extra state attributes

* Remove extra state attrs

* Change hvac action to heating
2024-02-26 20:22:25 +01:00
Erik Montnemery 730fe760cf
Remove JuiceNet integration (#111477)
* Remove JuiceNet integration

* Adjust issue

* Add test

* Fix stale DOMAIN constant
2024-02-26 21:08:36 +02:00
Joakim Plate a55c56a207
Update rfxtrx library to handle connection retries (#111366)
Upgrade rfxtrx library to one that leaves reconnection to home assistant and handle loss of connection by reloading the integration.

https://github.com/Danielhiversen/pyRFXtrx/releases/tag/0.31.0
2024-02-26 19:30:22 +01:00
On Freund 979fe57f7f
Image entity media source (#104743)
* Image entity media source

* MJPEG streaming

* Update on change rather than fixed interval

* Only send boundary twice

* return when image has no data

* Write each frame twice

* Use friendly name when browsing

* Fix sending of double frame

* Initial image proxy test

* Improve proxy stream test

* Refactor

* Code review fixes
2024-02-26 19:04:25 +01:00
Jan-Philipp Benecke baf84b6fba
Add `single_config_entry` manifest option (#109505)
* Allow setting if we support multiple config entries in config flow

* Move property to config flow instead of flow handler

* Move marking an integration as single instance only to manifest

* Revert line remove

* Avoid init a config flow or adding a new entry on a single instance with an entry

* Revert changes in test

* Process code review comments

* Apply code review suggestion
2024-02-26 19:00:33 +01:00
Matthias Alphart 673a95227b
Update xknx to 2.12.1 and xknxproject to 3.7.0 (#111460) 2024-02-26 18:52:51 +01:00
J. Nick Koston 4624c859e1
Use discovery flow helper for hardware integrations (#111437)
* Use discovery flow helper for hardware integrations

The discovery flow helper defers loading discovered integrations until after startup
to improve startup reliability.

* Use discovery flow helper for hardware integrations

The discovery flow helper defers loading discovered integrations until after startup
to improve startup reliability. Since hardware was not listed in as a
discovery integration, the notification for new discoveries was missing.
2024-02-26 12:04:33 -05:00
Jan-Philipp Benecke f85a8c5041
Remove `@bind_hass` from async_active_zone and make callback function (#111488) 2024-02-26 11:57:17 -05:00
J. Nick Koston 67e356904b
Add support for eager tasks (#111425)
* Add support for eager tasks

python 3.12 supports eager tasks

reading:
https://docs.python.org/3/library/asyncio-task.html#eager-task-factory
https://github.com/python/cpython/issues/97696

There are lots of places were we are unlikely to suspend, but we might
suspend so creating a task makes sense

* reduce

* revert entity

* revert

* coverage

* coverage

* coverage

* coverage

* fix test
2024-02-26 11:36:46 -05:00
J. Nick Koston 93cc6e0f36
Switch nmap_tracker to use aiooui (#111415)
mac-vendor-lookup can take a long time to startup because
it has to fetch the oui db from the web
2024-02-26 17:32:53 +01:00
Abílio Costa 9420ac1cff
Update idasen-ha to v2.5.1 to fix regression (#111439)
Update Idasen Desk support lib to fix regression

idasen v0.11.1 introduces some regressions, so idasen-ha v2.5.1 now
depends on v.0.11.0 instead.
2024-02-26 17:15:24 +01:00
Åke Strandberg 732491d3c9
Bump myuplink lib to 0.5.0 (#111447) 2024-02-26 17:13:21 +01:00
J. Nick Koston 1d4e82bd3d
Fix race in dlna_dmr test (#111428)
The entity was removed before the entity registry could update it

```
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/helpers/entity.py", line 1482, in _async_process_registry_update_or_remove
    assert registry_entry is not None
AssertionError

```
2024-02-26 17:11:50 +01:00
Sid 174ebe70d7
Add webmin integration (#106976)
* add webmin integration 1

* refactor, add memory sensors

* Fix docstring

* addressed reviews

* address reviews

* address reviews

* use translation strings for sensors

* add async_abort_entries_match

* apply review comments

* address reviews

* add async_set_unique_id

* add identifiers to device_info

* disable all sensors by default

* move icons to icons.json

* show Faults when given from server in config flow

* add test for Fault

* Apply review suggestions

* Create helper functions for webmin instance and sorted mac addresses

* fix tests
2024-02-26 17:10:11 +01:00