This commit is contained in:
2026-08-11 18:16:49 +02:00
parent 1543dde603
commit 07051a7255
6 changed files with 127 additions and 9 deletions
+13 -1
View File
@@ -1,5 +1,11 @@
from time import time
from shared.deviceTypes import DEVICE_TYPES
from shared.alerts import Alert, AlertType
import shared.config as config
try:
from shared.lora_device import LoraCommands
except ImportError:
pass # No need
try:
@@ -65,4 +71,10 @@ def telemetry_payload(device_id, microwave_states, button_state, cloud_alert, gp
"ambient_humidity": ambient_humidity,
"connected_components": connected_components,
"logs": logs
})
})
def lora_new_alert(alert: Alert):
return {
"action": LoraCommands.NEW_ALERT,
"alert_type": alert.alertType
}