update on replace

This commit is contained in:
ticaki
2024-01-08 22:29:08 +01:00
parent aa3e90ef98
commit fd3ce243a6

View File

@@ -1727,7 +1727,7 @@ on({id: [String(NSPanel_Path) + 'Config.Dateformat.Switch.weekday',
}); });
//Set Relays from Tasmota //Set Relays from Tasmota
const NSPanelStatTopic = NSPanelSendTopic.replace('.tele.','.stat.').replace('.CustomSend','.'); const NSPanelStatTopic = NSPanelSendTopic.replace('.cmnd.','.stat.').replace(/\.CustomSend$/g,'.');
on({id: [String(NSPanelStatTopic) + 'POWER1',String(NSPanelStatTopic) + 'POWER2'], change: "ne"}, (obj) => { on({id: [String(NSPanelStatTopic) + 'POWER1',String(NSPanelStatTopic) + 'POWER2'], change: "ne"}, (obj) => {
if (!obj || !obj.id) return if (!obj || !obj.id) return
const n = obj.id.substring(obj.id.length-1); const n = obj.id.substring(obj.id.length-1);