mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-28 01:34:38 +01:00
added global settings parameter for buzzer sound in UI
This commit is contained in:
parent
7aecdac6a7
commit
f975eb7a47
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,3 @@
|
||||||
__version__ = "4.1.7.a1"
|
__version__ = "4.1.7.a2"
|
||||||
__codename__ = "Groundhog Day"
|
__codename__ = "Groundhog Day"
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ class ConfigUpdate(CBPiExtension):
|
||||||
SENSOR_LOG_MAX_BYTES = self.cbpi.config.get("SENSOR_LOG_MAX_BYTES", None)
|
SENSOR_LOG_MAX_BYTES = self.cbpi.config.get("SENSOR_LOG_MAX_BYTES", None)
|
||||||
slow_pipe_animation = self.cbpi.config.get("slow_pipe_animation", None)
|
slow_pipe_animation = self.cbpi.config.get("slow_pipe_animation", None)
|
||||||
NOTIFY_ON_ERROR = self.cbpi.config.get("NOTIFY_ON_ERROR", None)
|
NOTIFY_ON_ERROR = self.cbpi.config.get("NOTIFY_ON_ERROR", None)
|
||||||
|
PLAY_BUZZER = self.cbpi.config.get("PLAY_BUZZER", None)
|
||||||
BoilAutoTimer = self.cbpi.config.get("BoilAutoTimer", None)
|
BoilAutoTimer = self.cbpi.config.get("BoilAutoTimer", None)
|
||||||
|
|
||||||
|
|
||||||
|
@ -336,6 +337,16 @@ class ConfigUpdate(CBPiExtension):
|
||||||
except:
|
except:
|
||||||
logger.warning('Unable to update config')
|
logger.warning('Unable to update config')
|
||||||
|
|
||||||
|
## Check if PLAY_BUZZER is in config
|
||||||
|
if PLAY_BUZZER is None:
|
||||||
|
logger.info("INIT PLAY_BUZZER")
|
||||||
|
try:
|
||||||
|
await self.cbpi.config.add("PLAY_BUZZER", "No", ConfigType.SELECT, "Play buzzer sound in Web interface on Notifications",
|
||||||
|
[{"label": "Yes", "value": "Yes"},
|
||||||
|
{"label": "No", "value": "No"}])
|
||||||
|
except:
|
||||||
|
logger.warning('Unable to update config')
|
||||||
|
|
||||||
if BoilAutoTimer is None:
|
if BoilAutoTimer is None:
|
||||||
logging.info("INIT BoilAutoTimer")
|
logging.info("INIT BoilAutoTimer")
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue