I have multiple appliances, each attached to a smart plug that tracks the power draw. I can set thresholds on the power draw to determine when the machines are running or not.
What I would like to do is trigger an alert telling me to service the machine after, say, 100 hours of total running time. And I would like to be able to reset that counter manually after doing the maintenance.
I’m looking for a solution that is quick and easy to roll out to many different appliances. Something as easy as a blueprint or script.
Here’s what I’ve got currently, but it requires a lot of steps and entities for each appliance being monitored:
Attach a power monitoring smart plug to the appliance
Set a threshold sensor based on the power draw to signal when the appliance is running/not
Create a timer to track one hour of run time
Create a counter to store the total number of hours since last reset
Create four automations:
5a. Automation to start the timer when the threshold is on
5b. Automation to pause the timer when the threshold is off
5c. Automation to increment the counter and reset the timer, each time the timer reaches one hour
5d. Automation to send the ‘Maintenance Required’ notification when the counter reaches 100 hours
Finally, I reset the counter manually when the service is done.
Is there a better and simpler way to do all of this?
I looked into the History Stats but I couldn’t see how to make that manually resettable.
Would it be possible for me to put this all into a blueprint or script so I can quickly deploy it to more appliances?