Commit graph

99 commits

Author SHA1 Message Date
Martin Hjelmare
4da04a358a
Refactor cloud assist pipeline ()
* Refactor cloud assist pipeline

* Return None early
2023-12-14 23:56:08 +01:00
Martin Hjelmare
2e448d2d13
Remove cloud details from assist pipeline ()
* Remove cloud details from assist pipeline

* Update assist pipeline tests

* Update cloud tests
2023-12-14 10:15:59 +01:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Marc Mueller
a9ade1f84d
Use asyncio.timeout [core] () 2023-08-15 08:36:05 -05:00
Franck Nijhof
5e020ea354
Add is_admin checks to cloud APIs () 2023-08-08 11:02:42 +02:00
Erik Montnemery
937ebb374c
Enable strict type checks of cloud ()
* Enable strict type checks of cloud

* Fix circular import

* Address review comments

* Apply suggestions from code review
2023-05-24 11:46:11 +02:00
Erik Montnemery
f089f52504
Update cloud WS API for getting entity ()
* Update cloud WS API for getting entity

* Adjust comment
2023-05-03 17:06:42 +02:00
Erik Montnemery
b71f98e8b7
Include all entities in cloud lists () 2023-05-03 16:14:04 +02:00
Erik Montnemery
31de1b17e8
Allow setting google disable 2fa flag on any entity ()
* Allow setting google disable 2fa flag on any entity

* Fix test

* Include disable_2fa flag in cloud/google_assistant/entities/get
2023-05-03 09:55:38 -04:00
Erik Montnemery
2522c6d697
Add WS command cloud/alexa/entities/get ()
* Add WS command cloud/alexa/entities/get

* Fix bugs, add test
2023-04-27 17:10:29 +02:00
Erik Montnemery
904ce226fb
Tweak response of /api/cloud/login () 2023-04-26 15:28:08 +02:00
Erik Montnemery
2750a5c3e6
Make assist_pipeline an after dependency of cloud () 2023-04-26 13:45:32 +02:00
Erik Montnemery
ed737f306b
Remove cloud assist pipeline setup from cloud client () 2023-04-26 06:53:58 -04:00
Erik Montnemery
57a59d808b
Automaticially create an assist pipeline using cloud stt + tts ()
* Automaticially create an assist pipeline using cloud stt + tts

* Return the id of the cloud enabled pipeline

* Wait for platforms to load

* Fix typing

* Fix startup race

* Update tests

* Create a cloud pipeline only when logging in

* Fix tests

* Tweak _async_resolve_default_pipeline_settings

* Improve assist_pipeline test coverage

* Improve cloud test coverage
2023-04-25 20:40:01 -05:00
Joakim Sørensen
2c8b704a6d
Add certificate status for cloud remote () 2023-04-13 00:38:32 +02:00
Erik Montnemery
44c89a6b6c
Refactor handling of exposed entities for cloud Alexa and Google ()
* Refactor handling of exposed entities for cloud Alexa

* Tweak WS API

* Validate assistant parameter

* Address some review comments

* Refactor handling of exposed entities for cloud Google

* Raise when attempting to expose an unknown entity

* Add tests

* Adjust cloud tests

* Allow getting expose new entities flag

* Test Alexa migration

* Test Google migration

* Add WS command cloud/google_assistant/entities/get

* Fix return value

* Update typing

* Address review comments

