1
mirror of https://github.com/home-assistant/core synced 2024-07-27 18:58:57 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Robert Hillis
c4d8d1dc8e
Use entity class attributes for Aten pe (#52687)
* Use entity class attributes for aten_pe

* Use entity class attributes for atag
2021-07-08 10:39:53 +03:00
Franck Nijhof
258b388f41
Collection of changing entity properties to class attributes (#51248)
* Collection of changing entity properties to class attributes

* Apply suggestions from code review

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-05-31 10:50:11 +02: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
Erik Montnemery
066e921a8b
Rename SwitchDevice to SwitchEntity (#34673) 2020-04-26 18:50:37 +02:00
Andreas Oberritter
64628c1f70 Add ATEN PE component for ATEN eco PDUs (#27960)
* Add ATEN PE component for ATEN eco PDUs

* aten_pe: Require host configuration

* aten_pe: Do not import from other integrations

* aten_pe: Include unnamed outlets

* aten_pe: Avoid get() for config entries having default values

* aten_pe: Fix documentation URI

* aten_pe: Remove unused return value

* aten_pe: Update atenpdu lib to 0.2.0 for asyncio

* aten_pe: Raise exception if initialization fails

* aten_pe: Update atenpdu lib to 0.3.0 for improved exception handling
2019-12-01 17:46:12 +01:00