Commit Graph

73364 Commits (070b4118208d9d7fd303c2e9ef3700342647bd74)

Author SHA1 Message Date
Jan-Philipp Benecke 070b411820
Avoid call to `hass.helpers.store` in LabelRegistry (#111555)
* Avoid call to `hass.helpers.store` in LabelRegistry

* Change type annotation
2024-02-27 09:37:45 -05:00
J. Nick Koston 773543b617
Ensure all data is set in seventeentrack before adding entities (#111603)
This integration would call async_add_entities before
it has set the data that the entity needed. There is
no guarantee that the entity would take long enough
to add that the data would be there
2024-02-27 08:47:31 -05:00
J. Nick Koston 08e0008d31
Use an eager task to setup entity platforms (#111574)
* Use an eager task to setup entity platforms

Ideally we would have awaited this function instead, but we want
to shield it from cancellation so we wrap it in asyncio.shield
which schedules it as a task. Since we have integrations that
never suspend in async_setup_entry, we can avoid scheduling on
the evnet loop with an eager task for this case

* its an executor future

* its an executor future

* fix

* doc string lied
2024-02-27 08:45:45 -05:00
Joost Lekkerkerker 224ca122fd
Add icon translations to Fully kiosk (#111609)
* Add icon translations to Fully kiosk

* Update homeassistant/components/fully_kiosk/icons.json
2024-02-27 08:43:42 -05:00
J. Nick Koston c78cccf7d2
Import shelly in the executor to avoid blocking the event loop (#111623)
`[homeassistant.loader] Component shelly import took 0.396 seconds (loaded_executor=False)`
2024-02-27 08:35:57 -05:00
J. Nick Koston 55e3eb6160
Import airvisual in the executor to avoid blocking the event loop (#111624)
`Component airvisual import took 0.566 seconds (loaded_executor=False)`
2024-02-27 08:35:46 -05:00
J. Nick Koston 7fbd10019a
Import xbox in the executor to avoid blocking the event loop (#111625)
`Component xbox import took 0.326 seconds (loaded_executor=False)
`
2024-02-27 08:35:33 -05:00
Nils Bergmann 08497db358
Extend ZHA thermostat local temperature calibration range for Sonoff TRVZB (#109691)
* Extend thermostat local temperature calibration range

* Extend thermostat local temperature calibration range only for TRVZB

* Change _attr_native_min_value and _attr_native_max_value back to -2.5 and 2.5

* Adjust _attr_native_step for TRVZB to 0.2

* Implement requested changes

* Fix platform for MULTI_MATCH

* Implement requested changes

* Implement requested changes
2024-02-27 08:32:23 -05:00
Robert Resch d7fb949994
Deprecate mailbox platform (#110930) 2024-02-27 13:50:02 +01:00
Erik Montnemery 8fb542917b
Deprecate the Ambiclimate integration (#111627)
Deprecate Ambiclimate integration
2024-02-27 13:45:12 +01:00
Brenan Kelley 458c5ae657
Add statistics keep_last_sample option (#88655)
* introduce preserve last value option

* improve comments

* add unit test

* skip scheduling purge on a preserved value

* do not schedule sensor update if preserving last value

* fix unit test to use new mock time pattern

pattern introduced in https://github.com/home-assistant/core/pull/93499

* rename preserve_last_val to keep_last_sample

* add keep_last_sample config validation
2024-02-27 13:17:05 +01:00
J. Nick Koston 4414b468f3
Import zwave_js in the executor to avoid blocking the event loop (#111622)
`2024-02-27 10:55:54.872 DEBUG (MainThread) [homeassistant.loader] Component zwave_js import took 0.780 seconds (loaded_executor=False)`
2024-02-27 13:14:27 +01:00
David F. Mulcahey 5d1b78a29d
Add device list to ZHA config entry diagnostics (#111549)
* Add device list to ZHA  config entry diagnostics

* add logical type
2024-02-27 06:44:26 -05:00
Marc Mueller e854ce5c21
Update typing-extensions to 4.10.0 (#111538) 2024-02-27 12:33:31 +01:00
Marc Mueller adbd9c8d40
Update python-slugify to 8.0.4 (#111284) 2024-02-27 12:29:48 +01:00
dependabot[bot] 38395c8fab
Bump actions/download-artifact from 4.1.2 to 4.1.3 (#111602) 2024-02-27 12:12:23 +01:00
Erik Montnemery 413b74a2e0
Deprecate Logi Circle integration (#111491)
* Deprecate Logi Circle integration

* Update homeassistant/components/logi_circle/__init__.py

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

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-02-27 11:36:36 +01:00
Joost Lekkerkerker c09212e5aa
Add icon translations to Garages Amsterdam (#111610) 2024-02-27 10:39:31 +01:00
Joost Lekkerkerker 497b63216a
Add icon translations to Geocaching (#111613) 2024-02-27 10:39:10 +01:00
J. Nick Koston 044ace0a6a
Make core tests that should run in the event loop coros (#111605) 2024-02-26 23:18:22 -10:00
Robert Resch 3703698f77
Bump deebot-client to 6.0.2 (#111507) 2024-02-27 09:39:49 +01:00
J. Nick Koston d812507aeb
Refactor eafm to avoid creating entities in the coordinator update (#111601) 2024-02-26 21:08:28 -10:00
Chris Talkington 2618d4abe0
Update pyipp to 0.14.5 (#111590) 2024-02-26 19:30:00 -10:00
J. Nick Koston 4579de6eb5
Import ssdp in the executor to avoid blocking the event loop (#111593)
`2024-02-26 21:37:59.325 DEBUG (MainThread) [homeassistant.loader] Component ssdp import took 1.179 seconds (loaded_executor=False)`
2024-02-26 23:58:34 -05:00
J. Nick Koston f08122084b
Reduce bootstrap code (#111450)
* Reduce bootstrap code

Adds a SETUP_ORDER const dict which will be used
for future refactoring

* tweak

* fix bad merge
2024-02-26 23:58:16 -05:00
J. Nick Koston 587854fd59
Remove zeroconf from ssdp after deps (#111326)
* Remove zeroconf from ssdp after deps

This was added in #36277 but is no longer needed since
we setup discovery integrations ahead of time to ensure
their deps are updated before other integrations can load
them

* adjust test
2024-02-26 23:57:41 -05:00
J. Nick Koston de48ad5931
Create bootstrap tasks eagerly (#111497)
We can avoid one event loop iteration to start the tasks here
2024-02-26 23:56:16 -05:00
J. Nick Koston 7d9fa2f407
Load config entry platforms eagerly (#111498)
We can avoid one event loop iteration to start the tasks here.
2024-02-26 23:55:41 -05:00
J. Nick Koston ce0fb1e716
Fully fix race in removing entities (#111499)
Full fix race in removing entities

Followup to #110978 now that we can start the task
eagerly it completely closes the race window
2024-02-26 23:55:15 -05:00
J. Nick Koston f984cca49b
Import usb in the executor to avoid blocking the event loop (#111592)
`2024-02-26 21:38:00.091 DEBUG (MainThread) [homeassistant.loader] Component usb import took 0.753 seconds (loaded_executor=False)`
2024-02-26 18:49:29 -10:00
J. Nick Koston 145ce183d0
Create component setup tasks eagerly in bootstrap (#111511)
This saves waiting one iteration of the event loop
2024-02-26 23:45:55 -05:00
J. Nick Koston d5e1934942
Use an eager task in the update coordinator scheduled refresh (#111570)
* Use an eager task in the update coordinator scheduled refresh

We have a lot of places that will not suspend because the refresh function
decides it does not need to update. Currently these have to be scheduled
on the event loop even though they are a noop.

Since _handle_refresh_interval is subclassed in some integrations, I created
a dunder wrapper function to avoid integraions subclassing it

* fix time fires outside of patch
2024-02-26 23:31:08 -05:00
J. Nick Koston b692f30c33
Import august in the executor to avoid blocking the event loop (#111595) 2024-02-26 18:30:31 -10:00
J. Nick Koston 35a3573bd2
Import spotify in the executor to avoid blocking the event loop (#111594) 2024-02-26 18:30:21 -10:00
Jesse Hills e1dade69e1
ESPHome: Pass through wake_word_phrase from on-device microWakeWord (#111585)
* ESPHome: Pass through wake_word_phrase from on-device microWakeWord

* Bump aioesphomeapi to 23.0.0
2024-02-26 23:29:03 -05:00
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