The energy dashboard utilizes CO2 to calculate the kWh of low carbon energy. But a new entity is not made.
How can I put this value from the energy dashboard, into a sensor entity, to utilize within another card, without recreating the calculation underneath the energy dashboard?
With that you get the percentage of your electricity is coming from fossil, then you can calculate with your power sensor and get the amount in kWh from fossil-free.
I understand that.
I have C02 Integration, and it is added on my energy dashboard. But the energy dashboard calculates kWh over time from the consumption at that time from the percentage value of the c02 signal percentage sensor.
I want to use that already calculated kWh number elsewhere. But the energy dashboard does not make an entity from the calculated kWh, so I cannot use it elsewhere ie in another card, or automation or template etc.
Home assistant is already calculating it. I want to know how to have it as an entity, so it’s in the recorder or statistics, or can be displayed in a different dashboard, not part of the power distribution card.
There is no entity corresponding to the kWH calculation for low carbon from the energy dashboard.
The documentation for the energy dashboard only states to add CO2 signal integration sensor to the energy dashboard which only creates a percentage for that moment in time in the grid of how energy is produced. As well as an intensity sensor.
The calculation for kWh is from the time you are taking from the grid and the percentage of carbon sources at that moment in time on the grid.
For example.
Today I’ve consumed 6.8kWh from the grid. But the energy dashboard says 4.8kWh was low carbon. 88.25% low carbon energy consumed. Current CO2 signal, and pretty much all day has been 32-38%
Let’s see 6.8 * .8825 = 6.001 kWh that’s not right
6.8 * the max CO2 signal has been 38% = 2.584 kWh that’s not right either, even if it’s inverted. 6.8-2.584 = 4.2kwh
Why is the calculated 4.8kwh consumed not documented on how to use the value elsewhere? Why is it not turned into an entity itself by the energy dashboard? You can’t add it as a meter because you need a corresponding entity to add as a meter.
I’ve literally used like 20 different search terms to try to figure out how home assistant is calculating low carbon on the energy dashboard. There are very few threads even on here that talk about the low carbon calculation. The HA documentation says nothing about how low carbon usage is calculated other than add CO2 signal, and even then HA is calculating it, but it’s ONLY available on the energy dashboard. There’s no entity in recorder, or statistics for this kWh value.
Not sure how else to explain it. But if there’s somewhere to pull the number from, it’s not documented. And HA is obviously calculating it already.
I feel like you’re writing a dissertation as a response when you just need to stop focusing on the energy tab, and go look up the utility meter documentation.
Utility meter is not the energy tab. You cannot get that value. You have to use the utility meter integration to create the entity that will give you that value.
How is the utility meter going to make one when you need a entity that reports kWh to even make the utility meter. And on top of that how is CO2 % supposed to be added in?
You need an entity to put in the utility meter…and you can’t put more than one…
And HA is already calculating it on the energy dashboard…why can’t we use something already being calculated, even documentation to make a SQL sensor to read the kWh from the database for what’s already on the energy dashboard???
But the HA documentation doesn’t say what the math behind low carbon kwh is. The utility meter documentation does not have a section to show how to calculate low Carbon.
I’m not writing a dissertation. It’s just why can I not utilize something HA is already calculating. Why is there no documentation on how to pull that value into a sensor.
As well show me a thread on community, where someone has done this. I’ve searched.
The percentage is not available as an entity so you can’t calculate it.
The only percentage available as an entity is CO2 signal which is currently 38%
So we’re back to the energy dashboard having calculated something that doesn’t exist in an entity, and there’s no documentation on how to pull either the kWh or the current percentage calculated from the energy dashboard into an entity.
It’s either in the database, or in the front end going off the date range of the energy-time-selection card. And no way to pull the % from the energy dashboard or the kWh.
I’d make a template sensor, but there’s no documentation on how to get the percentage or kWh from your usage, and they aren’t entities.
It’s a live calculation by the frontend. I don’t know how else to tell you. I’ll make it very clear:
You cannot get that value into an entity it is not stored in the database. The calculation comes from the data in the database. The value is not stored.
Without reading the source, I’m not going to be able to re-create it. It most likely requires statistic entities using the stats integration in combination with utility meter giving you the current daily values (of your house consumption & solar generation) in an entity.
So, how do you use the utility_meter to calculate low carbon kWh for the day, if you can’t get the percentage of your usage in a value from a database it’s not stored in to put in a template to provide a total_increasing device to utility meter.
This is what I’m getting at, the calculation and how it is formed is not documented, I’d make statistics sensors and such, but it seems silly to have to go through all that when the values are already right there on the front end…
Well, regardless where you start, you will need to get all the kWh information into entities, using utility meter. So that’s step 1. Step 2 is getting those percentages. I have no idea what your source sensors are, so it’s hard for me to give you any information. All you’ve provided is screenshots of the energy tab.
- sensor:
name: Grid Import Power
state_class: measurement
icon: mdi:transmission-tower
unit_of_measurement: W
device_class: power
state: >
{{ [0, states('sensor.envoy_SERIALNUMBER_current_power_consumption') | int - states('sensor.envoy_SERIALNUMBER_current_power_production') | int ] | max }}
- sensor:
name: Grid Export Power
state_class: measurement
icon: mdi:transmission-tower
unit_of_measurement: W
device_class: power
state: >
{{ [0, states('sensor.envoy_SERIALNUMBER_current_power_production') | int - states('sensor.envoy_SERIALNUMBER_current_power_consumption') | int ] | max }}
This is what the energy dashboard is feeding from. I use monthly utility meters, but can make daily ones. But I still don’t understand how you would get the % from this… Unless you know the formula for calculating % like you do kWh for low carbon.