-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Total Daily Energy - Feature Request #36
Comments
If you are a sophisticated user, you can add it through HA. I use the packages feature, so in my configuration.yaml I have:
In my packages, I have a file called aquarium.yaml, and I put a sumation sensor in there. I think HA has added a helper you can use to do this since I did it, so maybe there's an easier way. Anyway, here's what mine looks like:
On the dashboard, under Settings->Devices&Services->Helpers, I clicked "+ Create Helper", and chose "Integration - Riemann sum integral sensor": I named mine sensor.aquarium_kwh (friendly name: Aquarium kWh). Choose the "Left Riemann sum" option. The trapezoid rule will give an average number between readings which will be wrong if your reporting period is large. I also check the "K" prefix option, but that's up to you. Then you can add that sensor directly to the energy dashboard as an individual device. From the dashboard home, Settings->Dashboards->Energy, then add an Individual Device: Once the Energy dashboard starts collecting, it will show under the Monitor Individual Devices section of the Energy tab: I also created another helper from it, called the Aquarium Utility Meter, which will give you exactly that daily report with a pretty graph I think you want... |
Indeed, there is now a HA Helper for summing the states of individual sensors, so you can do this without coding at all: |
Thanks, I'll take a look at doing this. |
That works nicely. However, there is one issue, and I am not sure what component is responsible. If the wattage does not change for a plug on the apex, i.e. something is always on, the helper entity remains in an unknown state. If all of the outputs are aggregated together this is probably not an issue, but adding them individually it is. Again, I am not sure if this is in your component or the helper component. |
If you're using the Helper to sum the wattages, I can't help because I haven't done that, but it's not surprising that there's an error like that in an edge case. I think the problem you are running into is a HA situation where they just don't record an input if a new value is the same as the last one. They don't seem to comprehend that an updated steady state is useful information. Can you toggle the switch outlet to force it to pick up data? |
I suspect you are correct this is a HA issue. That is exactly what I had to do, toggle the outputs off/on then they showed up. Thanks for all the work you have put in to this. |
I am wondering if it would be possible to add total daily energy sensor to the power sensors. I have not looked at the source code yet either plugins yet, but the ESPHome plugin has the ability to do this via the total_daily_energy platform. I only mention ESPHome as it is an example of how it can be done. I would like this so that I can track the energy usage of each outlet in HA.
The text was updated successfully, but these errors were encountered: