Fix import error

This commit is contained in:
2026-08-16 14:21:20 +02:00
parent 36abfc8234
commit d9b596d465
+5 -4
View File
@@ -2,10 +2,6 @@ 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:
@@ -74,6 +70,11 @@ def telemetry_payload(device_id, microwave_states, button_state, cloud_alert, gp
})
def lora_new_alert(alert: Alert):
try:
from shared.lora_device import LoraCommands
except ImportError:
pass # No need
return {
"action": LoraCommands.NEW_ALERT,
"alert_type": alert.alertType