Send microwave states to lora

This commit is contained in:
2026-08-16 15:50:57 +02:00
parent 1a77794fd3
commit c6e56b58a0
5 changed files with 83 additions and 26 deletions
+1
View File
@@ -7,6 +7,7 @@ import shared.payloads as payloads
import shared.cookingState as cookingState
import shared.safeQueue as safeQueue
import shared.alerts as alerts
import shared.microwave_state as microwave_state
try:
import shared.lora_device as lora_device
except (ImportError, SyntaxError):
+11
View File
@@ -78,4 +78,15 @@ def lora_new_alert(alert: Alert):
return {
"action": LoraCommands.NEW_ALERT,
"alert_type": alert.alertType
}
def lora_microwave_state(state: str):
try:
from shared.lora_device import LoraCommands
except ImportError:
pass # No need
return {
"action": LoraCommands.MICROVAVE_STATE_UPDATE,
"new_microwave_state": state
}