Commit Graph

17 Commits (4bebf00598f5a5f98cda4240c86747389896f89f)

Author SHA1 Message Date
Franck Nijhof 6a89b3a135
Small refactor to HomeWizard config flow (#86020)
* Small refactor to HomeWizard config flow

* Update homeassistant/components/homewizard/config_flow.py

Co-authored-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com>

* Process review comments

Co-authored-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com>
2023-01-16 17:03:00 +01:00
Franck Nijhof c26d620ab1
Clean up unused import steps from HomeWizard config flow (#86002) 2023-01-16 12:24:23 +01:00
Franck Nijhof fa0d653216
Update python-homewizard-energy to 1.5.0 (#85966)
* Update python-homewizard-energy to 1.5.0

* Remove strict typing for now

* Revert "Remove strict typing for now"

This reverts commit ebcd327fdf.

* Adjust typing to resolve upstream changes
2023-01-16 09:23:03 +01:00
eMerzh c4c64a8bed
Add missing context in homewizard assistant error (#85397) 2023-01-08 20:09:37 -05:00
Duco Sebel d8cbff65f1
Fix code quality issues for HomeWizard (#84134)
* Remove unused constant

* Reuse fetch check for retrieving device information

* Remove else block

* Patch integration setup in test

* use isinstance to detect return type, instead of tuple

* Raise exception when recoverable error has been triggered to make code cleaner

* Use error code to split message and localization

* Actually log things
2022-12-29 10:35:24 -08:00
Franck Nijhof cb13418bab
String formatting and max line length - Part 2 (#84393) 2022-12-22 11:38:59 +01:00
Duco Sebel b41d0be952
Improve HomeWizard request issue reporting (#82366)
* Trigger reauth flow when HomeWizard API was disabled

* Add tests for reauth flow

* Fix typo in test

* Add parallel updates constant

* Improve error message when device in unreachable during config

* Set quality scale

* Remove quality scale

* Throw error instead of abort when setup fails

* Adjust test for new setup behaviour

* Trigger reauth flow when API is disabled and continue retrying

* Reload entry and raise AuthFailed during init

* Abort running config flow

* Listen for coordinator updates to trigger reload

* Use build-in backoff system

* Fix failing test

* Test reauth flow is active after disable-api init

* Test reauth flow removal
2022-12-16 10:53:54 -05:00
Duco Sebel db5e94c93b
Fix HomeWizard is not catching RequestError (#73719)
* Fix RequestError was not catched

* Add test for RequestError
2022-06-20 10:30:57 +02:00
epenet 627d6f7803
Ensure description_placeholders is always typed (#72716) 2022-05-31 10:33:34 +02:00
Duco Sebel 88c49f034a
Use 'python-homewizard-energy' dependency for HomeWizard (#71781)
* Update requirement

* Remove aiohwenergy and use python-homewizard-energy

* Update test to work with python-homewizard-energy

* Bumb python-homewizard-energy to 1.0.3
2022-05-25 09:05:11 +02:00
Duco Sebel f2fe091979
Allow HomeWizard devices with disabled api to show up in discovery (#65295) 2022-02-08 14:51:28 -08:00
Duco Sebel 0d3bbfc9a7
Fix `homewizard_energy` migration issues from #65594 (#65718) 2022-02-04 14:45:06 -08:00
Duco Sebel a97e69196c
Add migration to migrate 'homewizard_energy' to 'homewizard' (#65594) 2022-02-04 09:12:35 -08:00
Duco Sebel 4f3ce27560
Add `flow_title` for HomeWizard Energy (#65047) 2022-01-27 14:30:31 +01:00
Duco Sebel 19c65abaa6
Fix initial HomeWizard integration issues (#63921)
* Use helper for setup and unload

* Set mutable object in __init__

* Move logic out of try..except

* Print stack trace on error in config flow

* Don't catch broad except in update_coordinator, already handled

* Fix typo

* Combine available with super.available()

* Fix issues with config_flow test

* Test coordiantor indirectly

* Test coordinator by moving time forward

* set utcnow beforehand and increase timedelta

* Roll back f658749

* Rolled back the rollback and fixed timing

* Move setting time after adding to hass
2022-01-14 19:28:24 +01:00
Marc Mueller f3bc9fc740
Update Python version used for pylint (#63895) 2022-01-11 13:41:57 +01:00
Duco Sebel 8f6e24aa1e
Add HomeWizard Energy integration (#55812)
Co-authored-by: Matthias Alphart <farmio@alphart.net>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-01-10 16:23:31 -08:00