Commit Graph
207 Commits
Author SHA1 Message Date
epenetandGitHub addc4a84ff Rename hassio coordinator module (#117611) 2024-05-17 12:10:21 +02:00
Erik MontnemeryandGitHub b013d6ade9 Fix flaky hassio test (#116658) 2024-05-02 16:24:14 -05:00
J. Nick KostonandGitHub 76639252c9 Make discovery flow tasks background tasks (#116327) 2024-04-28 08:13:37 -05:00
Mike DegatanoandGitHub f1ebe9d20a Add repairs to hassio manifest (#115486)
* Add repairs to hassio manifest

* Remove unnecessary fixture
2024-04-17 15:51:29 +02:00
Mike DegatanoandGitHub 5308e02c99 Add support for adopt data disk repair (#114891) 2024-04-11 11:23:10 +02:00
epenetandGitHub 0b01326f9f Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
Joost LekkerkerkerandGitHub b9281327c4 Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
SidandGitHub d5f883fbf0 Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-26 00:02:16 +01:00
Marc MuellerandGitHub 81c34ac952 Fix spelling [docstrings + comments] (#114168) 2024-03-25 11:33:00 +01:00
00ec7f11f0 Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <[email protected]>
2024-03-19 09:01:07 +01:00
Jan BouwhuisandGitHub 6e84dbde35 Fix lingering hassio issues test (#113569) 2024-03-15 15:10:24 -10:00
J. Nick KostonandGitHub b7f7bed46c Import and create pyudev for usb in the executor (#113478) 2024-03-15 09:05:18 -10:00
Mike DegatanoandGitHub 5a25349cf7 Supervisor issues update retries on failure (#113373) 2024-03-14 10:55:04 +01:00
Mike DegatanoandGitHub 6d903300be Apply suggestion failures fail supervisor repair (#113372) 2024-03-14 10:53:55 +01:00
99eaa07f6f Add message from Bad Request errors to HassioAPIError (#113144)
Co-authored-by: Mike Degatano <[email protected]>
2024-03-13 11:29:39 +01:00
J. Nick KostonandGitHub 65358c129a Replace periodic tasks with background tasks (#112726)
* Phase out periodic tasks

* false by default or some tests will block forever, will need to fix each one manually

* kwarg works

* kwarg works

* kwarg works

* fixes

* fix more tests

* fix more tests

* fix lifx

* opensky

* pvpc_hourly_pricing

* adjust more

* adjust more

* smarttub

* adjust more

* adjust more

* adjust more

* adjust more

* adjust

* no eager executor

* zha

* qnap_qsw

* fix more

* fix fix

* docs

* its a wrapper now

* add more coverage

* coverage

* cover all combos

* more fixes

* more fixes

* more fixes

* remaining issues are legit bugs in tests

* make tplink test more predictable

* more fixes

* feedreader

* grind out some more

* make test race safe

* one more
2024-03-08 21:45:10 -05:00
Marc MuellerandGitHub aa16a9d707 Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc MuellerandGitHub 32f3f46542 Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc MuellerandGitHub c88b337600 Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick KostonandGitHub a6b17dbe68 Schedule polling as periodic tasks (#112640)
* Schedule periodic coordinator updates as background tasks.

Currently, the coordinator's periodic refreshes delay startup because they are not scheduled as background tasks. We will wait if the startup takes long enough for the first planned refresh. Another coordinator's scheduled refresh will be fired on busy systems, further delaying the startup. This chain of events results in the startup taking a long time and hitting the safety timeout because too many coordinators are refreshing.

This case can also happen with scheduled entity refreshes, but it's less common. A future PR will address that case.

* periodic_tasks

* periodic_tasks

* periodic_tasks

* merge

* merge

* merge

* merge

* merge

* fix test that call the sync api from async

* one more place

* cannot chain

* async_run_periodic_hass_job

* sun and pattern time changes from automations also block startup

* Revert "sun and pattern time changes from automations also block startup"

This reverts commit 6de2defa05.

* make sure polling is cancelled when config entry is unloaded

* Revert "Revert "sun and pattern time changes from automations also block startup""

This reverts commit e8f12aad55.

* remove DisabledError from homewizard test as it relies on a race

* fix race

* direct coverage
2024-03-07 23:32:26 -05:00
J. Nick KostonandGitHub f3a9756f81 Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10:00
J. Nick KostonandGitHub 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 KostonandGitHub 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
Jan-Philipp BeneckeandGitHub 196089e8b7 Remove deprecated hass.components.hassio usage (#111878) 2024-03-02 15:38:31 +01:00
Erik MontnemeryandGitHub a0e558c457 Add generic classes BaseFlowHandler and BaseFlowManager (#111814)
* Add generic classes BaseFlowHandler and BaseFlowManager

* Migrate zwave_js

* Update tests

* Update tests

* Address review comments
2024-02-29 16:52:39 +01:00
Jan-Philipp BeneckeandGitHub ebfba7258e Revert "Drop @bind_hass use from hassio component (#111522)" (#111705)
This reverts commit 4e4345f04e.
2024-02-28 10:51:37 +01:00
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 <[email protected]>
2024-02-28 00:25:46 +01:00
J. Nick KostonandGitHub c4d719a7cf Use eager_start for background service call tasks (#111620) 2024-02-27 12:06:32 -10:00
J. Nick KostonandGitHub d6fac87876 Avoid compressing application (tarfile) downloads from supervisor (#110224) 2024-02-21 12:45:47 -06:00
Mike DegatanoandGitHub a0e515df1a Allow disabling home assistant watchdog (#109818) 2024-02-08 20:09:53 +01:00
Franck NijhofandGitHub db16b739a6 Don't block Supervisor entry setup with refreshing updates (#109809) 2024-02-06 22:34:53 +01:00
Marc MuellerandGitHub 46f8fb3ac1 Use builtin TimeoutError [misc] (#109703) 2024-02-05 18:45:16 +01:00
Marc MuellerandGitHub 7a89e58873 Use builtin TimeoutError [e-i] (#109679) 2024-02-05 12:00:37 +01:00
J. Nick KostonandGitHub c399cab427 Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
Erik MontnemeryandGitHub 6908497c3d Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
706add4a57 Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <[email protected]>
2023-11-27 14:38:59 +01:00
Erik MontnemeryandGitHub 4536fb3541 Remove mock_entity_platform test helper (#104073) 2023-11-16 16:55:08 +01:00
408e977b17 Try to avoid re-parsing the content-type in hassio ingress if possible (#103477)
Co-authored-by: Stefan Agner <[email protected]>
Co-authored-by: Franck Nijhof <[email protected]>
2023-11-06 20:48:47 +01:00
J. Nick KostonandGitHub 4447336083 Fix hassio delaying startup to fetch container stats (#102775) 2023-10-25 15:32:43 +02:00
Erik MontnemeryandGitHub 7a009ed6cd Don't duplicate core services in hassio (#102593) 2023-10-23 20:26:56 +02:00
Mike DegatanoandGitHub c8007b841b Add exclude DB option to backup service call (#101958) 2023-10-22 23:40:44 +02:00
J. Nick KostonandGitHub 36e1c740fd Fix ingress sending an empty body for GET requests (#101917) 2023-10-15 23:38:20 +02:00
J. Nick KostonandGitHub c0904c905d Avoid updating hassio addon data when there are no entities consuming it (#101382) 2023-10-06 12:14:48 +02:00
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 <[email protected]>

* Sort + fix test

* Remove reboot menu

---------

Co-authored-by: Stefan Agner <[email protected]>
2023-09-28 17:45:10 +02:00
Marc MuellerandGitHub c59404b5bc Fix additional test cases for Python 3.12 (#101006) 2023-09-27 17:19:20 +02:00
Jan-Philipp BeneckeandGitHub 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 DegatanoandGitHub 2b62285eee Fix addon slug validation (#100070)
* Fix addon slug validation

* Don't redefine compile
2023-09-12 09:59:12 -04:00
Erik MontnemeryandGitHub f9b2e10f72 Add new board type (#99334) 2023-08-30 16:37:13 +02:00
Mike DegatanoandGitHub e0eb63c588 Validate slug in addon services (#99232)
* Validate slug in addon services

* Move validator into hassio component

* Fixes from mypy

* Fix test for changes

* Adjust fixtures to current supervisor

* Fix call counts after fixture adjustment

* Increase coverage
2023-08-29 13:57:41 -04:00