* Rename async_get_exposed_entities to async_get_assistant_settings
2023-04-06 13:09:45 -04:00
Erik Montnemery
f55aaf7664
Drop unused Google entity settings from cloud () 2023-03-16 11:15:38 +01:00
Franck Nijhof
b0cee0bc46
String formatting and max line length - Part 1 ()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
Joakim Sørensen
63807e443a
Skip client metadata values that are None () 2022-12-20 09:32:27 -05:00
Joakim Sørensen
7c82b78f8c
Add repair for legacy subscription to cloud integration () 2022-11-28 23:35:24 +01:00
epenet
2c43606922
Add websocket type hints in components ()
* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-20 13:41:14 +02:00
epenet
60640b4436
Add websocket type hints in components () 2022-10-18 22:15:23 -04:00
epenet
416a5cb279
Import constants from component root () 2022-09-14 00:12:54 +02:00
epenet
911402e747
Remove cloud from mypy ignore list () 2022-07-15 10:47:30 +02:00
Paulus Schoutsen
aabfa08834
Add if subscription is active to cloud status () 2022-03-17 09:51:07 +01:00
Paulus Schoutsen
d3bb622a3c
Bump hass-nabucasa to 0.53.0 () 2022-02-18 11:53:02 -08:00
Paulus Schoutsen
cd5b69d02e
Add Google local indicator () 2022-02-16 07:54:59 -08:00
Paulus Schoutsen
9cbdd36082
Expose if HTTP is configured for SSL () 2022-01-26 09:34:48 +01:00
Erik Montnemery
e6899416e1
Suppress Alexa state reports when not authorized () 2022-01-17 09:14:26 -08:00
Erik Montnemery
aa40476b49
Fix comments, improve readability in Cloud () 2022-01-17 14:19:11 +01:00
Erik Montnemery
be628a7c4d
Keep track of Alexa authorization status () 2022-01-13 09:47:31 -08:00
Erik Montnemery
9c9dc4cb8c
Import websocket_api (part 1) () 2022-01-11 18:24:08 +01:00
Franck Nijhof
20bdcc7fff
Replace hass.helpers: async_get_clientsession() () 2022-01-11 17:33:50 +01:00
Joakim Sørensen
d1bb916070
Add client metadata to cloud register () 2022-01-10 14:49:25 +01:00
Erik Montnemery
dec54488e8
Enable basic type checking for cloud ()
* Enable basic type checking for cloud

* Update mypy settings

* Address review comment

* Fix rebase mistakes

* Correct decorator order
2021-11-17 09:07:01 +01:00
Paulus Schoutsen
afa7ca1222
Drop block on local proxies from HA Cloud () 2021-11-14 08:11:12 -08:00
J. Nick Koston
10d6247fee
Bump to aiohttp 3.8.0 () 2021-11-04 10:07:50 -05:00
Ville Skyttä
73d192b3f3
Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[bc]* () 2021-10-22 19:43:40 +02:00
Paulus Schoutsen
e34c985534
Simplify cloud request connection handling ()
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-09-22 07:51:31 -07:00
Paulus Schoutsen
93083513b4
Bump hass-nabucasa 49 () 2021-09-06 16:05:33 -07:00
Bram Kragten
03b7b1305c
Cloud: Expose if google is registered in status + check on login ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-29 19:26:51 +02:00
Paulus Schoutsen
82746616fa
Cloud: Add web socket API to pick default TTS language ()
* Allow picking default TTS language

* Fix test

* Fix coroutine function

* Improve test coverage

* Remove stale import

* Clean up hass

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-13 00:05:30 +01:00
Paulus Schoutsen
69b5176730
Make Alexa custom ID unique ()
* Make Alexa custom ID unique

* Lint

* Lint
2021-01-05 17:35:28 +01:00
springstan
db582bdc1b
Use http status constants more, add HTTP_ACCEPTED and HTTP_BAD_GATEWAY ()
* Use http status codes and add HTTP_BAD_GATEWAY constant

* Address review comments:
 - using constants in tado integration
 - using constant in media_player init.py

* Add and use HTTP_ACCEPTED constant
2020-09-15 20:01:07 +03:00
Paulus Schoutsen
5217139e0b
Allow exposing domains in cloud () 2020-08-28 16:49:17 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Paulus Schoutsen
a8e9ccbf1a
Improve cloud error handling () 2020-06-11 22:56:00 -07:00
Paulus Schoutsen
1ac8442c63
Fix Cloud UI bug preventing managing Google 2FA ()
* Fix Cloud UI bug preventing managing Google 2FA

* Update comment
2020-04-15 08:43:43 -07:00
springstan
4c38e6cfa5
Use HTTP_BAD_REQUEST constant () 2020-04-09 21:43:42 +02:00
springstan
fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant () 2020-04-08 23:20:03 +02:00