homeassistant-powercalc
homeassistant-powercalc copied to clipboard
Spikes in Energy causes extreme measurements
Hi! My Heatit floor sensors have a weird dropout from time to time which results in a peak really messing up my energy meters. Is there any way I can fix this? Maybe by not using the energy meter from the device but letting powercalc creating one from the power usage?
See the image below.
Hi, what do you mean with dropout? They report 0 values or unavailable or something like that?
I am uncertain. But - this is something I experienced before I started using Powercalc, but I was hoping the wonderful Powercalc would deal with it :)
Here is a screenshot from Grafana:
Does this hppen during startup / restarts of HA or just during runtime?
During runtime!
Ah I read your question again and I see it's not about a group powercalc sensor. There were similar issues with the group sensors and I made a lot of improvements and fixed for that, so I thought this was related.
The issue you have is the energy sensor reporting 0 values causing the utility meter to spike.
Currently did you make the utility_meters with the built-in HA helpers or did you create them using Powercalc?
The Utility meters are generated by Powercalc! But they are based on the energy meter reported by the device.
tor. 22. sep. 2022 kl. 10:04 skrev Bram Gerritsen @.***
:
Ah I read your question again and I see it's not about a group powercalc sensor. There were similar issues with the group sensors and I made a lot of improvements and fixed for that, so I thought this was related.
The issue you have is the energy sensor reporting 0 values causing the utility meter to spike.
Currently did you make the utility_meters with the built-in HA helpers or did you create them using Powercalc?
— Reply to this email directly, view it on GitHub https://github.com/bramstroker/homeassistant-powercalc/issues/1105#issuecomment-1254670809, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR2OHLMV7EUDNMJAQZDHNULV7QHINANCNFSM6AAAAAAQR6IVHU . You are receiving this because you authored the thread.Message ID: @.***>
--
Sune Alexandersen Narud Øvre Måsan 26 1385 Asker Tlf 924 88 111 www.sunenarud.no www.suneworld.com
Powercalc uses same underlying code for the utility_meter. It's exactly the same logic as the HA helpers use. So when your energy meter glitches making the utility meter misbehave your best option would be to integrate the power sensor in a new energy meter as you already indicated as a possible solution.
How did you currently setup the powercalc configuration?
Thank you very much Bram!
This is my current setup:
- platform: powercalc entity_id: climate.varmekabler_bad_1etg power_sensor_id: sensor.varmekabler_bad_1etg_power
and this results in the following device info:
Powercalc automatically finds the energy meter of the device. How do I force it to use the power_sensor? (I actually thought that was what I had done with the above code:))
Yes this is by design, when the same device of the power sensor already has an energy sensor powercalc will use that one.
You could do the following.
- Create a new energy sensor for your power sensor
sensor.varmekabler_bad_1etg_power
using the Riemann sum helper (Devices & Services -> Helpers).
2a) Use energy_sensor_id
option to also refer to energy sensor.
- platform: powercalc
entity_id: climate.varmekabler_bad_1etg
power_sensor_id: sensor.varmekabler_bad_1etg_power
energy_sensor_id: sensor.varmekabler_bad_1etg_energy2 # This is the new energy sensor you created
Now powercalc should create the utility meters
2b) Just create the utility meters using the HA helpers (Devices & Services -> Helpers)
So you need to do one of 2a or 2b.
Thanks again!! If i choose to disable the sensor.varmekabler_bad_1etg_energy entiy (the energy meter from the device) will powercalc actually create the energy and utility meters based on the _power entity alone?
Yes that should also work.
Thank you so much and thank you for this amazing piece of code. It is the best integration I've found so far!!
Thank you so much and thank you for this amazing piece of code. It is the best integration I've found so far!!
Thanks a lot for your compliments. Good to hear people enjoy using it.