Commit Graph

245 Commits (6c7ac7a6ef5bbe48b10576d3f0398be1af29b441)

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
Mike Degatano ae37c8cc7a
Add repair for add-on boot fail (#129847) 2024-11-05 11:53:01 +01:00
Erik Montnemery 08a53362a7
Fix stringification of discovered hassio uuid (#129797) 2024-11-04 12:26:34 +01:00
Erik Montnemery b09e54c961
Bump aiohasupervisor to version 0.2.1 (#129574) 2024-10-31 19:37:31 +01:00
Erik Montnemery 8eaec56c6b
Stringify discovered hassio uuid (#129572)
* Stringify discovered hassio uuid

* Correct DiscoveryKey

* Adjust tests
2024-10-31 13:54:27 +01:00
Robert Resch 380974eed4
Remove hassio from ALLOWED_USED_COMPONENTS and move some functions to helper (#127228)
* Remove hassio from ALLOWED_USED_COMPONENTS

* Move HassioServiceInfo to helpers.service_info

* Deprecate moved functions

* Add note about deprecation

* Fix tests

* Implement suggestion

* Typo

* Update pyproject.toml

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-10-30 12:43:41 +01:00
Mike Degatano 673f0224c9
Continue migration of methods from handler to aiohasupervisor (#129183) 2024-10-29 14:33:21 +01:00
Wendelin cbfa3bb56d
Hassio logs boots (#129151)
* Add hassio logs/boots proxy settings

* Add hassio http tests
2024-10-28 16:41:14 +01:00
Wendelin 2453e1284f
Add Hassio HTTP logs/follow to allowed paths (#126606)
* Add logs/follow to admin paths in hassio.http

* Add tests for logs/follow admin paths in hassio.http

* Add tests for logs/follow admin paths in hassio.http

* Add compress and timeout exclusions for hassio http api

* Fix should_compress usage in hassio/ingress

* Add missing follow exceptions for hassio/http

* Add hassio range header forward for logs endpoints

* Fix test syntax hassio/http
2024-10-23 09:57:14 +02: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
Jan Bouwhuis edb30af441
Fix hassio data fetching over list[Repository] (#128206)
* Fix hassio data fetching over list[Repository]

* Parameterize store mock and add store data to sensor tests
2024-10-12 14:44:26 +02:00
Michael 07021dbd65
Use single_instance_allowed in hassio (#128060)
* use single_instance_allowed

* mark hassio as `single_config_entry`
2024-10-11 23:37:14 +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
Joost Lekkerkerker 9d9b5af97f
Deprecate hassio service to update addon (#127927)
* Deprecate hassio service to update addon

* Update homeassistant/components/hassio/strings.json

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

* service -> action

* service -> action; in the title as well

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-10-08 14:23:29 +02:00
Erik Montnemery cee7017d20
Reinitialize hassio discovery flow on config entry removal (#127088)
* Reinitialize hassio discovery flow on config entry removal

* Address review comments
2024-10-08 14:07:05 +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 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
Jan Bouwhuis 26e87509be
Cleanup hassio fixtures in home assistant hardware integration tests (#124500) 2024-08-23 19:40:35 +02:00
Jan Bouwhuis 44b6bca89a
Refactor and cleanup zwave_js fixtures to share them (#124485)
Refactor and cleanup zwave_js fixtures to use
2024-08-23 15:42:57 +02:00
Jan Bouwhuis 51dba1eec3
Cleanup redundant fixtures and move all other hassio addon fixtures to be shared (#124437) 2024-08-22 20:58:05 +02:00
Jan Bouwhuis 61114d8328
Install and start Mosquitto MQTT broker add on from MQTT config flow (#124106)
* Opt in to install Mosquitto broker add-on in MQTT config flow

* rephrase

* Tests with supervisor and running add-on

* Complete tests for success flows

* Also set up entry in success flow

* Use realistic names for addon and broker

* Finetuning and fail test cases

* Spelling

* Improve translation strings

* Update addon docstr

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Raise AddonError if add-on does not start

* Only show the option to use the add-on

* Simplify flow, rework and cleanup

* Revert unrelated cleanup, process suggestion

* Move ADDON_SLUG const to addon module

* Move fixture to component level

* Move back supervisor fixture

* Move addon_setup_time_fixture and superfixe to config flow model tests

* Refactor hassio fixture

* Rename helpers as they are no fixtures, remove fixture from their names

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-08-22 09:07:45 +02:00
epenet b054c037fe
Improve type hints in hassio tests (#121221) 2024-07-05 09:05:21 +02:00
Marc Mueller 921430d497
Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
epenet c896458fcf
Fix namespace-import pylint warning in components (#119299) 2024-06-10 15:55:08 +02:00
Mike Degatano 78f53341b7
Always have addon url in detached_addon_missing (#119011) 2024-06-07 10:52:15 +02:00
Marc Mueller 33ed4fd862
Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
epenet fb51163075
Move socket_enabled fixture to decorator (#118847) 2024-06-06 17:27:38 +02:00
epenet 3d31af3eb4
Move entity_registry_enabled_by_default to decorator [a-p] (#118794) 2024-06-04 16:18:42 +02:00
epenet 3ac0fa53c8
Cleanup unused FixtureRequest in tests (#118780) 2024-06-04 11:49:21 +02:00
epenet 666fc2333a
Add type hints for AiohttpClientMocker in test fixtures (#118691) 2024-06-03 10:13:22 +02:00
epenet 092cdcfe91
Improve type hints in tests (a-h) (#118379) 2024-05-30 08:46:18 +02:00
epenet 461ac1e0bc
Add ClientSessionGenerator type hints in tests (#118377) 2024-05-29 14:49:14 +02:00
epenet d10362e226
Add AiohttpClientMocker type hints in tests (#118373) 2024-05-29 14:38:46 +02:00
Stefan Agner cae22e5109
Adjust add-on installation error message (#118309) 2024-05-29 09:41:09 +02:00
epenet a59621bf9e
Add more type hints to pylint plugin (#118319) 2024-05-28 18:37:38 +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
Mike Degatano 05c24e92d1
Add repair for detached addon issues (#118064)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-05-26 13:37:50 +02:00
epenet addc4a84ff
Rename hassio coordinator module (#117611) 2024-05-17 12:10:21 +02:00
Erik Montnemery b013d6ade9
Fix flaky hassio test (#116658) 2024-05-02 16:24:14 -05:00
J. Nick Koston 76639252c9
Make discovery flow tasks background tasks (#116327) 2024-04-28 08:13:37 -05:00
Mike Degatano f1ebe9d20a
Add repairs to hassio manifest (#115486)
* Add repairs to hassio manifest

* Remove unnecessary fixture
2024-04-17 15:51:29 +02:00
Mike Degatano 5308e02c99
Add support for adopt data disk repair (#114891) 2024-04-11 11:23:10 +02:00
epenet 0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Sid 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
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
Marc Mueller 81c34ac952
Fix spelling [docstrings + comments] (#114168) 2024-03-25 11:33:00 +01:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Jan Bouwhuis 6e84dbde35
Fix lingering hassio issues test (#113569) 2024-03-15 15:10:24 -10:00