Water Pump Failure Mode

Hello.

I want to create a panel in my Home Assistance to check the health of components in my house. If there is a component behaves out of the normal parameters, I want to have a red alert in the UI.

Practical example:
I want to control the status of my fresh water pump and pressure system. For this, I want to use an ampere meter (Shelle EM 3) to measure the time, the pump runs to bring my pressure system from the low pressure to the high pressure mark. This time should be ± 10 % all the time. If this takes longer, either the pump runs dry or my pressure tank is broken. In order to not damage the equipment, I want to be informed, when this happens.

So here are my questions:

  • How can I measure the time that the pump is on? Is it correct to assume, I need an automation for when the pump turns on to start a timer and one when the automation is off to stop the timer?
  • Do I than put the failure mode in a text sensor that I display in the UI?

Seems like a lot of configuration for my usecase. When I want to monitor about 10 of these “health” KPIs in my house, that is a lot. Is there an easy way for this? Has anyone done something like this?

Regards
Oliver

P.s. This use case is a real business case for using HA since it would extend the lifetime of my pump …

I am looking for a similar solution, so joining this thread to listen for answers, however I also have several other failure modes for three different pumps I have in my water system. If you found a solution to your problem or similar, I am curious.

Tanks are leaking (two of three pumps run too often or for too long, third pump works as normal when sprinklers commanded on)
Tank dry (Pressure pump cycles on and off at regular interval coinciding with the motor safety time delay relay)
Sprinkler valves stuck open ( all three pumps run too often and too long)
Pump impeller is damaged or broken (may show up as different current draw for a particular pump, or it might not be easy to pick up without a flow meter?)
Pump is dirty (probably a different case of time measurement for the ON state for ONE pump in particular combined with normal operation for the other two pumps).