288 Commits

Author SHA1 Message Date
Marc Mueller
c88b337600
Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick Koston
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 6de2defa0586165c2918ce006cf57aa3acaae730.

* 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 e8f12aad5579a1e5e3930957a46ea6f3dd9beecf.

* 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 Koston
f3a9756f81
Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10: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
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 Benecke
196089e8b7
Remove deprecated hass.components.hassio usage (#111878) 2024-03-02 15:38:31 +01:00
Erik Montnemery
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 Benecke
ebfba7258e
Revert "Drop @bind_hass use from hassio component (#111522)" (#111705)
This reverts commit 4e4345f04e7b4570bbd5dae7d68e20d104df929e.
2024-02-28 10:51:37 +01: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
J. Nick Koston
c4d719a7cf
Use eager_start for background service call tasks (#111620) 2024-02-27 12:06:32 -10:00
J. Nick Koston
d6fac87876
Avoid compressing application (tarfile) downloads from supervisor (#110224) 2024-02-21 12:45:47 -06: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
46f8fb3ac1
Use builtin TimeoutError [misc] (#109703) 2024-02-05 18:45:16 +01:00
Marc Mueller
7a89e58873
Use builtin TimeoutError [e-i] (#109679) 2024-02-05 12:00:37 +01:00
J. Nick Koston
c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
Erik Montnemery
6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Erik Montnemery
4536fb3541
Remove mock_entity_platform test helper (#104073) 2023-11-16 16:55:08 +01: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
36e1c740fd
Fix ingress sending an empty body for GET requests (#101917) 2023-10-15 23:38:20 +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
Marc Mueller
c59404b5bc
Fix additional test cases for Python 3.12 (#101006) 2023-09-27 17:19:20 +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
Erik Montnemery
f9b2e10f72
Add new board type (#99334) 2023-08-30 16:37:13 +02:00
Mike Degatano
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
Erik Montnemery
b885dfa5a8
Add preview to sensor group config and option flows (#83638) 2023-08-22 10:29:16 +02:00
Franck Nijhof
1a9e27cdaf
Allow integrations to register custom config panels (#96245) 2023-07-18 11:35:44 +02:00
J. Nick Koston
62c5194bc8
Avoid compressing binary images on ingress (#96581) 2023-07-15 00:09:25 -10:00
J. Nick Koston
2b4f6ffcd6
Speed up hassio ingress (#95777) 2023-07-08 10:50:39 +02:00
epenet
60b78f4648
Add error handling to hassio issues (#94951) 2023-06-21 11:17:11 +02:00
Allen Porter
12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Joakim Sørensen
889f3c36fc
Adjust default name in backup service calls to match documentation (#94468) 2023-06-13 11:41:53 +02:00
Mike Degatano
c25b26214b
Add docker config repair for supervisor issue (#93820) 2023-05-30 22:08:45 +02:00
Mike Degatano
08a719e09e
Add backup location and mount failed repair (#93126)
* Add backup location and mount failed repair

* Fix coverage

* Change storage_location to backup_location

* Use backticks

* Update homeassistant/helpers/selector.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 10:33:41 +02:00
Erik Montnemery
ce99319ea5
Add LED settings support to Home Assistant Yellow (#86451)
* Add LED control support to Home Assistant Yellow

* Fix the handlers

* Remove switch platform

* Allow configuring LED settings from the options flow

* Add missing translations

* Add tests

* Add tests
2023-04-26 11:02:52 -04:00
Erik Montnemery
63f3767a29
Include UUID in hassio discovery data (#91970) 2023-04-25 09:48:47 +02:00
Mike Degatano
a511e7d6bc
Make repairs out of select supervisor issues (#90893)
* Make repairs out of select supervisor issues

* Fix comment formatting

* Add a test case for API error

* Testing and type fix
2023-04-19 08:07:38 +02:00
Erik Montnemery
6739542a5d
Simplify some multi pan code (#90135)
* Simplify some multi pan code

* Adjust ZHA config flow
2023-03-23 09:18:35 +01:00
Erik Montnemery
0ecd043cb2
Add test helper mock_config_flow (#90103) 2023-03-22 08:59:35 -04:00
Joakim Sørensen
11e21378b1
Add sensors for supervisor host (#89461)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-13 15:39:49 +01:00
Erik Montnemery
fd5c56fc7d
Rename modules named repairs.py which are not repairs platforms (#89618) 2023-03-13 09:44:20 +01:00
epenet
a0f725dfcb
Add type hints to tests (#89497) 2023-03-10 12:06:50 +01:00
Joakim Sørensen
4f29e1e180
Add stats sensors for core and supervisor (#89455)
* Add stats sensors for core and supervisor

* Update homeassistant/components/hassio/__init__.py
2023-03-09 19:06:35 +01:00
Joakim Sørensen
e5ce8e920d
Add paths for add-on changelog and documentation (#89411) 2023-03-08 20:23:33 -05:00