Compare commits
18 Commits
420-config
...
s-allius/i
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50a7dbca41 | ||
|
|
ef889dc53b | ||
|
|
c9ab95a02d | ||
|
|
783bb1c832 | ||
|
|
f3bc22ef68 | ||
|
|
5e5a2ccdd0 | ||
|
|
09ae4f9bb8 | ||
|
|
838f6d76d0 | ||
|
|
d693c0b48a | ||
|
|
9a8ca02b47 | ||
|
|
7a86f682b9 | ||
|
|
0048d71f9d | ||
|
|
c6822fd309 | ||
|
|
298b72bbc9 | ||
|
|
089c35f89e | ||
|
|
ba025eb09b | ||
|
|
ddf8222003 | ||
|
|
d5b3b804bc |
@@ -7,7 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [unreleased]
|
||||
|
||||
- fix the paths to copy the config.example.toml file during proxy start
|
||||
- add MQTT topic `dcu_power` for setting output power on DCUs
|
||||
- Update ghcr.io/hassio-addons/base Docker tag to v17.2.5
|
||||
- fix a lot of pytest-asyncio problems in the unit tests
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
pytest-cov==6.1.1
|
||||
python-dotenv==1.1.0
|
||||
mock==5.2.0
|
||||
coverage==7.8.1
|
||||
coverage==7.8.0
|
||||
jinja2-cli==0.8.2
|
||||
@@ -162,8 +162,7 @@ class Config():
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def init(cls, def_reader: ConfigIfc, log_path: str = '',
|
||||
cnf_path: str = 'config') -> None | str:
|
||||
def init(cls, def_reader: ConfigIfc, log_path: str = '') -> None | str:
|
||||
'''Initialise the Proxy-Config
|
||||
|
||||
Copy the internal default config file into the config directory
|
||||
@@ -174,13 +173,12 @@ and initialise the Config with the default configuration '''
|
||||
try:
|
||||
# make the default config transparaent by copying it
|
||||
# in the config.example file
|
||||
logging.info(
|
||||
f'Copy Default Config to {cnf_path}config.example.toml')
|
||||
logging.debug('Copy Default Config to config.example.toml')
|
||||
|
||||
shutil.copy2("cnf/default_config.toml",
|
||||
cnf_path + "config.example.toml")
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
shutil.copy2("default_config.toml",
|
||||
"config/config.example.toml")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# read example config file as default configuration
|
||||
try:
|
||||
|
||||
@@ -127,8 +127,7 @@ class Server():
|
||||
def build_config(self):
|
||||
# read config file
|
||||
Config.init(ConfigReadToml(self.src_dir + "cnf/default_config.toml"),
|
||||
log_path=self.log_path,
|
||||
cnf_path=self.config_path)
|
||||
log_path=self.log_path)
|
||||
ConfigReadEnv()
|
||||
ConfigReadJson(self.config_path + "config.json")
|
||||
ConfigReadToml(self.config_path + "config.toml")
|
||||
|
||||
Reference in New Issue
Block a user