I would like to register and show on the UI how long a certain boolean sensor is on or off. I looked around in the forum and in the documenation but I could’nt find a concrete solution.
Finally I came up with the idea to use a timer device which is started the device goes on and read out when the device goes off done by two rules. But I think this could only be aworkaround.
Some time math calculation with expression I couldn’t find either.
Solutions based on database retrival and scripts are too complex for me.
If there is no yet existing simple solution I might have overseen maybe this worth a new feature request. (Ideally I could get not only the duration a device was on but also statistics like max, min, mean on-time totally, per day, per week, per month, or per year. )