Commit Graph

462 Commits (a28731c29416355553dd1b5813fe320559033e8b)

Author SHA1 Message Date
J. Nick Koston 86feae421c
Avoid linear search in hassio to find devices (#114806) 2024-04-04 11:38:37 +02:00
J. Nick Koston 0732952b32
Reduce hassio startup time (#114588) 2024-04-01 09:58:06 -10:00
Sid 6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Sid 6ee273a548
Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
Mike Degatano 6ede1c543f
Protect SupervisorIssues.update method (#113425) 2024-03-15 18:06:14 +01:00
Mike Degatano 5a25349cf7
Supervisor issues update retries on failure (#113373) 2024-03-14 10:55:04 +01:00
Mike Degatano 6d903300be
Apply suggestion failures fail supervisor repair (#113372) 2024-03-14 10:53:55 +01:00
Joost Lekkerkerker 761933acfe
Improve lists in integrations [G-H] (#113168) 2024-03-13 17:25:27 +01:00
Stefan Agner 99eaa07f6f
Add message from Bad Request errors to HassioAPIError (#113144)
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2024-03-13 11:29:39 +01:00
J. Nick Koston e71398d1e0
Update timezone in supervisor in an eager task (#113113) 2024-03-11 14:45:58 -10:00
Marc Mueller 2c06d4fcb9
Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Marc Mueller 8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05:00
Marc Mueller 8ca127df2a
Use KEY_HASS [h-z] (#112610) 2024-03-07 18:03:44 +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 a277d0c4b5
Migrate system flows to use the discovery helper (#112291)
Ensures we are not creating new flows or loading
their platforms until the started event
once the import executor has clamed down
2024-03-05 10:01:31 -05:00
J. Nick Koston e26c5f5d29
Ensure hassio diagnostics get imported with the integration (#112286) 2024-03-04 16:07:07 -10:00
J. Nick Koston d7507fd8a3
Run more of hassio setup in in tasks (#112151)
* Run more of hassio setup in in tasks

There were a few more places were we waited in sequence
where we have to make remote api calls that could be
moved to tasks

* tweak

* tweak
2024-03-03 23:57:01 -05:00
J. Nick Koston d50b4ccd62
Split up hassio coordinator and data into new file to allow preload (#112147)
* Split up hassio coordinator and data into new file to allow preload

Since we cannot mark hassio as having a config_flow, it will
not get preloaded and since cloud will almost always load right
after it and block the import executor, we want to preload
the hassio config_flow and platform modules so the other
dependants can continue on while cloud is being imported
to not delay startup

* tweak

* tweak
2024-03-03 21:16:02 -05:00
Erik Montnemery e06446d0fa
Migrate integrations e-h to generic flowhandler (#111862) 2024-02-29 20:07:36 +01:00
Joost Lekkerkerker 0ff55a2d24
Add icon translations to Hassio (#111715) 2024-02-28 16:33:46 +01:00
Jan-Philipp Benecke ebfba7258e
Revert "Drop `@bind_hass` use from hassio component (#111522)" (#111705)
This reverts commit 4e4345f04e.
2024-02-28 10:51:37 +01:00
J. Nick Koston e74e1e3008
Reduce hassio setup time (#111686)
Reduce supervisor setup time

The two calls that take the most time are calling
push_config ~0.4s and updating the api ~0.35s and
can be run concurrently
2024-02-27 21:30:48 -05:00
Jan-Philipp Benecke 4e4345f04e
Drop `@bind_hass` use from hassio component (#111522)
* Drop `@bind_hass` use from hassio component

* Add comment why we import locally

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-28 00:25:46 +01:00
Jan Čermák d4a7e4a6ac
Add ODROID-M1S as a supported OS hardware board (#111022) 2024-02-27 21:51:55 +01:00
Mike Degatano 68200de4d2
Bad Request from supervisor should be error (#111162) 2024-02-27 21:49:52 +01: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 dad1184e18
Make hardware setup in hassio a normal function (#111328)
nothing awaited hassio
2024-02-25 14:37:09 +01:00
J. Nick Koston 3ecbd05ac0
Avoid creating tasks to register hassio panels (#111206)
panel_custom never suspends so we can avoid the overhead of
creating and scheduling tasks
e398accc3e/homeassistant/components/panel_custom/__init__.py (L74)

panel_custom.async_register_panel could be converted to a normal function but it
would be a breaking change
2024-02-23 16:50:39 +01:00
J. Nick Koston e398accc3e
Convert hassio websocket_apis that did not await to normal functions (#111173)
* Convert hassio websocket_apis that did not await to normal functions

* Convert hassio websocket_apis that did not await to normal functions
2024-02-23 15:27:17 +01:00
J. Nick Koston d6fac87876
Avoid compressing application (tarfile) downloads from supervisor (#110224) 2024-02-21 12:45:47 -06:00
Marc Mueller 269f6be096
Improve hassio decorator typing (#110545)
* Improve hassio decorator typing

* Fix typing
2024-02-14 21:25:21 +01:00
Mike Degatano a0e515df1a
Allow disabling home assistant watchdog (#109818) 2024-02-08 20:09:53 +01:00
Franck Nijhof db16b739a6
Don't block Supervisor entry setup with refreshing updates (#109809) 2024-02-06 22:34:53 +01:00
Marc Mueller 7a89e58873
Use builtin TimeoutError [e-i] (#109679) 2024-02-05 12:00:37 +01:00
J. Nick Koston 57f4f061a6
Use identity check in hassio websocket ingress (#109672) 2024-02-05 08:55:19 +01:00
J. Nick Koston e9e289286e
Set hassio api json encoding to avoid looking it up every request (#109032) 2024-01-29 14:32:53 +01:00
J. Nick Koston 5183eed0bc
Avoid re-encoding the hassio command URL each request (#109031)
* Avoid reconstructing the hassio command URL each request

The host had to be re-encoded every time which creates an ip_address object

By doing a join we avoid this. It was actually happening twice since
we passed constructed the URL for testing and than passed it as a string
so aiohttp did it as well

* make url the same
2024-01-29 14:25:27 +01:00
Jan-Philipp Benecke 95aea1488d
Add pylint plugin to check if coordinator is placed in its own module (#108174)
* Add pylint plugin to check if coordinator is placed in its own module

* Remove unintended changes

* Remove pylint disable and let CI only fail on W,E,F

* Make check conventional

* Apply review suggestion

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use option instead

* Remove pylint arguments from pre-commit

* Partially revert "Remove pylint disable and let CI only fail on W,E,F"

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-29 10:30:19 +01:00
Marc Mueller a6fc4c2bd5
Improve hassio typing (#107292) 2024-01-08 10:08:09 +01:00
Ville Skyttä 24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Erik Montnemery 0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Stefan Agner 93a9a9d1e2
Add Raspberry Pi 5 to version and hardware integration (#105992) 2023-12-18 19:31:37 +01:00
J. Nick Koston c2cc8014dc
Avoid double URL creation for hassio ingress (#105052) 2023-12-05 09:29:43 +01:00
Marc Mueller 2496c275c8
Improve decorator type annotations [core] (#104826) 2023-11-30 18:50:31 +01:00
J. Nick Koston dfed10420c
Remove aiohttp enable_compression helper (#104174) 2023-11-29 10:24:34 -07:00
J. Nick Koston 608f4f7c52
Bump aiohttp to 3.9.1 (#104176) 2023-11-29 16:13:54 +01:00
J. Nick Koston 0d63e2f9b5
Ensure large payloads are compressed in the executor with aiohttp 3.9.0 (#103592) 2023-11-07 12:37:54 -06:00
J. Nick Koston 408e977b17
Try to avoid re-parsing the content-type in hassio ingress if possible (#103477)
Co-authored-by: Stefan Agner <stefan@agner.ch>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-06 20:48:47 +01:00