while self.running == True: await asyncio.sleep(1) return StepResult.DONE @parameters([ Property.Number(label="Timer", description="Time in Minutes", configurable=True), Property.Number(label="Temp", description="Boil temperature", configurable=True), Property.Sensor(label="Sensor"), Property.Kettle(label="Kettle"), Property.Select("First_Wort", options=["Yes", "No"], description="First Wort Hop alert if set to Yes"), Property.Number("Hop_1", configurable=True, description="First Hop alert (minutes before finish)"), Property.Number("Hop_2", configurable=True, description="Second Hop alert (minutes before finish)"), Property.Number("Hop_3", configurable=True, description="Third Hop alert (minutes before finish)"), Property.Number("Hop_4", configurable=True, description="Fourth Hop alert (minutes before finish)"), Property.Number("Hop_5", configurable=True,
import logging from socket import timeout from typing import KeysView from cbpi.api.config import ConfigType from cbpi.api.base import CBPiBase import numpy as np import warnings @parameters([ Property.Text(label="Notification", configurable=True, description="Text for notification"), Property.Select( label="AutoNext", options=["Yes", "No"], description= "Automatically move to next step (Yes) or pause after Notification (No)" ) ]) class FermenterNotificationStep(CBPiFermentationStep): async def NextStep(self, **kwargs): await self.next(self.fermenter.id) return StepResult.DONE async def on_timer_done(self, timer): self.summary = self.props.get("Notification", "") if self.AutoNext == True: self.cbpi.notify(self.name, self.props.get("Notification", ""), NotificationType.INFO) if self.shutdown != True:
from voluptuous.schema_builder import message from cbpi.api.dataclasses import NotificationAction, NotificationType from cbpi.api.dataclasses import Kettle, Props from cbpi.api import * import logging from socket import timeout from typing import KeysView from cbpi.api.config import ConfigType from cbpi.api.base import CBPiBase import numpy as np import warnings @parameters([Property.Text(label="Notification",configurable = True, description = "Text for notification"), Property.Select(label="AutoNext",options=["Yes","No"], description="Automatically move to next step (Yes) or pause after Notification (No)")]) class NotificationStep(CBPiStep): async def NextStep(self, **kwargs): await self.next() async def on_timer_done(self,timer): self.summary = self.props.get("Notification","") if self.AutoNext == True: self.cbpi.notify(self.name, self.props.get("Notification",""), NotificationType.INFO) await self.next() else: self.cbpi.notify(self.name, self.props.get("Notification",""), NotificationType.INFO, action=[NotificationAction("Next Step", self.NextStep)]) await self.push_update()
import logging from socket import timeout from typing import KeysView from cbpi.api.config import ConfigType from cbpi.api.base import CBPiBase import numpy as np import warnings @parameters([ Property.Text(label="Notification", configurable=True, description="Text for notification"), Property.Select( label="AutoNext", options=["Yes", "No"], description= "Automatically move to next step (Yes) or pause after Notification (No)" ) ]) class NotificationStep(CBPiStep): async def NextStep(self, **kwargs): await self.next() async def on_timer_done(self, timer): self.summary = self.props.get("Notification", "") if self.AutoNext == True: self.cbpi.notify(self.name, self.props.get("Notification", ""), NotificationType.INFO) await self.next() else: