Temperature Alert
This commit is contained in:
+7
-2
@@ -69,17 +69,22 @@ def telemetry_payload(device_id, microwave_states, button_state, cloud_alert, gp
|
||||
"logs": logs
|
||||
})
|
||||
|
||||
def lora_new_alert(alert: Alert):
|
||||
def lora_new_alert(alert: Alert, with_message=False):
|
||||
try:
|
||||
from shared.lora_device import LoraCommands
|
||||
except ImportError:
|
||||
pass # No need
|
||||
|
||||
return {
|
||||
payload = {
|
||||
"action": LoraCommands.NEW_ALERT,
|
||||
"alert_type": alert.alertType
|
||||
}
|
||||
|
||||
if with_message:
|
||||
payload["alert_message"] = alert.message
|
||||
|
||||
return payload
|
||||
|
||||
def lora_microwave_state(state: str):
|
||||
try:
|
||||
from shared.lora_device import LoraCommands
|
||||
|
||||
Reference in New Issue
Block a user