1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
J. Nick Koston
33ff6b5b6e Avoid creating tasks for checking integrations platforms (#110795)
* Avoid creating tasks for checking integrations platforms

This is a followup to #110743 to avoid creating a task to check
if the integration platform exists. We created tasks because
we needed to await async_get_integrations but since its always
called from EVENT_COMPONENT_LOADED firing, we can use the
async_get_loaded_integration version which does not need
to be awaited. This eliminates one task for every loaded
component

* there is no more race risk

* reduce

* coro or callback

* reduce

* tweak

* race safe

* fix type

* fixes

* use built-in helper to make it smaller

* use built-in helper to make it smaller

* use built-in helper to make it smaller

* add coverage to ensure exceptions are logged

* improve readability a bit

* platforms
2024-02-18 01:07:18 +01:00
J. Nick Koston
42cf081582 Avoid creating tasks to load integration platforms that do not exist (#110743) 2024-02-17 07:02:51 -06:00
Erik Montnemery
ab060b86d1 Remove async_process_integration_platform_for_component (#100680) 2023-09-21 17:06:41 +02:00
rlippmann
3a72054f93 Make dataclasses in HA core slotted (#91208) 2023-04-11 07:58:28 -10:00
J. Nick Koston
e1d62b554a Migrate integration_platform helper to use async_get_integrations (#89303)
* Migrate integration_platform helper to use async_get_integrations

We were fetching integrations inside the gather one
at a time. This is inefficent.

* cleanup

* cleanup

* add task name

* small tweaks

* gather only if we have tasks
2023-03-08 16:01:47 -05:00
Marc Mueller
93cbb331e5 Update Mypy to 0.950 (#70948)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-27 20:49:54 -05:00
Marc Mueller
90dab235f7 Update pylint to 2.13.7 (#70381)
* Update pylint to 2.13.7

* Spelling

* Remove old pylint config value

* Code updates
2022-04-21 13:02:52 -07:00
J. Nick Koston
026e1635cc Rename async_process_integration_platform to async_process_integration_platform_for_component (#70217) 2022-04-17 20:59:31 -10:00
J. Nick Koston
b4ef150339 Add a guard when there are no integration platforms loaded (#70182) 2022-04-17 22:45:52 -07:00
J. Nick Koston
42c448c422 Add the ability to process integration platforms on demand (#70174) 2022-04-17 00:23:00 -10:00
Marc Mueller
021debb5c5 Resolve implicit imports (#63832) 2022-01-10 17:10:46 +01:00
Marc Mueller
77ee72cbb9 Import Callable from collections.abc (1) (#56775) 2021-09-29 16:32:11 +02:00
Paulus Schoutsen
7c5a0174ba Add an energy solar platform for solar forecasts (#54576)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-25 11:37:03 -07:00
Marc Mueller
c07646db5d Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Paulus Schoutsen
5bc6ed4cef Add logbook platforms (#37078)
* Add logbook platforms

* Fix logbook describe test
2020-06-24 18:14:50 -07:00
Paulus Schoutsen
a470a72ec5 Add integration platform helper (#29914) 2019-12-13 15:38:41 +01:00