Joakim Sørensen
a5806b59f2
Raise HassioAPIError when error is returned ( #49418 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-19 08:23:43 -07:00
Marc Mueller
8e2b5b36b5
Bump pyupgrade to 2.12.0 ( #48943 )
2021-04-09 09:58:27 -07:00
Franck Nijhof
e63e8b6ffe
Rename hassio config entry title to Supervisor ( #48748 )
2021-04-07 00:46:47 +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
Franck Nijhof
08870690a6
Fix a collection of tests with missing asserts ( #48127 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-20 17:23:55 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups ( #47248 )
...
* Unused pylint suppression cleanups
* Remove outdated pylint bug references
* Add flake8-noqa config and note to run it every now and then
* Add codes to noqa's
* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Raman Gupta
3c290c9a44
Address late hassio review ( #47229 )
...
* hassio code cleanup to address comments in #46342
* fix code
2021-03-01 12:10:51 -05:00
Raman Gupta
0592309b65
Add hassio addon_update service and hassio config entry with addon and OS devices and entities ( #46342 )
...
* add addon_update service, use config flow to set up config entry, create disabled sensors
* move most of entity logic to common entity class, improve device info, get rid of config_flow user step
* fix setup logic
* additional refactor
* fix refactored logic
* fix config flow tests
* add test for addon_update service and get_addons_info
* add entry setup and unload test and fix update coordinator
* handle if entry setup calls unload
* return nothing for coordinator if entry is being reloaded because coordinator will get recreated anyway
* remove entry when HA instance is no longer hassio and add corresponding test
* handle adding and removing device registry entries
* better config entry reload logic
* fix comment
* bugfix
* fix flake error
* switch pass to return
* use repository attribute for model and fallback to url
* use custom 'system' source since hassio source is misleading
* Update homeassistant/components/hassio/entity.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* update remove addons function name
* Update homeassistant/components/hassio/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* fix import
* pop coordinator after unload
* additional fixes
* always pass in sensor name when creating entity
* prefix one more function with async and fix tests
* use supervisor info for addons since list is already filtered on what's installed
* remove unused service
* update sensor names
* remove added handler function
* use walrus
* add OS device and sensors
* fix
* re-add addon_update service schema
* add more test coverage and exclude entities from tests
* check if instance is using hass OS in order to create OS entities
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-03-01 09:41:04 +01:00
Joakim Sørensen
7d90cdea1e
Use dispatch instead of eventbus for supervisor events ( #46986 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-02-25 19:52:11 +01:00
Joakim Sørensen
886067a327
Add websocket handlers to hassio ( #46571 )
2021-02-15 18:18:45 +01:00
Sergio Oller
905100a189
Disambiguate Supervisor HTTPUnauthorized on user/password validation ( #44940 )
...
* Disambiguate HTTPUnauthorized on user/password validation
The HA core API usually returns 401 when the request does not
have proper authentication tokens or they have expired.
However the user/password validation endpoint may also return
401 when the given user/password is invalid.
The supervisor is currently unable to distinguish both scenarios,
and it needs to.
See https://github.com/home-assistant/supervisor/issues/2408
* Return 404 if user& password are not found/valid
* Fix test for invalid user/password
2021-01-08 17:28:22 +01:00
Joakim Sørensen
d99bc99d9b
Prefix versions in system health ( #44921 )
...
* Prefix versions in system health
* Adjust test
* Update homeassistant/components/hassio/strings.json
2021-01-08 16:03:06 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Joakim Sørensen
403514ccb3
Add system health section for the Supervisor ( #43074 )
2020-11-11 20:12:24 +01:00
Paulus Schoutsen
7027b01a29
Fix broken time trigger test ( #42606 )
2020-10-29 22:34:06 +01:00
Joakim Sørensen
1f07a4eba0
Forward client headers for proxied stream responses ( #41663 )
2020-10-15 11:01:37 +02:00
Joakim Sørensen
953f6bad46
Allow non-authenticated calls to supervisor logs during onboarding ( #40617 )
2020-09-28 10:10:10 +02:00
Joakim Sørensen
a42736e437
Allow non-authenticated calls to snapshots during onboarding ( #40582 )
2020-09-26 09:26:02 +02:00
Joakim Sørensen
2d429ea678
Add modifications for snapshot uploads ( #40503 )
...
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-09-25 10:02:26 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 ( #39287 )
2020-08-27 13:56:20 +02:00
Paulus Schoutsen
9979e465aa
Fix hassio auth data ( #39244 )
...
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-25 14:22:50 +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
Paulus Schoutsen
de12c21ce7
Fire config changed event during start ( #36812 )
2020-06-15 15:22:53 -07:00
J. Nick Koston
578d4a9b6a
Make the frontend available sooner (Part 1 of 2) ( #36263 )
...
* Part 1 of 2 (no breaking changes in part 1).
When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.
This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.
Frontend Changes (home-assistant/frontend#6068 )
* Address review comments
* bump timeout to 1800s, adjust comment
* bump timeout to 4h
* remove timeout failsafe
* and the test
2020-06-02 13:54:11 -05:00
Pascal Vizeli
ed014e3c96
Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 ( #36093 )" ( #36251 )
...
This reverts commit fbe7b4ddfa
.
2020-05-29 10:18:39 +02:00
J. Nick Koston
fbe7b4ddfa
Ensure frontend is available if integrations fail to start - Part 1 of 2 ( #36093 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-28 21:09:07 -07:00
Ohad Levy
3ac376ebca
Fix hassio log message typo ( #36194 )
...
minor contribution - thanks for HA :)
2020-05-27 23:07:30 +02:00
Franck Nijhof
eddb5c6c3f
Add more system information from Supervisor ( #35560 )
2020-05-12 15:27:34 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ( #35109 )
...
* Use asynctest-mock in most places
* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen
0d700f6a63
Fix tests for Python 3.8 ( #34672 )
2020-04-25 14:32:55 -07:00
springstan
fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant ( #33832 )
2020-04-08 23:20:03 +02:00
Franck Nijhof
d7e9959442
String formatting improvements for tests (2) ( #33666 )
2020-04-05 00:33:07 +02:00
Franck Nijhof
431a3a6b44
Re-branding of Hass.io panel to Supervisor ( #31480 )
2020-02-05 11:04:17 +01:00
Joakim Sørensen
a5a69bdf71
Adds icon endpoint to NO_AUTH ( #30910 )
...
* Adds icon endpoint to NO_AUTH
* Add test for no_auth icon get
* Blackout
2020-01-17 13:54:28 -08:00
Pascal Vizeli
4731f7c721
Hass.io allow to reset password with CLI ( #30755 )
...
* Hass.io allow to reset passwort with CLI
* Add improvments
* fix comments
* fix lint
* Fix tests
* more tests
* Address comments
* sort imports
* fix test python37
2020-01-14 23:49:56 +01:00
Ville Skyttä
5216477353
Be consistent with Home Assistant and Hass.io spelling ( #30500 )
...
* Be consistent with Home Assistant spelling
* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations ( #30360 )
2020-01-02 21:17:10 +02:00
Franck Nijhof
0fb5fbd85c
Migrate hassio tests from coroutine to async/await ( #30363 )
2020-01-01 17:13:43 -06:00
Bas Nijholt
00dc721609
sort imports according to PEP8 for hassio ( #29634 )
2019-12-08 16:33:22 +01:00
Paulus Schoutsen
3231e22ddf
Remove direct authentication via trusted networks or API password ( #27656 )
...
* Remove direct authentication via trusted networks and API password
* Fix tests
2019-10-14 14:56:45 -07:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen
820b381a8d
Update Hass.io when core config is updated ( #24461 )
...
* Update Hass.io when core config is updated
* Lint
* Fix tests
* Lint sigh
2019-06-10 16:05:43 -07:00
Pascal Vizeli
3e443d253c
Hass.io Add-on panel support for Ingress ( #23185 )
...
* Hass.io Add-on panel support for Ingress
* Revert part of discovery startup handling
* Add type
* Fix tests
* Add tests
* Fix lint
* Fix lint on test
2019-04-19 09:43:47 +02:00
Pascal Vizeli
7a78d65633
Fix ingress bug with Firefox ( #23121 )
...
* Fix ingress bug with Firefox
* Fix mock
* Fix tests
* Fix test lint
2019-04-15 15:27:13 -07:00
Pascal Vizeli
9bb88a6143
Fix ingress routing with / ( #22728 )
2019-04-04 17:43:18 +02:00
Pascal Vizeli
beb6ddfa68
Change URL handling ( #22713 )
2019-04-04 11:10:44 +02:00
Pascal Vizeli
e708032669
Support GET params for websocket ingress path ( #22638 )
2019-04-01 17:41:08 -07:00
Pascal Vizeli
6829ecad9d
Hass.io ingress ( #22505 )
...
* Fix API stream of snapshot / Add ingress
* fix lint
* Fix stream handling
* Cleanup api handling
* fix typing
* Set proxy header
* Use header constant
* Enable the ingress setup
* fix lint
* Fix name
* Fix tests
* fix lint
* forward params
* Add tests for ingress
* Cleanup cookie handling with aiohttp 3.5
* Add more tests
* Fix tests
* Fix lint
* Fix header handling for steam
* forward header too
* fix lint
* fix flake
2019-04-01 14:16:16 +02:00
Paulus Schoutsen
1766536812
Fix test name ( #22421 )
2019-03-26 15:24:28 -07:00
Pascal Vizeli
3fddf5df08
Enable hass.io panel without ping ( #22388 )
...
* Enable hass.io panel without ping
* fix tests
2019-03-26 07:38:25 -07:00
Paulus Schoutsen
f1a0ad9e4a
Frontend indicate require admin ( #22272 )
...
* Allow panels to indicate they are meant for admins
* Panels to indicate when they require admin access
* Do not return admin-only panels to non-admin users
* Fix flake8
2019-03-25 10:04:35 -07:00
Pascal Vizeli
ecfe0fc3dd
Remove config check over supervisor ( #22156 )
...
* Remove config check over supervisor
* Fix lint
* Fix tests
2019-03-18 16:58:48 -07:00
Jason Hu
fe1840f901
Deprecate http.api_password ( #21884 )
...
* Deprecated http.api_password
* Deprecated ApiConfig.api_password
GitHub Drafted PR would trigger CI after changed it to normal PR.
I have to commit a comment change to trigger it
* Trigger CI
* Adjust if- elif chain in auth middleware
2019-03-10 19:55:36 -07:00
Paulus Schoutsen
12d16d9bdc
Update test_auth.py
2019-01-11 12:55:23 -08:00
Paulus Schoutsen
b81260e912
Fix tests
2019-01-11 10:10:36 -08:00
Paulus Schoutsen
7be197b845
Update test_http.py
2019-01-11 10:00:38 -08:00
Paulus Schoutsen
fd21d6cc9d
Add Hass.io user headers to supervisor proxy
2019-01-11 10:00:38 -08:00
Paulus Schoutsen
d1a621601d
No more opt-out auth ( #18854 )
...
* No more opt-out auth
* Fix var
2018-12-02 16:32:53 +01:00
Otto Winter
eec4564c71
Show ANSI color codes in logs in Hass.io ( #18834 )
...
* Hass.io: Show ANSI color codes in logs
* Lint
* Fix test
* Lint
2018-12-02 15:46:14 +01:00
Paulus Schoutsen
c2f8dfcb9f
Legacy api fix ( #18733 )
...
* Set user for API password requests
* Fix tests
* Fix typing
2018-11-27 10:41:44 +01:00
Paulus Schoutsen
8b8629a5f4
Add permission checks to Rest API ( #18639 )
...
* Add permission checks to Rest API
* Clean up unnecessary method
* Remove all the tuple stuff from entity check
* Simplify perms
* Correct param name for owner permission
* Hass.io make/update user to be admin
* Types
2018-11-25 18:04:48 +01:00
Pascal Vizeli
f5d3aa1826
Hass.io auth/sso part2 ( #17324 )
...
* Update discovery.py
* Create const.py
* Update auth.py
* Update const.py
* Update const.py
* Update http.py
* Update handler.py
* Update auth.py
* Update auth.py
* Update test_auth.py
2018-10-11 10:55:38 +02:00
Pascal Vizeli
3f87d41381
Fix auth for hass.io ( #17318 )
...
* Update test_auth.py
* Update auth.py
* Update test_auth.py
2018-10-11 01:02:00 +02:00
Pascal Vizeli
40e0966d7f
Hassio auth ( #17274 )
...
* Create auth.py
* Update auth.py
* Update auth.py
* Update __init__.py
* Update auth.py
* Update auth.py
* Update auth.py
* Update auth.py
* Update auth.py
* Update auth.py
* Update auth.py
* Update auth.py
* Update auth.py
* Add tests
* Update test_auth.py
* Update auth.py
* Update test_auth.py
* Update auth.py
2018-10-10 14:07:51 +02:00
Pascal Vizeli
83dd961fde
Fix hassio discovery ( #17275 )
...
* Update discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Fix tests
* fix lint
2018-10-10 13:50:11 +02:00
Pascal Vizeli
704c9d8582
Add support for Hass.io discovery feature for Add-ons ( #17035 )
...
* Update handler.py
* Update __init__.py
* Update handler.py
* Update __init__.py
* Create discovery.py
* Update handler.py
* Update discovery.py
* Update __init__.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update struct
* Update handler.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update __init__.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update discovery.py
* Update __init__.py
* Update discovery.py
* fix lint
* Update discovery.py
* cleanup old discovery
* Update discovery.py
* Update discovery.py
* Fix lint
* Fix tests
* Write more tests with new functions
* Update test_handler.py
* Create test_discovery.py
* Update conftest.py
* Update test_discovery.py
* Update conftest.py
* Update test_discovery.py
* Update conftest.py
* Update test_discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Update test_discovery.py
* Fix test
* Add test
* fix lint
* Update handler.py
* Update discovery.py
* Update test_discovery.py
* fix lint
* Lint
2018-10-03 13:10:38 +02:00
Pascal Vizeli
d376049a3f
Use one regex for Hass.io URL check ( #16710 )
2018-09-19 12:57:55 +02:00
Paulus Schoutsen
e776f88eec
Use JWT for access tokens ( #15972 )
...
* Use JWT for access tokens
* Update requirements
* Improvements
2018-08-14 21:14:12 +02:00
Paulus Schoutsen
8213b1476f
WIP: Hass.io sent token to supervisor ( #15536 )
...
Hass.io sent token to supervisor
2018-07-23 14:14:57 +02:00
Pascal Vizeli
40c8f5f70e
Fix panel URL authentication for Hass.io ( #15024 )
...
* Update http.py
* Update http.py
* fix tests
* Update test_http.py
2018-06-17 20:34:47 +02:00
Paulus Schoutsen
8c7f0669c6
Allow hassio frontend development ( #14675 )
...
* Allow hassio frontend development
* Fix tests
2018-05-29 08:51:08 +02:00
Paulus Schoutsen
b6e4a7771a
Allow Hass.io panel dir ( #14655 )
2018-05-27 17:17:19 -04:00
Paulus Schoutsen
89a19c89a7
Fix aiohttp deprecation warnings ( #13240 )
...
* Fix aiohttp deprecation warnings
* Fix Ring deprecation warning
* Lint
2018-03-15 21:49:49 +01:00
Pascal Vizeli
b228695907
Hassio cleanup part2 ( #12588 )
...
* Update handler.py
* Update handler.py
* Update __init__.py
* Update handler.py
* Update handler.py
* Update __init__.py
* Update tests
2018-02-21 22:42:55 +01:00
Pascal Vizeli
4f96eeb06e
Cleanup hass.io component ( #12556 )
...
* Cleanup hass.io component
* fix lint
* Fix all tests
* Fix lint
* fix lint
* fix doc lint
2018-02-20 15:24:31 -08:00