core/tests/components/cloud
Andrew Hayworth 2bf2214d51 Add support for locks in google assistant component (#18233)
* 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.
2018-11-06 10:39:10 +01:00
..
__init__.py Add option to disable specific integrations (#16757) 2018-09-20 23:46:51 +02:00
conftest.py Add option to disable specific integrations (#16757) 2018-09-20 23:46:51 +02:00
test_auth_api.py Remove unused cloud APIs (#12913) 2018-03-05 22:28:15 +01:00
test_http_api.py Cloud conf (#18216) 2018-11-05 13:21:03 +01:00
test_init.py Don't use keyset (#17984) 2018-10-29 21:25:17 +01:00
test_iot.py Add support for locks in google assistant component (#18233) 2018-11-06 10:39:10 +01:00