Commit graph

73 commits

Author SHA1 Message Date
Mike Degatano
ed4f55406c
Replace Supervisor resolution API calls with aiohasupervisor (#129599)
* Replace Supervisor resolution API calls with aiohasupervisor

* Use consistent types to avoid uuid issues

* Fix mocking in http test

* Changes from feedback

* Put hass first

* Fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-11-07 01:33:51 +01:00
Erik Montnemery
b09e54c961
Bump aiohasupervisor to version 0.2.1 (#129574) 2024-10-31 19:37:31 +01:00
Mike Degatano
673f0224c9
Continue migration of methods from handler to aiohasupervisor (#129183) 2024-10-29 14:33:21 +01:00
Mike Degatano
ad55c9cc19
Remaining addon management to aiohasupervisor (#128484)
* Move set addon options to aiohasupervisor

* addon stats to aiohasupervisor and test fixes

* addon changelogs to aiohasupervisor

* Raise correct error for library in tests

* Cache client in instance property

* Use singleton method rather then HassIO instance method

* Mock supervisor client in more tests
2024-10-21 16:41:00 +02:00
Mike Degatano
a9aa5ad229
Use aiohasupervisor for store APIs (#126780)
* Use aiohasupervosor for store addon info

* Use aiohasupervisor install addon

* Use aiohasupervisor for store info API

* Fix onboarding test

* Changes from feedback

* Move get_supervisor_client out of constructor

* Mock supervisor_client in tests

* Make property private
2024-10-10 10:27:20 +02:00
Mike Degatano
7517948900
Replace more addon management with aiohasupervisor (#126236)
* Replace start_addon with library call

* restart_addon to library and error issues in tests

* stop_addon to library

* uninstall_addon to library

* Add output typing

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-24 15:47:29 +02:00
Mike Degatano
97d0d91d2c
Use aiohasupervisor for addon info calls (#125926)
* Use aiohasupervisor for addon info calls

* Fix issue/repair tests in supervisor

* Fixes from feedback
2024-09-17 23:22:35 +02:00
J. Nick Koston
71d35a03e1
Switch hassio to use with_path where possible (#125268)
* Switch hassio to use with_path where possible

Any place we are joining to the root url, we can use with_path
as its much faster

* revert
2024-09-05 08:12:43 +02:00
J. Nick Koston
491bde181c
Speed up hassio send_command url check (#125122)
* Speed up hassio send_command url check

The send_command call checked the resulting path to make
sure that the input path was not modified when converting
to a URL. Since the host is is pre-set, we only need to check
the processed raw_path matches command instead of converting
back to a string, and than comparing it against another
constructed string.

* Speed up hassio send_command url check

The send_command call checked the resulting path to make
sure that the input path was not modified when converting
to a URL. Since the host is is pre-set, we only need to check
the processed raw_path matches command instead of converting
back to a string, and than comparing it against another
constructed string.

* adjust
2024-09-03 15:29:02 +02:00
Mike Degatano
dbcef2e3c3
Add more supervisor info to system info panel (#115715)
* Add virtualization field fo system info

* Add ntp sync and host connectivity

* Prevent nonetype errors

* Add supervisor_connectivity and fix tests

* Add mock of network info to other fixtures

* Update more fixtures with network/info mock
2024-05-28 16:14:42 +02:00
Marc Mueller
34bd291615
Use PEP 695 for decorator typing (1) (#117638) 2024-05-17 16:27:02 +02:00
Sid
82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Mike Degatano
6d903300be
Apply suggestion failures fail supervisor repair (#113372) 2024-03-14 10:53:55 +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
Marc Mueller
8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05: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
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
Mike Degatano
68200de4d2
Bad Request from supervisor should be error (#111162) 2024-02-27 21:49:52 +01: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
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
Marc Mueller
a6fc4c2bd5
Improve hassio typing (#107292) 2024-01-08 10:08:09 +01: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
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
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
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
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
Franck Nijhof
feb3f543be
Improve Supervisor API handling (#89379) 2023-03-08 15:21:11 +01:00
Erik Montnemery
052145fabd
Fix grammar in some hassio docstrings (#86458) 2023-01-23 15:45:08 +01:00
Franck Nijhof
cb13418bab
String formatting and max line length - Part 2 (#84393) 2022-12-22 11:38:59 +01:00
Martin Hjelmare
9ded232522
Move zwave_js addon manager to hassio integration (#81354) 2022-11-10 10:09:52 +01:00
Mike Degatano
82151bfd40
Create repairs for unsupported and unhealthy (#80747) 2022-10-31 09:57:54 -04:00
Pascal Vizeli
eac7c5f177
Remove deprecated X-Hassio-Key usage (#73783)
* Remove deprecated X-Hassio-Key usage

* ...

* Update const.py

* Update ingress.py

* Update test_ingress.py

Co-authored-by: Ludeeus <ludeeus@ludeeus.dev>
2022-06-21 17:11:20 +02:00
Joakim Sørensen
3a0111e65d
Use supervisor envs instead of hassio (#72601) 2022-05-30 12:00:13 +02:00
Joakim Sørensen
cfdfa3eab2
Make hassio coordinator refresh data (#69272) 2022-04-04 17:34:06 +02:00
Joakim Sørensen
d17f8e9ed6
Add update platform to the Supervisor integration (#68475) 2022-03-22 12:21:12 +01:00
Ville Skyttä
b52c5c82b1
Use http.HTTPStatus in components/[gh]* (#58246) 2021-10-23 20:34:53 +02:00
avee87
a0bb2c8b33
Add memory/cpu percentage to Supervisor addons entities (#57468)
* Add memory/cpu percentage to Supervisor addons entities

* fixed lint

* Use a single update function. Fixed tests

* use constant

* review comments

* oops
2021-10-22 12:23:21 +02:00
Joakim Sørensen
8ed8747225
Resolve addon repository slug for device registry (#51287)
* Resolve addon repository slug for device registry

* typo

* Adjust onboarding test

* Use /store
2021-05-31 14:06:11 +02:00
Joakim Sørensen
65c39bbd92
Change discovery timeout from 10 to 60 (#48924) 2021-04-09 16:44:02 +02:00
Joakim Sørensen
09c51da3a2
Add analytics integration (#48256)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-29 17:20:11 -07:00
Joakim Sørensen
8b3dccb1b4
Use ClientTimeout for hassio send_command (#47957) 2021-03-15 11:31:34 -07:00
Joakim Sørensen
403514ccb3
Add system health section for the Supervisor (#43074) 2020-11-11 20:12:24 +01:00
Martin Hjelmare
da6bdd4464
Add supervisor set add-on options helper (#41651) 2020-10-15 23:38:53 +02:00
Franck Nijhof
5f95b5caaf
Fix lastest version in updater for Supervisor enabled installs (#38773)
* Fix lastest version in update for Supervisor enabled installs

* Fix updater tests
2020-08-12 08:00:38 +02:00
Stefan Agner
c2f5831181
Support dual stack IP support (IPv4 and IPv6) (#38046)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-04 15:34:23 +02:00
Franck Nijhof
53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00