Commit Graph

447 Commits (656ef143daf5184a8aa340d320dca7d36473566e)

Author SHA1 Message Date
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
J. Nick Koston 4447336083
Fix hassio delaying startup to fetch container stats (#102775) 2023-10-25 15:32:43 +02:00
Erik Montnemery 7a009ed6cd
Don't duplicate core services in hassio (#102593) 2023-10-23 20:26:56 +02:00
Mike Degatano c8007b841b
Add exclude DB option to backup service call (#101958) 2023-10-22 23:40:44 +02:00
J. Nick Koston 82c0610050
Avoid core/supervisor stats API calls when no entities need them (#102362) 2023-10-22 06:40:48 -10:00
Robert Resch bb90c1f168
Fix multilevel reference translations (#102338) 2023-10-20 08:12:53 +02:00
Erik Montnemery 928086a9e5
Fix menu in hassio repair flow (#102162) 2023-10-17 16:43:10 +02:00
J. Nick Koston 36e1c740fd
Fix ingress sending an empty body for GET requests (#101917) 2023-10-15 23:38:20 +02:00
J. Nick Koston 683046272d
Switch hassio to use iter_chunks (#102031) 2023-10-15 21:48:04 +02:00
Marc Mueller 02567d9bf6
Revert aiohttp to 3.8.5 for Python 3.11 (#101932) 2023-10-13 14:12:42 +02:00
Marc Mueller 3155e62510
Update aiohttp to 3.9.0b0 (#101627) 2023-10-08 13:21:46 +02:00
Robert Hillis 10dcdbf537
Correct doc strings for Hassio component (#101530) 2023-10-06 14:13:59 +02:00
J. Nick Koston c0904c905d
Avoid updating hassio addon data when there are no entities consuming it (#101382) 2023-10-06 12:14:48 +02:00
Erik Montnemery dc78d15abc
Add LED control support to Home Assistant Green (#100922)
* Add LED control support to Home Assistant Green

* Add strings.json

* Sort alphabetically

* Reorder LED schema

* Improve test coverage

* Apply suggestions from code review

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Sort + fix test

* Remove reboot menu

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-09-28 17:45:10 +02:00
Jan-Philipp Benecke 96151e7faa
Use local time instead of UTC time as default backup filenames (#100959)
Use local time instead of UTC for the backup name
2023-09-27 13:32:30 +02:00
Mike Degatano 2b62285eee
Fix addon slug validation (#100070)
* Fix addon slug validation

* Don't redefine compile
2023-09-12 09:59:12 -04:00