Commit Graph

64 Commits (70d4ee93f52094b16bbdcba1c68a2f234e214ca0)

Author SHA1 Message Date
epenet c759512c70
Prevent callback decorator on coroutine functions ()
* Prevent callback decorator on async functions

* Adjust

* Adjust

* Adjust components

* Adjust tests

* Rename

* One more

* Adjust

* Adjust again

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-23 02:55:55 +02:00
Marc Mueller d24cf9e4ec
Improve generic event typing [cloud] () 2024-04-06 13:59:12 +02:00
Erik Montnemery 23e9be756d
Fix exception when logging out from cloud ()
* Fix exception when logging out from cloud

* Add test
2024-03-27 16:02:47 +01:00
Marc Mueller 81c34ac952
Fix spelling [docstrings + comments] () 2024-03-25 11:33:00 +01:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] () 2024-03-08 14:51:32 +01:00
Erik Montnemery 9b91da23c4
Improve logging of google_assistant messages ()
* Improve logging of google_assistant messages

* Add tests

* Add test
2024-02-26 11:43:31 +01:00
Erik Montnemery a51d3b4286
Remove store from google_assistant AbstractConfig ()
* Remove store from google_assistant AbstractConfig

* Bump minor version of google_assistant store

* Fix test

* Improve comments

* Fix typo

* Refactor

* Update homeassistant/components/google_assistant/http.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix bug, add tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-12 19:24:21 +01:00
Erik Montnemery 0cb913370f
Rename google_assistant.AbstractConfig.get_local_agent_user_id ()
* Rename google_assistant.AbstractConfig get_local_agent_user_id to get_local_user_id

* Fix
2024-02-06 15:40:12 +01:00
Erik Montnemery 9d42455955
Move async_deinitialize to google_assistant AbstractConfig () 2024-02-05 19:53:22 +01:00
Erik Montnemery 816c2e9500
Improve enabling of Google local fulfillment ()
* Improve enabling of Google local fulfillment

* Add test

* Improve test coverage
2024-01-31 16:28:27 +01:00
J. Nick Koston 4b7a313ece
Use identity checks for CoreState ()
Some of the checks used ==, and some used is. Switch
everything to is as its faster
2024-01-12 10:21:26 +01:00
Jan Bouwhuis c5b32d6307
Add doorbell event to google_assistant ()
* First attempt async_report_state_all

* Move notificationSupportedByAgent to SYNC response

* Make notificationSupportedByAgent conditional

* Add generic sync_options method

* Report event

* Add event_type as ID

* User UUID, imlement query_notifications

* Refactor query_notifications

* Add test

* MyPy

* Unreachable code

* Tweak

* Correct notification message

* Timestamp was wrong unit, it should be in seconds
* Can only allow doorbell class, since it's the only type

* Fix test

* Remove unrelated changes - improve coverage

* Additional tests

---------

Co-authored-by: Joakim Plate <elupus@ecce.se>
2023-09-25 23:20:02 +02:00
Erik Montnemery 4802e7f93a
Add debug logs to cloud migration () 2023-06-07 13:16:23 +02:00
Erik Montnemery 33044bc153
Fix migration of Google Assistant cloud settings () 2023-06-07 11:14:51 +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
Paulus Schoutsen 19dcc8c88f
Re-run expose entities migration if first time failed ()
* Re-run expose entities migration if first time failed

* Count number of exposed entities

* Add tests

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-05-05 08:11:09 -04:00
Erik Montnemery b6664ce367
Improve cloud migration ()
* Improve cloud migration

* Tweak

* Use entity_ids func

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-05-04 23:10:43 -04:00
Erik Montnemery e14be8b0ab
Force migration of cloud settings to exposed_entities () 2023-05-04 09:53:28 -04:00
Erik Montnemery a9d8bc989e
Migrate cloud settings for all Google entities () 2023-05-03 18:56:48 +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 4860a8d1e8
Don't use storage collection helper in ExposedEntities ()
* Don't use storage collection helper in ExposedEntities

