A simpler solution might be to use a smart plug to monitor the current being drawn by the appliance and then just notify and turn off when it is done. I do variations of this kind of thing (using sonoff S31's flashed with tasmota) and it works quite well.