Commit graph

29 commits

Author SHA1 Message Date
J. Nick Koston
578d4a9b6a
Make the frontend available sooner (Part 1 of 2) ()
* 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 ()

* 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 ()" ()
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 ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-28 21:09:07 -07:00
Ville Skyttä
f8416484f8
More data entry flow and HTTP related type hints () 2020-05-26 09:28:22 -05:00
springstan
8d61893c39
Use HTTP_OK constant ()
* Use http ok constant

* Remove incorrect use

* Run isort

* Fix pylint by adding missing imports

* Fix pylint by fixing one import
2020-04-08 11:47:38 -05:00
springstan
157f972d72
Use f-strings in integrations starting with "H" - "L" ()
* Use f-strings in integrations starting with "H"

* Use f-strings in integrations starting with "I"

* Use f-strings in integrations starting with "J"

* Use f-strings in integrations starting with "K"

* Use f-strings in integrations starting with "L"

* Fix lint error

* Use join instead of f-string in homekit_controller

* Use local variables with f-strings

* Fix lint error

* Escape the characters in f-string

* Sort imports with isort in homeworks light

* Fix pylint error

* Fix broken tests

* Fix broken tests v2
2020-02-28 12:39:29 +01:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations () 2020-01-02 21:17:10 +02:00
Paulus Schoutsen
c76f768a82 Make conversation and intent context aware ()
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Paulus Schoutsen
3231e22ddf
Remove direct authentication via trusted networks or API password ()
* Remove direct authentication via trusted networks and API password

* Fix tests
2019-10-14 14:56:45 -07:00
Ville Skyttä
b738082dad Type check various base components ()
* Type check various component base classes, disabling bunch of checks for now

* Type hint fixes

* Help mypy out some

* Add more type hints
2019-08-11 20:38:18 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Pascal Vizeli
7a78d65633 Fix ingress bug with Firefox ()
* Fix ingress bug with Firefox

* Fix mock

* Fix tests

* Fix test lint
2019-04-15 15:27:13 -07:00
Jason Hu
6a411710df Fix trusted networks auth provider warning message ()
* Fix trusted networks auth provider warning message

* Update auth.py
2019-04-02 21:23:59 -07:00
Thomas Lovén
19d99ddf57 Lower severity level of log messages from http.view () 2019-03-26 19:18:32 -04:00
Paulus Schoutsen
4b1de61110
Use relative imports inside integrations ()
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
Jason Hu
fe1840f901 Deprecate http.api_password ()
* 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
Fabian Affolter
3736120c6a
Update file header ()
* Update file header

* Fix lint issue

* Fix lint issue
2019-02-14 16:01:46 +01:00
Paulus Schoutsen
df21dd21f2 RFC: Call services directly ()
* Call services directly

* Simplify

* Type

* Lint

* Update name

* Fix tests

* Catch exceptions in HTTP view

* Lint

* Handle ServiceNotFound in API endpoints that call services

* Type

* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Paulus Schoutsen
a2386f871d Forbid float NaN in JSON () 2018-11-28 13:25:23 +01:00
Paulus Schoutsen
8b8629a5f4 Add permission checks to Rest API ()
* 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
Paulus Schoutsen
7bb5344942
Remove homeassistant.remote ()
* Remove homeassistant.remote

* Use direct import for API

* Fix docstring
2018-08-21 15:49:58 +02:00
Paulus Schoutsen
c7f4bdafc0 Context ()
* Add context

* Add context to switch/light services

* Test set_state API

* Lint

* Fix tests

* Do not include context yet in comparison

* Do not pass in loop

* Fix Z-Wave tests

* Add websocket test without user
2018-07-28 17:53:37 -07:00
Paulus Schoutsen
169c8d793a
Fix CORS duplicate registration () 2018-07-25 11:36:44 +02:00
Jason Hu
f1286f8e6b Reset failed login attempts counter when login success () 2018-07-20 12:09:48 +02:00
Ville Skyttä
2f7b79764a More pylint 2 fixes ()
## Description:

More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).

## Checklist:
  - [ ] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-20 11:45:20 +03:00
Paulus Schoutsen
2a76a0852f
Allow CORS requests to token endpoint ()
* Allow CORS requests to token endpoint

* Tests

* Fuck emulated hue

* Clean up

* Only cors existing methods
2018-07-19 08:37:00 +02:00
Paulus Schoutsen
5ec7fc7ddb Backend tweaks to make authorization work ()
* Backend tweaks to make authorization work

* Lint

* Add test

* Validate redirect uris

* Fix tests

* Fix tests

* Lint
2018-05-10 10:38:11 +02:00
Paulus Schoutsen
0a2e949e0a Remove crazy JSON encoding things that are no longer used ()
Catch JSON encoding errors in HTTP view
2018-03-12 23:22:08 +01:00
Boyi C
321eb2ec6f Move HomeAssistantView to separate file. Convert http to async syntax. [skip ci] ()
* Move HomeAssistantView to separate file. Convert http to async syntax.

* pylint

* websocket api

* update emulated_hue for async/await

* Lint
2018-03-08 17:51:49 -08:00