You could use this
And then set up a notification when the switch is turned off
Ie if its below 5w for 5min turn off