Commit Graph

12 Commits (701c4ee624bfc593cd41df9efabb84291ad32415)

Author SHA1 Message Date
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
Phil Bruckner ca9dd0c833
Reorganize trigger code (#38655) 2020-08-17 11:54:56 -05:00
David F. Mulcahey 732457745f
Add guard to ZHA device triggers (#32559) 2020-03-07 12:59:18 -05:00
David F. Mulcahey b5022f5bcb
guard against invalid trigger and action scenarios (#32512) 2020-03-05 15:52:09 -05:00
springstan 1ee8057662 Move imports to top for zha (#29555)
* Move imports to top for zha
* Move back some imports, add annotation for disabling import-outside-toplevel
* Move import config_flow before import api
2019-12-06 16:12:46 -05:00
Erik Montnemery c7bd0fe909 Fix ZHA regressions caused by "Support async validation of device trigger" (#27401)
* Revert "Support async validation of device trigger (#27333)"

This reverts commit fdf4f398a7.

* Revert only ZHA changes

* Fix whitespace

* Restore ZHA changes but add check to make sure ZHA is loaded

* Address review comment

* Remove additional check
2019-10-14 14:11:43 -04:00
Erik Montnemery fdf4f398a7
Support async validation of device trigger (#27333) 2019-10-09 21:04:11 +02:00
Erik Montnemery dabdf8b577 Validate generated device triggers (#27264)
* Validate generated trigger

* Update scaffold
2019-10-07 13:09:48 -07:00
Erik Montnemery 65ce3b49c1
Add support for `for` to binary_sensor, light and switch device triggers (#26658)
* Add support for `for` to binary_sensor, light and switch device triggers

* Add WS API device_automation/trigger/capabilities
2019-10-02 22:14:52 +02:00
Paulus Schoutsen 77654da341
Add templates to scaffold device_trigger, device_condition, (#26871)
device_action
2019-09-27 12:54:17 -07:00
David F. Mulcahey b1a9fa47ca Add device action support for ZHA (#26903)
* start implementing device actions

* rename file

* cleanup and add tests

* fix docstrings

* sort imports
2019-09-27 09:57:47 -07:00
Paulus Schoutsen 6fdff9ffab
Reorg device automation (#26880)
* async_trigger -> async_attach_trigger

* Reorg device automations

* Update docstrings

* Fix types

* Fix extending schemas
2019-09-24 14:57:05 -07:00