Fix bool for supabase.
This commit is contained in:
parent
7b2b01a312
commit
7d8e207ffa
@ -37,7 +37,7 @@ async function main(evt: string, src: string, dest: string, value: Buffer) {
|
|||||||
address_id: dpt.addressId,
|
address_id: dpt.addressId,
|
||||||
dpt: dpt.id,
|
dpt: dpt.id,
|
||||||
timestamp: new Date().getTime(),
|
timestamp: new Date().getTime(),
|
||||||
value: dpt.dpt.decoder(value)
|
value: dpt.id.startsWith('DPT1.') ? (dpt.dpt.decoder(value) === 1) ? true : false : dpt.dpt.decoder(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
upsert(document)
|
upsert(document)
|
||||||
|
Loading…
Reference in New Issue
Block a user