S allius/issue217 2 (#230)

* add some reader classes to get the configuration

* adapt unittests

* get config from json or toml file

* loop over all config readers to get the configuration

* rename config test files

* use relative paths for coverage test in vscode

* do not throw an error for missing config files

* remove obsolete tests

* use dotted key notation for pv sub dictonary

* log config reading progress

* remove create_config_toml.py

* remove obsolete tests for the ha_addon

* disable mosquitto tests if the server is down

* ignore main method for test coverage

* increase test coverage

* pytest-cov: use relative_files only on github, so coverage will work with vscode locally

* remove unneeded imports

* add missing test cases

* disable branch coverage, cause its not reachable
This commit is contained in:
Stefan Allius
2024-12-08 13:25:04 +01:00
committed by GitHub
parent ac7b02bde9
commit b335881500
22 changed files with 942 additions and 624 deletions

View File

@@ -39,18 +39,18 @@ schema:
# type: str
# manufacturer: str
# daher diese variante
pv1_manufacturer: str?
pv1_type: str?
pv2_manufacturer: str?
pv2_type: str?
pv3_manufacturer: str?
pv3_type: str?
pv4_manufacturer: str?
pv4_type: str?
pv5_manufacturer: str?
pv5_type: str?
pv6_manufacturer: str?
pv6_type: str?
pv1.manufacturer: str?
pv1.type: str?
pv2.manufacturer: str?
pv2.type: str?
pv3.manufacturer: str?
pv3.type: str?
pv4.manufacturer: str?
pv4.type: str?
pv5.manufacturer: str?
pv5.type: str?
pv6.manufacturer: str?
pv6.type: str?
tsun.enabled: bool
solarman.enabled: bool
inverters.allow_all: bool
@@ -92,10 +92,10 @@ options:
# - string: PV2
# type: SF-M18/144550
# manufacturer: Shinefar
pv1_manufacturer: Shinefar
pv1_type: SF-M18/144550
pv2_manufacturer: Shinefar
pv2_type: SF-M18/144550
pv1.manufacturer: Shinefar
pv1.type: SF-M18/144550
pv2.manufacturer: Shinefar
pv2.type: SF-M18/144550
tsun.enabled: true # set default
solarman.enabled: true # set default
inverters.allow_all: false # set default