Commit Graph

10 Commits (11175b39f5b6f59dd2338cedd95d5c6205b4ed88)

Author SHA1 Message Date
Erwin Oldenkamp 39b26e5ff7
Add device to Wallbox integration (#63011) 2022-01-04 15:46:57 +01:00
hesselonline a4208c0926
Add Reauth flow to Wallbox integration (#58743)
* Add Reauth flow to Wallbox integration

* Review comments processed

* Fixed tests

* Added test for reauth invalid

* Commit to compensate for timedrift, show changes
Compensating for timedrift in my devcontainer,
making a new commit with the right date/time. Requested changes
were done in a previous commit.

* remove reauth schema

* Update homeassistant/components/wallbox/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-11-15 10:25:19 -06:00
hesselonline bfb0d8dd19
Split wallbox sensor type and number type (#58807) 2021-11-02 11:11:46 +01:00
Marc Mueller e97133613a
Fix round - wallbox (#58689)
* Fix wallbox round

* Add test case
2021-10-29 17:52:23 -07:00
hesselonline 6d6cb03848
Add Number platform to Wallbox (#52786)
Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-10-27 12:53:14 -05:00
Ville Skyttä 0de95610e3
Use http.HTTPStatus in components/[wxyz]* (#58330) 2021-10-24 17:25:01 +02:00
Erik Montnemery e0a232aa36
Prevent 3rd party lib from opening sockets in wallbox tests (#56308) 2021-09-17 12:50:11 +02:00
hesselonline e56069558a
Refactor wallbox tests (#51094)
* Changed Testing, removed custom exception
Removed custom exceptions, reverted to builtin. Changed testing approach in all tests, now using the core interface to setup device and mock_requests to create test responses for all calls.

* Reintroduce InvalidAuth exception in __init__
Remove reference to internal HA exception, Reintroduce custom exception

* Removed duplicate entry in test_config_flow

* removed tests from test_init that calling methods directly

* Update tests/components/wallbox/__init__.py

Removed duplicate add_to_hass call

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-27 15:06:25 -04:00
tkdrob c0656878db
Normalize async_setup_entry (#51161) 2021-05-27 15:56:20 +02:00
hesselonline c497c0eadd
Add wallbox integration (#48082)
* Wallbox component added

* resolved mergeconflicts from upstream

* fixed an incorrect removal in CODEOWNERS file

* fixes for pullrequest automatic test

* clean up code after PR tests

* fixed strings.json

* fix config_flow error > wallbox

* fixed some formatting issues

* fix pylint warnings

* fixed error in number.py > set value

* pylint warnings fixed

* some more pylint fixes

* isort fixes

* fix unused_import pylint

* remove tests

* remove test requirements

* config flow test

* test errors resolved

* test file formatting

* isort on test file

* sensor test

* isort on test

* isort test const

* remove not working sensor test

* remove test const

* add switch, number and lock test

* docstrings for test classes

* sort test_number, create test_sensor

* additional tests

* fix test error

* reduced PR to 1 component

* newline in const

* ignore test coverage -> dependency on external device (wallbox)

* do not ignore config_flow

* add test for validate_input

* remove obsolete import

* additional test config flow

* change test sensor

* docstring

* add additional test for exceptions

* fix test_config

* more tests

* fix test_config_flow

* fixed http error test

* catch connectionerror and introduce testing for this error

* remove .coveragefile

* change comment

* Update homeassistant/components/wallbox/__init__.py

review suggestion by janiversen

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Update homeassistant/components/wallbox/__init__.py

review suggestion by janiversen (format only)

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Processed review comments, include more testing for sensor component

* Isolated the async_add_executor_job to make the solution more async

* add a config flow test

* Revert "add a config flow test"

This reverts commit 9c1af82fff.

* Revert "Isolated the async_add_executor_job to make the solution more async"

This reverts commit 0bf034c331.

* Make component more async and add config flow tests

* Changes based on review comments

* made _ methods in WallboxHub for the 'non-async' call to the API and try-catch. Stored the wallbox in the class.

* moved the coordinator to __init__ and pass it as part of the WallboxHub class

* removed obsolete function in __init__

* removed CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL

* fixed spelling and imports on test files

* did isort on component files

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-05-24 13:08:24 +02:00