* Alexa: implement auth and proactive ChangeReport messages
* refactor after rebase from dev to use the new AlexaDirective and Response classes
* move to aiohttp; cleanup
* better function name
* move endpoint to config
* allow passing token function
* remove uneeded state get
* use iterable directly
Co-Authored-By: abmantis <abmantis@users.noreply.github.com>
* missing delete from previous commit
* checks for when user has no auth config
* update cloud component
* PR suggestions
* string lint
* Revert "string lint"
This reverts commit a05a1f134c9ebc7a6e67c093009744f142256365.
* linters are now happier
* more happy linters
* use internal date parser; improve json response handling
* remove unused import
* use await instead of async_add_job
* protect access token update method
* add test_report_state
* line too long
* add docstring
* Update test_smart_home.py
* test accept grant api
* init prefs if None
* add tests for auth and token requests
* replace global with hass.data
* doc lint
The `Config` object specific to the `google_assistant` component
had a default value for `allow_unlock`. We were not overriding this
default when constructing the Config object during `google_assistant`
component setup, whereas we do when setting up the `cloud` component.
To fix, we thread the `allow_unlock` parameter down through http setup,
and ensure that it's set correctly. Moreover, we also change the
ordering of the `Config` parameters, and remove the default. Future
refactoring should not miss it, as it is now a required parameter.
* Add cloud webhook support
* Simplify payload
* Add cloud http api tests
* Fix tests
* Lint
* Handle cloud webhooks
* Fix things
* Fix name
* Rename it to cloudhook
* Final rename
* Final final rename?
* Fix docstring
* More tests
* Lint
* Add types
* Fix things
* Add support for locks in google assistant component
This is supported by the smarthome API, but there is no documentation
for it. This work is based on an article I found with screenshots of
documentation that was erroneously uploaded:
https://www.androidpolice.com/2018/01/17/google-assistant-home-can-now-natively-control-smart-locks-august-vivint-first-supported/
Google Assistant now supports unlocking certain locks - Nest and August
come to mind - via this API, and this commit allows Home Assistant to
do so as well.
Notably, I've added a config option `allow_unlock` that controls
whether we actually honor requests to unlock a lock via the google
assistant. It defaults to false.
Additionally, we add the functionNotSupported error, which makes a
little more sense when we're unable to execute the desired state
transition.
https://developers.google.com/actions/reference/smarthome/errors-exceptions#exception_list
* Fix linter warnings
* Ensure that certain groups are never exposed to cloud entities
For example, the group.all_locks entity - we should probably never
expose this to third party cloud integrations. It's risky.
This is not configurable, but can be extended by adding to the
cloud.const.NEVER_EXPOSED_ENTITIES array.
It's implemented in a modestly hacky fashion, because we determine
whether or not a entity should be excluded/included in several ways.
Notably, we define this array in the top level const.py, to avoid
circular import problems between the cloud/alexa components.
* Refactor Google Assistant
* Fix cloud test
* Fix supported features media player demo
* Fix query
* Fix execute
* Fix demo media player tests
* Add tests for traits
* Lint
* Lint
* Add integration tests
* Add more tests
* update logging
* Catch out of range temp errrors
* Fix cloud error
* Lint