Constant power energy helper

Hi,

I started breaking down my energy consumption and I have some big consumers, like heaters, that run on constant power when they are switched on. I created two helpers for each:

  1. Power template sensor like ‘{{ 300 if is_state(‘switch.x’, ‘on’) else 0 }}‘
  2. Energy integral sensor based on the above.

I think it would be useful for many if there were a simple helper where you could input a switch, binary sensor or thermostat (climate), and a known power consumption that you often can read on the label of the device itself. Or measure with an upstream sensor, by toggle it on and off and calculate the delta.

Or even better, power could be an optional attribute on all switches and thermostats. But I understand that would be a too big request.

The simpler it is to optimize energy, the more we can help to save the climate!

Thanks

You mean this?