infra: register Dual Outlet - Couch, fix Node-RED double-toggle, add meshtastic mqtt

This commit is contained in:
2026-08-11 00:42:15 -07:00
parent 110279ae17
commit 1f77cf3762
5 changed files with 30 additions and 0 deletions
+8
View File
@@ -63,6 +63,10 @@ flows:
type: function
name: Single click
code: |
const now = Date.now();
const last = context.get('lastTime') || 0;
if (now - last < 50) return null;
context.set('lastTime', now);
try {
const p = JSON.parse(msg.payload);
if (p.action === 'single') {
@@ -76,6 +80,10 @@ flows:
type: function
name: Hold release
code: |
const now = Date.now();
const last = context.get('lastTime') || 0;
if (now - last < 50) return null;
context.set('lastTime', now);
try {
const p = JSON.parse(msg.payload);
if (p.action === 'release') {