Commit Graph

17 Commits (2502e7669c9fce7b4f1074a79713db968e85151c)

Author SHA1 Message Date
Marc Mueller 76199c0eb2
Update typing 04 (#48037) 2021-03-17 23:34:25 +01:00
Ville Skyttä b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Quentame 1855c91988
Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const (#36233)
* Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const

* Fix pylint

* Use in tests

* Search for "client_id"

* Fix tests

* Fix test

* Fix test
2020-05-30 17:27:20 +02:00
Franck Nijhof e3e3a113e9
async_get_url -> get_url (#35382) 2020-05-08 21:53:28 +02:00
Franck Nijhof 2223592486
Add get_url helper, deprecate base_url (#35224) 2020-05-08 02:29:47 +02:00
springstan e3bcfb88e7
Improve string formatting v4 (#33668)
* Improve string formatting v4

* Use normal strings instead of f-strings

* Fix zeroconf test by adding back part of a condition
2020-04-05 16:01:41 +02:00
springstan dde93304d3
Improve string formatting v2 (#33645)
* Improve string formatting v2

* Improve string formatting v3

* Address review comments
2020-04-04 23:09:34 +02:00
Bas Nijholt 790881fa7b Sort imports according to PEP8 for almond (#29688) 2019-12-09 11:27:16 +01:00
Paulus Schoutsen c76f768a82 Make conversation and intent context aware (#28965)
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Bram Kragten ae3cf72fb2 Fix Almond onboarding url when using cloud (#28908) 2019-11-20 13:03:01 -08:00
Paulus Schoutsen 5961215e6e
Set up Almond Web to connect to HA (#28603)
* Set up Almond Web to connect to HA

* Add missing string

* Add type
2019-11-12 11:01:19 -08:00
Paulus Schoutsen fc04b3e31c
Remove choice word when Almond has choices (#28725) 2019-11-12 09:22:28 -08:00
Bram Kragten 28c6837f00 Add attribution and onboarding commands to conversation and Almond (#28621)
* Add attribution and onboarding commands to conversation and Almond

* False -> None

* Comments

* Update __init__.py

* Comments + websocket for convert

* Lint
2019-11-08 09:06:23 -08:00
Paulus Schoutsen fadb6a3979
Add support for conversation ID (#28620) 2019-11-07 12:21:12 -08:00
Paulus Schoutsen 9a0a889492
Fix token sent to Almond Web (#28584) 2019-11-06 08:32:33 -08:00
Paulus Schoutsen 79ac77a93d
Almond integration (#28282)
* Initial Almond integration

* Hassfest

* Update library

* Address comments

* Fix inheritance issue py36

* Remove no longer needed check

* Fix time
2019-10-28 23:47:31 -07:00