Thanks so much, @Danabw and @ipaterson. I feel like I’m close to getting this right, but not quite there yet. I actually do need the counting – the monitor occasionally reads phantom power on the circuit and it’s just enough to set the alert off. I’ve done what I can to monitor the fuel stream to set the On and Off wattage correctly, but the phantom spike set the alert off at random times. Getting the counting variable right would solve my problem.
Here’s what I have so far – but I feel like I have some of the order wrong because it seems to ignore the need to start the counting over if the button is held (because it’s ostensibly done) before it’s had at least 3 high readings. Seems to be alerting me before it’s had 4 low readings.
Been really fun to figure out the logic how to get this to work correctly, but I’m clearly missing the right commands to get it to do what it needs to. Happy to send the logs if that helps.