Just found another kind of use for this kind of method: device consumption.
It can be applied to devices controlled by switches that are not reporting consumption. For instance, you have a light that you know consumes 20W when it is on, you could add a counter for it, and add Wh for as long as the light is on.
Maybe it’s coming in a next version of HA, but if not, it could be done based on this. One would have to take into account the on/off state of the device, and update the counter once every minute for instance and at turn-off time ( a formula like (currenttime-max(starttime,startofminute)*power)).