-
- Downloads
Refactor Enocean part 1 (#35927)
* First step of an EnOcean integration refactoring, including code reorganisation and support of a setup config flow
* Moved title to root of strings file
* Fixed pre-commit checks failures
* Fixed linter errors
* Updated formatted string format in logs
* Removed leftover comment
* Multiple changes after PR change requests.
Using an import flow for yaml config, removed unnecessary logs, added proper unload in __init__ and EnOceanDongle
Replaced config state machine by several flows.
Serial port validity check done in the EnOceanDongle class asynchronously, removed unique ID from config flow
Multiple cosmetic changes
* Multiple changes after PR change requests
* Added variable to store default value, as setdefault was caught returning None when the empty dict literal was passed as an argument
* Literal used directly
* Added tests for EnOcean config flows, changed static methods to bundle methods for bundle
* Updated variable name
* Added missing mock to test, replaced repeated magic strings by constants
* Changed imports to avoid an unused import warning from pylint on DOMAIN
* Adding pylint exception for unused import
* Added proper propagation of setup and unload to platforms, removed dead code, some syntax changes
* Removed setup_entry forwarding as the entities can only be configured using yaml
* Removed forwarding of unload
* Enabled code coverage for config flow only
* Clean up coveragerc
Co-authored-by:
Martin Hjelmare <marhje52@gmail.com>
Showing
- .coveragerc 8 additions, 1 deletion.coveragerc
- homeassistant/components/enocean/__init__.py 34 additions, 70 deletionshomeassistant/components/enocean/__init__.py
- homeassistant/components/enocean/binary_sensor.py 3 additions, 2 deletionshomeassistant/components/enocean/binary_sensor.py
- homeassistant/components/enocean/config_flow.py 94 additions, 0 deletionshomeassistant/components/enocean/config_flow.py
- homeassistant/components/enocean/const.py 15 additions, 0 deletionshomeassistant/components/enocean/const.py
- homeassistant/components/enocean/device.py 39 additions, 0 deletionshomeassistant/components/enocean/device.py
- homeassistant/components/enocean/dongle.py 87 additions, 0 deletionshomeassistant/components/enocean/dongle.py
- homeassistant/components/enocean/light.py 3 additions, 2 deletionshomeassistant/components/enocean/light.py
- homeassistant/components/enocean/manifest.json 7 additions, 2 deletionshomeassistant/components/enocean/manifest.json
- homeassistant/components/enocean/sensor.py 3 additions, 3 deletionshomeassistant/components/enocean/sensor.py
- homeassistant/components/enocean/strings.json 27 additions, 0 deletionshomeassistant/components/enocean/strings.json
- homeassistant/components/enocean/switch.py 3 additions, 2 deletionshomeassistant/components/enocean/switch.py
- homeassistant/components/enocean/translations/en.json 27 additions, 0 deletionshomeassistant/components/enocean/translations/en.json
- homeassistant/generated/config_flows.py 1 addition, 0 deletionshomeassistant/generated/config_flows.py
- requirements_test_all.txt 3 additions, 0 deletionsrequirements_test_all.txt
- tests/components/enocean/__init__.py 1 addition, 0 deletionstests/components/enocean/__init__.py
- tests/components/enocean/test_config_flow.py 159 additions, 0 deletionstests/components/enocean/test_config_flow.py
Loading
Please register or sign in to comment