feat: Implement Tapo P110/P115 power and energy monitoring, add Tapo device testing utilities, and include a database upsert test.

This commit is contained in:
sebseb7
2026-01-22 01:17:46 -05:00
parent 22050d1350
commit d093e18877
5 changed files with 279 additions and 12 deletions

View File

@@ -670,13 +670,20 @@ const dashboardHTML = `<!DOCTYPE html>
isOnline ? 'online' : 'offline'
);
} else {
// Show toast for other events
showToast(
device.mac,
\`\${component}.\${field}\`,
\`\${event}\`,
'event'
);
// Suppress high-frequency power and RSSI events from notifications
if ((component.startsWith('power') && (field === 'apower' || field === 'aenergy')) ||
(component === 'wifi' && field === 'rssi') ||
(component === 'rf' && field === 'rssi')) {
// Do not show toast
} else {
// Show toast for other events
showToast(
device.mac,
\`\${component}.\${field}\`,
\`\${event}\`,
'event'
);
}
}
// Re-render the specific device card