Commit Graph

33 Commits (bbb40fde849a3189125d83bfb07769ffb488d641)

Author SHA1 Message Date
Paulus Schoutsen 7848381f43
Allow managing cloud webhook (#18672)
* 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
2018-11-26 14:10:18 +01:00
Paulus Schoutsen d9c7f777c5
Add cloud pref for Google unlock (#18600) 2018-11-20 23:23:07 +01:00
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
Paulus Schoutsen bf54582d76 Cloud conf (#18216)
* Add original config to entityfilter

* Add alexa/google config to cloud status call

* Lint
2018-11-05 13:21:03 +01:00
Paulus Schoutsen 2f71f8908b
Don't use keyset (#17984) 2018-10-29 21:25:17 +01:00
Paulus Schoutsen bdfd473aaa Reconnect if sub info comes in that is valid again (#17651) 2018-10-21 12:16:24 +02:00
Paulus Schoutsen 326787ef1a Add another 3 days leeway to give time for payment processing times (#17542) 2018-10-17 10:45:01 +02:00
Paulus Schoutsen 092c146eae
Add option to disable specific integrations (#16757)
* Add option to disable specific integrations

* Lint
2018-09-20 23:46:51 +02:00
Paulus Schoutsen e58836f99f
Add subscription info endpoint (#16727)
* Add subscription info endpoint

* Lint

* Lint

* Make decorator

* Lint
2018-09-20 14:53:13 +02:00
Paulus Schoutsen d071df0dec
Do not make internet connection during tests (#15858)
* Do not make internet connection

* Small improvement
2018-08-07 09:27:40 +02:00
Paulus Schoutsen e746b92e0e Fix deprecated code (#14681) 2018-05-29 23:14:58 +02:00
Paulus Schoutsen 12dff5baa8 Add room hint support to Google Assistant cloud (#14180) 2018-04-30 21:05:29 +02:00
Paulus Schoutsen 4bd6776443
Google assistant sync (#13392)
* Add Google Assistant Sync API

* Update const.py

* Async/await
2018-03-23 12:13:52 -07:00
Paulus Schoutsen 89a19c89a7 Fix aiohttp deprecation warnings (#13240)
* Fix aiohttp deprecation warnings

* Fix Ring deprecation warning

* Lint
2018-03-15 21:49:49 +01:00
Paulus Schoutsen 9b1a75a74b
Refactor Google Assistant (#12959)
* 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
2018-03-08 14:39:10 -08:00
Paulus Schoutsen e5c4bba906 Remove unused cloud APIs (#12913) 2018-03-05 22:28:15 +01:00
Paulus Schoutsen 228b030c82
Cloud unauth (#12840)
* Handle expired refresh token better

* Retry less aggressive

* Newline
2018-03-02 10:33:05 -08:00
Paulus Schoutsen 51c06e35cf
Cloud reconnect tweaks (#12586) 2018-02-21 12:55:33 -08:00
Paulus Schoutsen 39847ea651 Clarify cloud error (#12540)
* Clarify cloud error

* Fix tests
2018-02-20 12:31:43 +01:00
Paulus Schoutsen f2296e1ff8 Retry keyset cloud (#12270)
* Use less threads in helpers.event tests

* Add helpers.event.async_call_later

* Cloud: retry fetching keyset
2018-02-10 11:40:24 +01:00
Otto Winter 2ae0c5653e Fix source code using Windows newline (#12248)
* 🚜 Fix usage of carriage return

* 🤝 Rebase and repeat

* 🚜 Fix file permissions
2018-02-09 08:11:47 +01:00
Paulus Schoutsen 8313225b40
Move Google Assistant entity config out of customize (#11499)
* Move Google Assistant entity config out of customize

* CONF_ALIAS -> CONF_ALIASES

* Lint
2018-01-09 15:14:56 -08:00
Paulus Schoutsen 8b57777ce9
Alexa to not use customize for entity config (#11461)
* Alexa to not use customize for entity config

* Test Alexa entity config

* Improve tests

* Fix test
2018-01-05 12:33:22 -08:00
Paulus Schoutsen b7c7041873
Add some tests to the cloud component (#11460) 2018-01-04 21:40:18 -08:00
Paulus Schoutsen f314b6cb6c Cloud Updates (#11404)
* Verify stored keys on startup

* Handle Google Assistant messages

* Fix tests

* Don't verify expiration when getting claims

* Remove email based check

* Lint

* Lint

* Lint
2018-01-03 19:16:59 +01:00
Paulus Schoutsen cfd78f7b02 Add HTTP endpoint for resending email confirmation (#11354) 2017-12-29 14:46:10 +01:00
Paulus Schoutsen b56675a7bb
Don't connect to cloud if subscription expired (#11163)
* Final touch for cloud component

* Fix test
2017-12-16 00:42:25 -08:00
Paulus Schoutsen fe0a9529ed Cloud cognito switch (#10823)
* Allow email based cognito instance

* Fix quitting Home Assistant while reconnecting

* Lint
2017-11-27 10:09:17 +01:00
Paulus Schoutsen ea7ffff0ca Cloud updates (#10567)
* Update cloud

* Fix tests

* Lint
2017-11-15 08:16:19 +01:00
Paulus Schoutsen 0362a76cd6 Cloud connection via aiohttp (#9860)
* Cloud: connect to cloud

* Fix tests in py34

* Update warrant to 0.5.0

* Differentiate errors between unknown handler vs exception

* Lint

* Respond to cloud message to logout

* Refresh token exception handling

* Swap out bare exception for RuntimeError

* Add more tests

* Fix tests py34
2017-10-14 19:43:14 -07:00
Michael Prokop 08b0629eca Fix a bunch of typos (#9545)
s/Addres /Address /
s/Chnage/Change/
s/Converion/Conversion/
s/Supressing/Suppressing/
s/agains /against /
s/allready/already/
s/analagous/analogous/
s/aquired/acquired/
s/arbitray/arbitrary/
s/argment/argument/
s/aroung/around/
s/attibute/attribute/
s/auxillary/auxiliary/
s/befor /before /
s/commmand/command/
s/conatin/contain/
s/conection/connection/
s/coresponding/corresponding/
s/entites/entities/
s/enviroment/environment/
s/everyhing/everything/
s/expected expected/expected/
s/explicity/explicitly/
s/formated/formatted/
s/incomming/incoming/
s/informations/information/
s/inital/initial/
s/inteface/interface/
s/interupt/interrupt/
s/mimick/mimic/
s/mulitple/multiple/
s/multible/multiple/
s/occured/occurred/
s/occuring/occurring/
s/overrided/overridden/
s/overriden/overridden/
s/platfrom/platform/
s/positon/position/
s/progess/progress/
s/recieved/received/
s/reciever/receiver/
s/recieving/receiving/
s/reponse/response/
s/representaion/representation/
s/resgister/register/
s/retrive/retrieve/
s/reuqests/requests/
s/segements/segments/
s/seperated/separated/
s/sheduled/scheduled/
s/succesfully/successfully/
s/suppport/support/
s/targetting/targeting/
s/thats/that's/
s/the the/the/
s/unkown/unknown/
s/verison/version/
s/while loggin out/while logging out/
2017-09-23 17:15:46 +02:00
Paulus Schoutsen c9fc3fae6e Update cloud auth (#9357)
* Update cloud logic

* Lint

* Update test requirements

* Address commments, fix tests

* Add credentials
2017-09-12 18:47:04 +02:00
Paulus Schoutsen 0b58d5405e Add cloud auth support (#9208)
* Add initial cloud auth

* Move hass.data to a dict

* Move mode into helper

* Fix bugs afte refactor

* Add tests

* Clean up scripts file after test config

* Lint

* Update __init__.py
2017-08-29 13:40:08 -07:00