add module (#141)

This commit is contained in:
Ben Lipsey
2023-10-30 08:23:42 +10:00
committed by GitHub
parent 7256454ea7
commit a8c45ccb32
4 changed files with 79 additions and 3 deletions
+6 -3
View File
@@ -185,9 +185,6 @@ export const useDeviceStore = create<DeviceState>((set, get) => ({
if (device) {
switch (config.payloadVariant.case) {
case "detectionSensor":
device.moduleConfig.detectionSensor = config.payloadVariant.value;
break;
case "mqtt":
device.moduleConfig.mqtt = config.payloadVariant.value;
break;
@@ -216,6 +213,12 @@ export const useDeviceStore = create<DeviceState>((set, get) => ({
break;
case "audio":
device.moduleConfig.audio = config.payloadVariant.value;
break;
case "detectionSensor":
device.moduleConfig.detectionSensor = config.payloadVariant.value;
break;
case "neighborInfo":
device.moduleConfig.neighborInfo = config.payloadVariant.value;
}
}
}),