Not sure where exactly to put this topic, so please correct me if i posted in the wrong area.
For the last few years I had a homemade solution to shut off my natural gas power vent water heater at night. This wasn't done to save a few pennies, but rather to avoid having to hear the water heater kick on occasionally in the middle of the night.
The way my setup worked was that a timer activated an appliance relay that opened a Normally Closed (NC) contact that turned off the water heater 120VAC supply. Easy enough, but I also put in a current sensor wired to another relay that would keep the water heater running if it turned on during the shut off time. Example, doing a load of laundry at 8:55PM and the water heater was set to shut off at 9:02PM, if the water heater was already running it continued running until it was done with its cycle.
I have managed to recreate this feature using a Sengled Smart Plug E1C-NB7 and the built in power monitoring features. It took me a LONG time to figure out the rules, the biggest hurdle to get over in Rule Machine was the difference between "Wait for Event" vs. "Wait for Expression".
I will attach a screen shot to show what I did, hopefully it is helpful to others.
Picture of the old setup vs. the smart plug: