Added Actor for Cooldown step in settings

- Default Actor can be defined for cooldown to trigger cooling water on and off.
- will be used in automated recipe creation for cooldown step
This commit is contained in:
avollkopf 2022-01-28 07:56:24 +01:00
parent f4b028f263
commit 2de62ca7d5
3 changed files with 13 additions and 2 deletions

View file

@ -1 +1 @@
__version__ = "4.0.1.6"
__version__ = "4.0.1.7"

View file

@ -977,7 +977,8 @@ class UploadController:
"Kettle": self.boilid,
"Timer": step_timer,
"Temp": step_temp,
"Sensor": cooldown_sensor
"Sensor": cooldown_sensor,
"Actor": self.CoolDownActor
},
"status_text": "",
"status": "I",
@ -1001,6 +1002,7 @@ class UploadController:
self.BoilTemp = self.cbpi.config.get("steps_boil_temp", 98)
#get default cooldown temp alarm setting
self.CoolDownTemp = self.cbpi.config.get("steps_cooldown_temp", 25)
self.CoolDownActor = self.cbpi.config.get("steps_cooldown_actor", None)
# get default Kettle from Settings
self.id = self.cbpi.config.get('MASH_TUN', None)
self.boilid = self.cbpi.config.get('BoilKettle', None)
@ -1030,6 +1032,7 @@ class UploadController:
"cooldown": str(self.cooldown),
"boiltemp": str(self.BoilTemp),
"cooldowntemp": str(self.CoolDownTemp),
"cooldownactor": self.CoolDownActor,
"temp_unit": str(self.TEMP_UNIT),
"AutoMode": str(self.AutoMode)
}

View file

@ -28,6 +28,7 @@ class ConfigUpdate(CBPiExtension):
default_cool_temp = 20 if TEMP_UNIT == "C" else 68
boil_temp = self.cbpi.config.get("steps_boil_temp", None)
cooldown_sensor = self.cbpi.config.get("steps_cooldown_sensor", None)
cooldown_actor = self.cbpi.config.get("steps_cooldown_actor", None)
cooldown_temp = self.cbpi.config.get("steps_cooldown_temp", None)
mashin_step = self.cbpi.config.get("steps_mashin", None)
mash_step = self.cbpi.config.get("steps_mash", None)
@ -60,6 +61,13 @@ class ConfigUpdate(CBPiExtension):
except:
logger.warning('Unable to update database')
if cooldown_actor is None:
logger.info("INIT Cooldown Actor Setting")
try:
await self.cbpi.config.add("steps_cooldown_actor", "", ConfigType.ACTOR, "Actor to trigger cooldown water on and off (default: None)")
except:
logger.warning('Unable to update database')
if cooldown_temp is None:
logger.info("INIT Cooldown Temp Setting")
try: