Temperature Alert
This commit is contained in:
+5
-2
@@ -20,10 +20,12 @@ class AlertManager:
|
||||
self.alerts.clear()
|
||||
|
||||
class Alert:
|
||||
def __init__(self, alertType: "AlertType", message: str):
|
||||
def __init__(self, alertType: "AlertType", message: str, redistributed: bool = False, small_message: str = None):
|
||||
self.alertType = alertType
|
||||
self.message = message
|
||||
self.small_message = small_message
|
||||
self.timestamp = time.time()
|
||||
self.redistributed = redistributed
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
@@ -44,4 +46,5 @@ class Alert:
|
||||
return alert
|
||||
|
||||
class AlertType:
|
||||
COOKING_SAFETY = "COOKING_SAFETY"
|
||||
COOKING_SAFETY = "COOKING_SAFETY"
|
||||
TEMPERATURE_ALERT = "TEMPERATURE_ALERT"
|
||||
Reference in New Issue
Block a user