* 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.
When the websocket is created `SSLContext.load_default_certs` is called
each time which opens up the system default ssl certs file and reads it in
Normally this goes unnoticed, however since there are frequent connects
and disconnects of the websocket it was noticeable.
* Rename BinarySensorDevice to BinarySensorEntity
* Tweak
* Move deprecation warning to __new__, add test
* Move deprecation warning back to __init__
* Move deprecation warning to __init_subclass
* Convert sense to use DataUpdateCoordinator for trends
* remove unused
* request update right away
* clarify
* call async refresh later
* Update homeassistant/components/sense/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/sense/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Add prettier (in pre-commit and CI)
* Make all file prettier
* Change order
* Add to Azure Pipelines
* Fix a YAML file prettier caught as invalid
* Remove flow mapping using curly braces from all YAML service files
* Config Flow for sense
* Fix unique ids so they are actually unique (and migrate the old ones)
* Fix missing solar production
* Do not mark sensors available until they have data
* Address review items
* Address review round #2