You could get the desired information from the statistics table in the recorder database with an sql-sensor.