Create additional Energy-Entities

Hello,

I have the Dimming-State of each of my Lamps in HA.
I would now like to create an Entity in HA that uses the nominal (100% dimming) Brightness of several Lamps and integrates the Power over time.

Generally, integrating Power over time is no problem (Riemann Sum, I think).

But as I want to do this several times, I would like to create some re-usable code.

I stumpled upon Blueprints, Templates, … But I am not sure what to use.

I think, templates not be used for Sensors, right? And Blueprints only work for Automations - do I want an automation here?

Could you please give me a hint in what method to use?

Greetings,
Hendrik

Can do what you want and a lot more.

Brilliant. Thanks!