Send microwave states to lora
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user