* Fix tests
2023-05-03 12:39:22 +02:00
Erik Montnemery e3c16e634b
Allow exposing entities not in the entity registry to assistants () 2023-05-02 22:08:09 +02:00
Erik Montnemery 65c9d4a4ae
Avoid exposing unsupported entities to Google Assistant ()
* Avoid exposing unsupported entities to Google Assistant

* Add Google Assistant specific support sets

* Add test
2023-04-27 10:38:21 +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
epenet b03f4fa1d3
Improve type hints in cloud () 2023-02-03 17:10:25 +01:00
epenet 7871a517a8
Import constants from root () 2022-09-12 18:53:05 +02:00
Paulus Schoutsen 10b083bbf5
Sync empty entities when Google is disabled in cloud () 2022-06-23 11:41:34 +02:00
Paulus Schoutsen fbb08994f4
Only sync when HA is started up as we already sync at startup () 2022-06-02 16:15:04 -07:00
Paulus Schoutsen d57a650290
Don't trigger entity sync when Google Assistant gets disabled () 2022-06-01 12:12:54 +02:00
Paulus Schoutsen 6d74149f22
Sync entities when enabling/disabling Google Assistant () 2022-05-31 14:58:45 -07:00
Paulus Schoutsen 2e3e7f1e94
Sync area changes to google ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-27 22:32:13 -07:00
Erik Montnemery ff7d5c92d5
Exclude hidden entities from cloud () 2022-03-23 12:42:45 +01:00
Paulus Schoutsen 499081df86
Cloud to avoid setting up Alexa/Google during setup phase () 2022-02-16 12:10:26 -08:00
epenet 3a09090a4b
Drop use of deprecated ENTITY_CATEGORIES ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-24 13:36:42 +01:00
Erik Montnemery aa40476b49
Fix comments, improve readability in Cloud () 2022-01-17 14:19:11 +01:00
Loek Sangers 25fe213f22
Enable local fulfillment google assistant ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-01-05 12:09:59 -08:00
Erik Montnemery a0a8b9db26
Add entity category 'system' ()
* Add entity category 'hidden'

* Update cloud

* Update Google assistant

* Update Alexa

* Fix tests

* Add ENTITY_CATEGORIES constant

* Rename ENTITY_CATEGORY_HIDDEN to ENTITY_CATEGORY_SYSTEM

* Correct import in motioneye
2021-10-28 14:36:41 +02:00
Ville Skyttä 73d192b3f3
Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[bc]* () 2021-10-22 19:43:40 +02:00
Marc Mueller 184e0d7fdf
Use assignment expressions 26 () 2021-10-22 11:31:17 +02:00
Erik Montnemery 0f2b5ea28e
Don't expose config or diagnostic entities to cloud () 2021-10-15 09:35:32 -07:00
Paulus Schoutsen dec7877671
Handle logout prefs update for Google/Alexa () 2021-09-10 09:08:43 -07:00
Paulus Schoutsen 27e29b714c
Bump cloud to 0.47.1 ()
* Bump cloud to 0.47.0

* Bump reqs

* Bump to 0.47.1

* Do not load hass_nabucasa during http startup

* fix some tests

* Fix test

Co-authored-by: Ludeeus <ludeeus@ludeeus.dev>
2021-09-01 09:54:54 -07:00
Paulus Schoutsen f472219c68
Set up cloud semi-dependencies at start () 2021-06-01 01:35:31 +02:00
Paulus Schoutsen 05aeff5591
Describe Google Assistant events ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-13 09:31:01 -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
Bram Kragten b1d0b37d2c
Google assistant: disconnect user agent when not found in google () 2021-03-23 15:04:32 -07:00
Paulus Schoutsen b956a571f4
Fix Cloud Google/Alexa check () 2021-02-17 06:49:53 +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
J. Nick Koston da2f9db62e
Fix async functions accidentally marked as callbacks () 2020-10-10 16:54:36 +02:00
Paulus Schoutsen 5217139e0b
Allow exposing domains in cloud () 2020-08-28 16:49:17 +02:00