Monitoring active power from a Shelly Plus 1PM Gen 2 and want a clean, integer-only representation (no decimals).
Connected via MQTT, shelly-scripts/scripts/mqtt-discovery-self.shelly.js at main · michal-bartak/shelly-scripts · GitHub
What I need is recorder logging control, not value manipulation:
Requirements
The displayed and logged value must always be the actual current reading, rounded to an integer.
Normal small fluctuations (±2 W or less) must never generate a recorder log entry.
Only when the power changes abruptly by more than 2 W (up or down) should Home Assistant write one log entry, for example:
Power L1 big change: 142 → 1000 W
Important
Do not want clamping, smoothing, averaging, or replacement of values.
Even large spikes or “wrong” readings must be shown and logged as is.