Ok Its hard so search for what I want so thats why I ask here.
I have a IAmMeter the values cant be resetted.
So what I want to accomplish is this:
I want to have another value that is the result of the difference between a start value and now.
Lets say i will rent out my house weekly and they should pay for the electricity.
When a new guest is coming I want to reset the my counter and save the date and time for this in one parameter and then display how much kWh the guest have used on the Kiosk tablet.
What I have thought is that I need three variables and a reset button.
When the reset button is pressed I would like to save the Date and time into Variable “UsageSince”, save the value of IAmMeters sensor.iammeter_importenergy to variable “StartkWh” and set the variable “UsagekWh” to 0.
Then when the sensor.iammeter_importenergy changes (or every 5 minutes) I would like to calculate UsagekWh form sensor.iammeter_importenergy-StartkWh.
How can I do this?