
My energy supplier turns off the power if I exceed 3990 Watt for more than 2 minutes.
I created a Telegram notification to be alerted if this happens and works perfectly.
The energy meter reads the value every 5 seconds, the problem is as follows:
Values:
3512
3670
4001 (telegram notification)
3847
3798
As soon as I exceed the set value (3990) I am warned even if the subsequent values indicate that it was only a peak.
Is there a way, via script (lua, blokly ...), to receive the notification only if 2 or more consecutive values are greater than 3990 watts?
Thank you.