Commit Graph

21 Commits (81fe3583c9b2a070fa301330529d61f08d91e5dd)

Author SHA1 Message Date
tkdrob d1c4d0de49
Use bool annotations for setup entries (#51166) 2021-05-27 17:39:06 +02:00
Barry Quiel c079803fcb
Powerwall add Current attribute (#50550) 2021-05-13 11:12:48 -05:00
J. Nick Koston 3f3f77c6e6
Reduce config entry setup/unload boilerplate N-P (#49777) 2021-04-27 20:42:21 +02:00
Franck Nijhof 969c147b77
Clean up superfluous integration setup - part 4 (#49295)
* Clean up superfluous integration setup - part 4

* Adjust tests
2021-04-16 17:46:49 +02:00
J. Nick Koston 4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
J. Nick Koston 6cf57da89f
Use SOURCE_REAUTH constant for starting reauth flows (#48553) 2021-03-31 19:48:32 +02:00
J. Nick Koston a851bff95a
Create async_config_entry_first_refresh to reduce coordinator boilerplate (#48451) 2021-03-29 12:51:39 -10:00
Quentame 198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
J. Nick Koston 884df40951
Update powerwall for new authentication requirements (#46254)
Co-authored-by: badguy99 <61918526+badguy99@users.noreply.github.com>
2021-02-10 20:50:38 +01:00
J. Nick Koston 38d4af1a6e
Remove YAML support from powerwall (#45381) 2021-01-21 21:59:33 -05:00
jrester 734972f876
Update tesla_powerwall to 0.3.3 (#41482) 2020-10-08 08:26:44 -05: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
J. Nick Koston 44552937b6
Fix missing space in powerwall notification message (#36603) 2020-06-10 11:29:56 +02:00
J. Nick Koston 208fa84a27
Update excess powerwall logging to be debug (#34994) 2020-04-30 20:40:31 -04:00
jrester 4b998ea6af
Improve error handling for Powerwall (#34580)
* Improve error handling
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/config_flow.py
	modified:   homeassistant/components/powerwall/const.py
	modified:   homeassistant/components/powerwall/strings.json
	modified:   homeassistant/components/powerwall/translations/en.json

* Change exception name
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/config_flow.py

* Add test

* Rename PowerwallError to POWERWALL_ERROR

* Modify handling of APIChangedErrors
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/const.py
2020-04-26 19:14:53 -05:00
jrester dbd1ca45c4
Update tesla-powerwall to version 0.2.8 (#34545)
* Update tesla-powerwall to version 0.2.7

* Update tesla-powerwall to version 0.2.8
2020-04-22 16:10:06 -05:00
jrester 3776a06281
Use serial numbers for unique_id of powerwall devices (#34351)
* Update tesla-powerwall to version 0.2.5

* Create unique_id from serial numbers of powerwalls
	modified:   homeassistant/components/powerwall/__init__.py
	modified:   homeassistant/components/powerwall/binary_sensor.py
	modified:   homeassistant/components/powerwall/const.py
	modified:   homeassistant/components/powerwall/entity.py
	modified:   homeassistant/components/powerwall/sensor.py
	modified:   tests/components/powerwall/mocks.py
	modified:   tests/components/powerwall/test_sensor.py

* Fix pylint error
	modified:   homeassistant/components/powerwall/__init__.py
2020-04-17 16:21:14 -05:00
jrester 6924192523
Use updated powerwall client API library (#34139)
* Use updated powerwall client API library

* Increase instant_power precision to 3

* Add @jrester as code owner for powerwall
2020-04-13 21:59:50 +02:00
J. Nick Koston e6ed2f0377
Add version and device type to powerwall device_info (#33453)
* Add version and device type to powerwall device_info

* Upstream powerwall now supports a http_session
2020-03-31 12:55:50 -07:00
J. Nick Koston 5b4d2aed64
Add Powerwalls integration (#32851)
* Create an integration for Powerwalls

* Self review :: remove unused code

* Remove debug

* Update homeassistant/components/powerwall/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* _call_site_info to module level

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/powerwall/test_binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/binary_sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* remove sensors that I added tests for from the comment

* Update homeassistant/components/powerwall/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/powerwall/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Switch to UNIT_PERCENTAGE

* reduce code

* Add test for import

* Adjust tests

* Add missing file

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-19 10:50:17 -05:00