Hi all
I properly did something wrong, by the helpfull guide of AI and should’ve known better.
I am hoping someone here can help me. My experience from coding is there, but minimal. I find it very hard to understand what is going on with HA on the many levels there are. i found a topic that might help me (Utility meter / integration sensor manual input) but even there i don’t really understand what is happening.
So, to start of, i’m building a dashboard that basically tracks my Electric vehicle (EV) charging & costs. I want to be able to pay the correct amount of electricity used for my EV in my household. This is going well as i made a split calculating what part of the energy is from Solar, what part is from Grid etc. and i added costs to those & even a comparison to an ICE car fuel consumption what i have saved.
The issue is now the following:
i’m using a shelly device that is tracking the energy used. the above items have been added over many days trying and figuring out how to do yaml. The values i’m saying below are rounded to make it easier to type, the screenshots will show different values. but i now have a shelly sensor saying “active energy” = 200 kwh which basically is the energy used to charge my car
I have made an integration sensor that calculates the solar energy(sensor.ev_solar_energy, 20kwh now).
and i have a integration grid sensor that calculates the used grid energy (sensor.ev_grid_energy, 20kwh).
So there is a discrepancy between the actual energy used (200kwh) and the grid_sensor of 160 kwh. I want to add that 160 kwh to the grid_energy, so they always read the same. However…
AI told me to comment out the integration. Then go to developer tools- states, in the dropdown menu find my ev_grid_energy sensor, and set the item to the value of 180 kwh. I did so. After a while i had to uncomment the block and restart the yaml, only to find my sensor went back all the way to 18kwh.
Furthermore, my utility meters (daily, yearly, monthly) DID get the added kwh.
i wanted to try it again, and the value again resetted, but my utility meters did get the change… And now my whole setup is broken due to wrong sensors.
I would love to not have to reset everything and start from 0… but i feel that might be the best solution. But if anyone have a good idea on how to solve this?
solution would include :
- add 160 kwh to the energy_grid_sensor (without adding a new sensor like “corrected”/“adjusted”).
- remove/override the utility sensors (basically undo my second adding of the energy).
