I have two use cases where i’d like to be able to program a “look back” of how much energy an outlet is using in KWH over a short period of time and alert or trigger it to go off based on breaking those rules. I can’t accomplish this using the out of the box energy saver / watt reading since power will spike up and down over the time. I’ve searched and haven’t found anything yet. I’m willing to learn core and write it but don’t want to reinvent the wheel.
Two example uses:
I have small, 600w, sealed oil space heaters that use about 0.1 KWH in 60 mins when the built in thermostat is properly set. However, if a kid messes with the thermostat, then it can run at 600w constantly, using ~0.6 KWHs in 60 minutes. So, i’d like to have an automation where when the heater outlet is on, every 60 minutes check if KWH reported by outlet has increased by more than 0.2 in last 60 minutes, and if so, disable outlet or send alert (or both).
We have a downstairs freezer and refrigerator. In lieu of a temp sensor or pressure switch to detect a door open or malfunction, the amount of power those devices use is very consistent (doors are infrequently opened). So, say these average again 0.1 KWH in 60 minutes with the compressor coming on an off, i’d have a check for if outlet is on, alert if KWH use in last 60 minutes exceeds 0.15 KWH.