Commit graph

42 commits

Author SHA1 Message Date
Ruslan Sayfutdinov
55f4962c06
Fix pylint plugin which checks relative imports () 2021-12-23 11:14:47 -08:00
J. Nick Koston
10d6247fee
Bump to aiohttp 3.8.0 () 2021-11-04 10:07:50 -05:00
Marc Mueller
3f1b4906bf
Use assignment expressions 35 () 2021-10-31 18:32:17 +01:00
Marc Mueller
238b488642
Use assignment expressions 03 () 2021-10-17 20:08:11 +02:00
Marc Mueller
77ee72cbb9
Import Callable from collections.abc (1) () 2021-09-29 16:32:11 +02:00
Marc Mueller
48bada5a18
Update pylint to 2.11.1 () 2021-09-18 13:52:59 +02:00
Ruslan Sayfutdinov
7195b8222b
Bump PyJWT to 2.1.0 () 2021-09-07 20:59:02 -07:00
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors () 2021-05-20 18:53:29 +03:00
Martin Hjelmare
e32dc306e1
Fix oauth2 helper user step typing () 2021-05-14 23:39:14 +02:00
Ruslan Sayfutdinov
ce15f28642
Add missing type hints in http component () 2021-05-10 14:30:47 -07:00
Franck Nijhof
96f69fb9fb
Finalize clean up connection classes () 2021-05-04 20:08:51 +02:00
Ruslan Sayfutdinov
183220008d
Rename FlowResultDict to FlowResult () 2021-04-29 13:40:51 +02:00
Marc Mueller
c07646db5d
Update typing syntax ()
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Ruslan Sayfutdinov
80f66f301b
Define data flow result type ()
* Define data flow result type

* Revert explicit definitions

* Fix tests

* Specific mypy ignore
2021-04-15 07:17:07 -10:00
Franck Nijhof
f0e5e616a7
Fix device discovery of OAuth2 config flows () 2021-03-25 10:35:01 -07:00
Marc Mueller
6fb2e63e49
Update typing 02 () 2021-03-17 18:34:19 +01:00
Franck Nijhof
5d5a110a20
None optional hass typing in base entity and notify () 2021-03-15 15:11:41 +01:00
J. Nick Koston
da677f7d5a
Add support for discovery via DHCP ()
* Add support for discovery via DHCP

* additional tesla ouis

* merge tests

* dhcp test

* merge requirements test

* dhcp test

* dhcp discovery

* dhcp discovery

* pylint

* pylint

* pylint

* fix

* Add matching tests

* 100% cover

* cleanup

* fix codespell

* Update exception handling

* remove unneeded comment

* fix options handling exception

* fix options handling exception
2021-01-14 09:09:08 +01:00
Allen Porter
eb07282e9b
Add debug logging for failed OAuth token refreshes to help users diagnose () 2020-12-30 10:03:27 +01:00
Paulus Schoutsen
f9fa24950b
OAuth2 to use current request header () 2020-11-27 08:55:34 +01:00
springstan
92379ad8d2
Use list literal without using dict.keys() () 2020-10-30 09:19:13 -05:00
J. Nick Koston
94219c2266
Ensure the oauth2 token is refreshed before it is expired ()
The current implementation assumed clocks were in sync and did
not account for the time it took to refresh the token.  A 20
second buffer has been added to ensure that the token is refreshed
before it expires as OAuth2Session.valid_token would assume the
token was still good even though the remote would reject it
and would not refresh because it was not time yet.
2020-10-28 07:47:54 -05:00
Erik Montnemery
343e5d64b8
Add MQTT integration discovery ()
* Add MQTT integration discovery

* Add script/hassfest/mqtt.py

* Unsubscribe if config entry exists

* Add homeassistant/generated/mqtt.py

* Fix bad loop

* Improve tests

* Improve tests

* Apply suggestions from code review

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>

* Prevent initiating multiple config flows

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2020-10-07 18:30:51 +02:00
Joakim Sørensen
0cce35b23e
Add exception for NoURLAvailableError in OAuth2FlowHandler ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-10 14:52:49 +02:00
Aidan Timson
6f43285a28
Force token expires_in to float () 2020-09-07 21:26:58 +02:00
Franck Nijhof
755761867d
Use current request context in OAuth redirect () 2020-08-15 15:26:54 +02:00
Franck Nijhof
8b21b415c4
Fix/Rewrite of Toon integration ()
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-22 18:22:41 -07:00
Franck Nijhof
3cc94f7d6a
ConfigFlow default discovery without unique ID () 2020-06-15 13:38:38 +02:00
Franck Nijhof
e3e3a113e9
async_get_url -> get_url () 2020-05-08 21:53:28 +02:00
Franck Nijhof
2223592486
Add get_url helper, deprecate base_url () 2020-05-08 02:29:47 +02:00
Ville Skyttä
9b7e31eca3
Make f-strings without placeholder normal strings () 2020-04-10 09:59:06 +02:00
Fabian Affolter
2647296475
Refactor API documentation ()
* Upgrade Sphinx to 2.4.4

* Refactor API documentation

* Remove left-over

* Remove Markdown from docstring

* Update titels
2020-03-25 13:21:04 -07:00
Ville Skyttä
221d5205e4
Upgrade mypy to 0.770, tighten config a bit ()
* Upgrade mypy to 0.770, related cleanups

https://mypy-lang.blogspot.com/2020/03/mypy-0770-released.html

* Clean up config and make it a notch stricter, address findings
2020-03-12 11:52:20 +01:00
Franck Nijhof
1b739f9555 Removes unneeded abort if unique id in Oauth2 discovery flow () 2020-01-13 05:29:19 -08:00
Franck Nijhof
6729902010 Fix discovery for oauth2 flow implementations ()
* Fix discovery for oauth2 flow implementations

* Fix user step

* Add tests
2020-01-12 07:37:34 -08:00
Ville Skyttä
130571c478 Remove no longer needed auth.util, use secrets instead () 2019-12-12 16:46:33 +01:00
Bas Nijholt
67c56c860d Sort imports according to PEP8 for 'homeassistant' folder ()
Components are already done
2019-12-09 16:42:10 +01:00
Paulus Schoutsen
79ac77a93d
Almond integration ()
* Initial Almond integration

* Hassfest

* Update library

* Address comments

* Fix inheritance issue py36

* Remove no longer needed check

* Fix time
2019-10-28 23:47:31 -07:00
Ville Skyttä
f88ead597a Type hint improvements ()
* Add and improve core and config_entries type hints

* Complete and improve config_entries type hints

* More entity registry type hints

* Complete helpers.event type hints
2019-10-28 13:36:26 -07:00
Paulus Schoutsen
08cc9fd375
Add cloud account linking support ()
* Add cloud account linking support

* Update account_link.py
2019-10-25 16:04:24 -07:00
Paulus Schoutsen
6391a68fd5 Better header check for OAuth2 helper () 2019-10-18 20:11:54 -05:00
Paulus Schoutsen
b6c26cb363
Introduce new OAuth2 config flow helper ()
* Refactor the Somfy auth implementation

* Typing

* Migrate Somfy to OAuth2 flow helper

* Add tests

* Add more tests

* Fix tests

* Fix type error

* More tests

* Remove side effect from constructor

* implementation -> auth_implementation

* Make get_implementation async

* Minor cleanup + Allow picking implementations.

* Add support for extra authorize data
2019-10-18 13:06:33 -07:00