Hi all
New user here. I’ve managed to integrate all my existing devices, and am now venturing into templating, which I think I’m going to need to solve my problem.
I’m have a Shelly Plus 1PM logging energy/power of my connected EV granny-charger (2.4kW). I’m with Octopus in the UK, and have the integration enabled so I have a live feed of what my current price is at any point in time. It just basically goes down to the overnight rate… overnight, and back to the main rate during the day.
I’m thinking I need to grab the incremental increases in the energy usage, multiply by the current rate, and then save to another template sensor representing am ever-increasing spend on our EV charging. This final sensor can feed a utility meter helper, so I can then easily see what I’m spending each day or month or whatever.
It’s the bit where I need to get the incremental increases from the power meter and apply the current rate to those, that I’m stuck on. Is there a built in method for this? eg if the last state was 0.002kWh, and the state is updated to 0.0023kWh, how can I get that 0.0003kWh increase and do something with it? Or am I thinking about this completely the wrong way?
Cheers