Power consumption sensor automation calculation

Hello all!

I would need some help to built a bar graph based on a power energy index MQTT value. I have HACS installed and mini bar graph plugin.

I certainly need an automation to make a calculation (today value - value D-1) and create a new sensor based on this value result but not sure how to accomplish that… Any help/source is welcome.

Thanks in advance for your help

1 Like

I added this in conf yaml. I’ll give a try…

utility_meter:
energy:
source: energy.smarty_energy_delivered
cycle: daily