fix: Use correct Sensor field names in seed.ts (deviceId, isActive)

This commit is contained in:
fullsizemalt 2026-01-12 10:38:39 -08:00
parent 210cd16bbe
commit 3fc1f6cc4e

View file

@ -384,16 +384,16 @@ async function main() {
// Map Pulse sensor device 11666 to Flower Room // Map Pulse sensor device 11666 to Flower Room
if (flowerRoom) { if (flowerRoom) {
const existingSensor = await prisma.sensor.findFirst({ const existingSensor = await prisma.sensor.findFirst({
where: { externalId: '11666', type: 'VPD' } where: { deviceId: '11666', type: 'VPD' }
}); });
if (!existingSensor) { if (!existingSensor) {
await prisma.sensor.create({ await prisma.sensor.create({
data: { data: {
name: 'Veridian Demo Pulse', name: 'Veridian Demo Pulse',
type: 'VPD', type: 'VPD',
externalId: '11666', deviceId: '11666',
location: 'Flower Room', location: 'Flower Room',
status: 'ACTIVE', isActive: true,
roomId: flowerRoom.id roomId: flowerRoom.id
} as any } as any
}); });