mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-28 09:44:20 +01:00
update config parameters with version change and bump version
This commit is contained in:
parent
e01850f2dc
commit
9558f3eb6e
2 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,3 @@
|
||||||
__version__ = "4.1.10.a1"
|
__version__ = "4.1.10.a2"
|
||||||
__codename__ = "Groundhog Day"
|
__codename__ = "Groundhog Day"
|
||||||
|
|
||||||
|
|
|
@ -284,6 +284,16 @@ class ConfigUpdate(CBPiExtension):
|
||||||
{"label": "No", "value": "No"}])
|
{"label": "No", "value": "No"}])
|
||||||
except:
|
except:
|
||||||
logger.warning('Unable to update config')
|
logger.warning('Unable to update config')
|
||||||
|
else:
|
||||||
|
if CONFIG_STATUS is None or CONFIG_STATUS != self.version:
|
||||||
|
try:
|
||||||
|
await self.cbpi.config.add("CSVLOGFILES", logfiles, type=ConfigType.SELECT, description="Write sensor data to csv logfiles (enabling requires restart)",
|
||||||
|
source="craftbeerpi",
|
||||||
|
options= [{"label": "Yes", "value": "Yes"},
|
||||||
|
{"label": "No", "value": "No"}])
|
||||||
|
except:
|
||||||
|
logger.warning('Unable to update config')
|
||||||
|
|
||||||
|
|
||||||
## Check if influxdb is on config
|
## Check if influxdb is on config
|
||||||
if influxdb is None:
|
if influxdb is None:
|
||||||
|
@ -295,7 +305,15 @@ class ConfigUpdate(CBPiExtension):
|
||||||
{"label": "No", "value": "No"}])
|
{"label": "No", "value": "No"}])
|
||||||
except:
|
except:
|
||||||
logger.warning('Unable to update config')
|
logger.warning('Unable to update config')
|
||||||
|
else:
|
||||||
|
if CONFIG_STATUS is None or CONFIG_STATUS != self.version:
|
||||||
|
try:
|
||||||
|
await self.cbpi.config.add("INFLUXDB", influxdb, type=ConfigType.SELECT, description="Write sensor data to influxdb (enabling requires restart)",
|
||||||
|
source="craftbeerpi",
|
||||||
|
options= [{"label": "Yes", "value": "Yes"},
|
||||||
|
{"label": "No", "value": "No"}])
|
||||||
|
except:
|
||||||
|
logger.warning('Unable to update config')
|
||||||
|
|
||||||
## Check if influxdbport is in config and remove it as it is obsolete
|
## Check if influxdbport is in config and remove it as it is obsolete
|
||||||
if influxdbport is not None:
|
if influxdbport is not None:
|
||||||
|
|
Loading…
Reference in a new issue