I am doing this with a long floating point number.
See this post
I am doing this with a long floating point number.
See this post
i Also second that, I have good Energy Management utlising the Tesla Powerwall intergration already in Home assistant, however i’m loving the idea’s behind this new Energy Management solution, will migrate to this if and when it can use the Powerwall intergration, otherwise great job Home Assistant team.
When you say the energy monitor and solar inverter already store the energy consumed/produced persistently - is it a figure in kWh that steadily rises throughout the day or does it just update once a day?
If you try using the daily figure that only updates once a day, then you might only see 1 bar for the whole day instead of 24 bars for 24 hours.
Unfortunately, if you want home assistant to calculate grid import and grid export using only the production and consumption figures from your solar inverter, home assistant will need connection to the inverter sensors to perform these real time calculations that the energy dashboard will ultimately consume hourly and chart hourly.
Depending on which SMA inverter you have, different things are possible.
Start here GitHub - SBFspot/SBFspot: Yet another tool to read power production of SMA® solar/battery inverters</ but know which inverter you have!
The sensors are in kWh:s and updated constantly, ie every 30s or less, so it is possible to get a reasonably good graph over the energy flow with current handling. Unfortunately it does not take into account when you both produce and consume at the same time. I think my setup is quite common to, an Energy Monitor for what the house consumes and a Solar Inverter that outputs what it produces. To have a meter showing both production/consumption is luxury
The reason why I don’t want to use power (house consumption - solar production in watts) and calculate the imported/exported energy using integration ”integration” myself is that sometimes, irregulary, my Energy Monitor loses its WIFI connection…however the EM continues to count kWh so as soon as the connection is there I get the latest value.
BTW, I do not think current energy implementation is very realtime but I guess it is a good start, I do not think that a year from now that we will have to wait for up to 2 hours to get a proper value out of it…or even know if it works or not.
With your Solar inverter, it is possible to be doing 3 things all at the same time:
Solar panels producing power. (measured as production)
House consuming generated solar power from the solar panels. (measured as consumption)
House either consuming grid power or exporting grid power (never both at the same time) (measured as consumption)
The inverter adds both solar consumption and grid consumption together into 1 number.
The grid is only involved in 1 of these 3 above activities.
The reason why we have to use power sensors is because when it comes to the grid, you will never be importing from grid and exporting to the grid at the same time.
This fundamental difference is what lets us calculate grid import and grid export based on inverter power figures.
When you take inverter production in Watts and subtract the inverter consumption in Watts, this will give you either a negative, 0 or positive value. I can manipulate that figure so that home assistant only records positive figures, sort of like a counter. This is how I calculate grid export.
When you take an inverter power consumption in W and subtract inverter power production in W, this will give you either a negative, 0 or positive value. I can manipulate that figure so that home assistant only records positive figures, sort of like a counter. This is how I calculate grid import.
When you do the same with accumulated energy in Wh it does not work the same way due to the negative, 0, positive logic no longer having a meaningful effect.
The only solution I can see is perhaps the Home Assistant Devs improving future versions of the energy dashboard so that it can ingest solar inverter production and consumption figures and do the calculation for us. That will remove the need for sensors. At the moment that is not an option.
You must use the energy_total attribute from the Fronius meter not the power_flow one, as the power_flow one does not have the correct attributes for the energy dashboard in the 2021.8 release.
Check in developer tools to see that all the sensor entities you have picked have a last_reset attribute and a device_class and a unit_of_measurement. Those are all required to be present and correct before the sensors appear in the energy configuration.
What are you using to measure your fridge? Plug(Tasmota?)
so it only works with the supported devices? I have different sensors for production and use. How do I get them in to the graphs?
There is being worked on see Growatt - Add support for Energy Integration · Issue #53963 · home-assistant/core · GitHub
very nice dashboard !
here is my setup
yes tasmota
console
- platform: mqtt
name: "Fridge Energy Today"
state_topic: "tele/SONOFF-POW4/SENSOR"
value_template: "{{value_json['ENERGY'].Today }}"
qos: 1
device_class: energy
state_class: measurement
unit_of_measurement: "kWh"
then customize.yaml
sensor.fridge_energy_today:
last_reset: "2021-07-30T00:00:00+00:00"
and the states says
what am doing wrong ???
Thank you for your well explained answer and I guess it is as I thought but not hoped…there is no way in current implementation I can avoid creating the sensors using the current powers from the Energy Monitor and the Solar Inverter.
Just to clarify, my inverter only outputs produced solar energy (or current power).
No, this is the issue, and its gonna be in the new core version because the devs fixed it.
it was missing a database that contains [PRESSURE_BAR]
The Energy monitor is a great idea for the probably 3% who use/need it. Why force it into the sidebar on an upgrade for the other 97% who don’t need or want it because they have no way to monitor their energy usage to begin with. Bloatware creep since there is no way to actually remove it, only hide it in the side bar.
Comment based on the fact I could only find where it was posted in this thread how to hide in the sidebar. If there is an actual way to remove it, I have not found it yet.
The way to remove it is to NOT use default_config:
in your configuration.yaml file and instead simply load the components from the default config list that you actually want.
Click on you name, profile, and then
Change the order and hide items from the sidebar
You can also press and hold the header of the sidebar to activate edit mode
What ropeguru was getting at is that removing the item from the sidebar doesn’t prevent HA from loading that component at boot. Only my solution does that.