#energy-archived
1 messages ยท Page 51 of 1
but it's equally around the 90 price range
was more thinking in terms of it being DIN rail mountable
yea the other thing is are you able to run 2 shelly em at once
or one of these shelly 1pm's https://shellystore.co.uk/product/shelly-plus-1pm/
why wouldn't you be able to?
well the plan is to have it act as a "smart meter" type of thing with a tablet displaying the power drawn by house current being put in by solar and a few others
but dont want smart meter as there is no physical proof if it goes wrong
Do you at least have already a way to integrate solar?
Sorry you mean through HA right?
yes
to the solar or the HA part? haha
havent got HA up and running yet
currently using a mix of the solar inverters data logger app and the immersion heater iboost to se if generating more that being used
Have all of the HA stuff ready o run on a PI just want to set this up at the same time as waiting on some other parts maybe a dell mini pc not sure yet so holding off
HA
yea found a refurbed one for 50ยฃ
for your solar it could be your inverter has an integration already
just make sure the CPU isn't too old
For the Energy Dashboard you'll need to be able to provide 3 entities
one for total solar production
one for any kWh consumed from tthe grid
and one for any kWh returned back to the grid
that is all possible as can get solar kwh and incoming and i believe the total returned is calculated from those 2
its a 120gb ssd
but can you get those into HA that's the question
or you saying you know you can
Ah Shelly you can yes
I thought you were saying you can already without Shelly
sorry my bad
been a long day lol
no sorry poor explination
If you are in no hurry and you do go with Shelly might be worth waiting for Black Friday
yes definatly
I don't know if they will do equally good ones this year
I got the EM last yeear 45% off
nice
i have seen the shelly 3em be able to work with single phase and the other 2 clamps on solar and a seperat circuit
hopefully end up with something like this
Yes that should be possible
It can also measure both eausy
So if you put one CT in the right place you can measure at the same time grid consumption and return to grid
2nd for solar productions
And 3rd to do whatever you want with
Also has a small relay if you want to drive another bigger relay
E.g. water heater
probably wont use that as all ready have a water heater bit installed
the only worry i had was eather shelly or HA adding the phases on the monitor together
Hi Guys. Is there anybody that have had problems not getting any information from slimmelezer (except signal strength and uptime) and have any idea of the best way to debug?
Everything is just reported as NaN
TED 6000 help needed
I have lots of devices with power consumption in HA. Is there an easy way to sum up the current power consumption to see, what is currently consumed? Ideally something that automatically adds new devices that are added as well.
Automatically no
But you can make a template sensor that adds them up which would then also be easy to add a new one to it
i have added a consumption that is a very long string. this means that the buttons to edit and remove it is "hidden"
how do i delete this?
it's hidden "under" the solar panels section
I had this recently ๐
Ctrl + -
To minimise the dashboard it should show at some lower percentage
hehe
I installed Powercalc to estimate the power consumption in my house. I have 2 questions
- How can I groups some sources into one source (I'd like one source per room)?
- The integration did not make sources from ledstrips and spots, how can I fix that?
Hmm, that looks pretty uncomfortable for a bigger amount of sensors.
So, I guess I rather book that under "I hope this feature is added somewhen in the future".
If you have a feature request for the frontend you can open one here, for Home Assistant itself please post on the forum. All other feature requests should be made to the developer of that custom card/component.
How many sensors are we talking about? Because also HA would need to know which one to add specifically which would be hard
2 digits. I was hoping for some functionality that simply adds the known consumption up.
Maybe one way would be to automatically create a group of entities with a defined pattern and then sum up the values of that group.
I made my own ESP32 based energy meter, which publishes the power in Watts for each line to an MQTT topic
is this enough data for HA, or does it need the kWh values?
2 digits I was hoping for some
No it's an Energy Dashboard. You need kWh
I don't know device you're using or what firmware. I know ESPHOME has such option build in
Otherwise within HA the Reimann Sum Integral
Self written firmware, so I can easily add it
Seems that I could use the Riemann integral in HA as well. I'd rather let HA handle the calculation so I don't have to play with the reset times etc
Lifetime is also fine
Where is the kWh interface documented? Having trouble finding it from "Energy Management in Home Assistant" https://www.home-assistant.io/blog/2021/08/04/home-energy-management/
Heya, is there a way of finding out where all the historic energy data from a home assistant instance has gone?
dependin how you use recorder, in ha database
or
in external database configured by you
my best guess is in the sql default home assistant databse
@hybrid parcelread here https://www.home-assistant.io/docs/backend/database/
it does not appear if you do not have it setup
Thanks. I was referring to the required mqtt topics and the sensor configuration interface.
@mild forge Does the density of those ring sensor things see any cross talk between sensors?
cos that's a high density of those thing hahahha
Nope, I don't see any crosstalk.
you mean if you kill one of the breakers, then pull a high current on the neighbour circuit, you still see zero on the dead breaker?
Yes, I tested it
dang - that's kinda interesting.
I pulled 3.5kW on one without any effect on the other ones
is that 240v or 110?
240
Nice. I first looked at it and went "oh jesus, no grounds, and sense loops right next to each other".... but I'm surprised....
Have you experienced crosstalk happening with CTs close to each other?
I can't say I've ever tried - but I just kinda expected to see eddy currents induced and readable...
especially at higher voltages...
hence my surprise
would be interested to see the design and code if you get some time to bundle it all up
There might be 1W-2W difference to other circuits, but that could be measurement error
Do you just read a voltage from the sensor? I can't say I've ever done code to do that - only prebuilt stuff in the past.... ie normal test equipment
but, I gotta head out now...... if you do end up publishing it all, feel free to DM me a link...
CT produces current and there's a burden resistor on board, ESP32 measures the voltage over the resistor.
12VAC is connected through an optocoupler to the ESP32, providing digital signal of the phase of the voltage. Firmware uses the phase signal to reconstruct a virtual sine representing the voltage
The pinned messages in this channel have that info
the link to the dev docs has the detailed information but I also tried to summarise that into the message below the link
Hey all ๐ is it possible to get notified when a device stops using power ? im looking for a way to get notified when a dumb dishwasher is done ๐ and maybe even the time remaining ?... it's connected through smart socket from Aqara, and best if it could be done from UI ๐
@smoky ridge posted a code wall, it is moved here --> https://hastebin.com/irajoyenuz
Oops, sorry.
Hello. I have these two devices in configuration.yaml and I can use the "gaszaehler_m3" sensor for tracking gas usage, but I can't use the "power_Wh" sensor for total energy consumed. What am I doing wrong here? (see https://www.toptal.com/developers/hastebin/irajoyenuz for the actual configuration)
I've now worked around this by adding a mqtt sensor like this https://www.toptal.com/developers/hastebin/xodegamire.rb and an automation that increases this sensor every time I get an impulse from the tasmota device monitoring the blinking led on my power meter
not nice, but I couldn't figure out how else to do that
so yeah, I'm triggering on an MQTT message received and then publishing an MQTT message that is getting picked up again and sets the counter
Here's the complete config I made now: https://www.toptal.com/developers/hastebin/tofinakiri.yaml
Hi Guys, are there washers that you can start from home assistant?
( i want to start my washer/dryer/etc when my solar panels produce more energy then i consume)
I saw that samsung has washers with smartthings integration, but not sure if it is possible from HA? (without hub)
I was thinking about that myslef, but my washing machine etc. are all nicely dumb. I resorted to "starting" the program, then shut off the electrical socket its attached to, and re-enable it when I want the machine to run
it ain't perfect, but it gets the job done
Any reason why the bars would stop updating? If I click on the bars it shows the correct increased values
Now it updated, I guess it just takes a while
Iโm using Siemens IQ 800 series Dryer and Washer, the app Home Connect is somewhat usable, but the Home Assistant integration is totally unusable and buggy. + The remote start to all Siemens and Bosch Waschung machines has to be enabled manually each time, and only after enabling it You can start the Washing Machine / Dryer remotely ๐
Has anyone found a way to track energy usage costs based on Time of Use?
utility_meter:
daily_energy:
source: sensor.grid_import_energy
name: Daily Import Meter
cycle: daily
tariffs:
- offpeak
- shoulder
- peak
then a template sensor doing some if, elif, else logic to workout a tariff and an automation to change the utility_meter tariff.
The prices are set using input helpers.
Is there a recommended CT clamp system that works best with HA for USA?
To monitor overall energy + individual circuits?
I've got a Shelly EM. Is there any reason I can't put a 50amp CT clamp on my main live feed? There's a 60 amp fuse on the house so I obviously don't exceed that. What would happen if it went to 55amps for a while? Would the CT malfunction?
Hello together
I installed ha solcast integration (https://github.com/oziee/ha-solcast-solar) and added it to my energy dashboard, but it is showing very wrong forecasts
in home assistant the values are waaaay to high
any ideas where there could be an error?
Hi Guys, I know this will have been asked a million times but is there a way to "easily" swap a sensor to remove the - from the beginning as its throwing out my battery readings (I have successfully setup the Integration - Riemann sum integral but the reading feeding it is in negative W's).
As a guess, you could use a template sensor to multiply by -1 to invert the power figures, then use that as the input to riemann sum. Make sure to set device class so that Riemann sum gets the units right for the energy dashboard.
hmm Interesting concept but doesn't the template result in a value rather than another sensor that would be fed into the riemann sum? also I need a way for the post riemann sum to reset to 0 each day but I guess I could use an automation to set the state back to 0 at 00:01
why is this happening?
Which bit?
the high bars vs precipation
looks like the value from your solar feed is reporting high kWh
It is reporting in Wh but its a big installation
It looks like your solar forecast isnt configured well
how did you configure it? Config/integrations-> Forecast.Solar?
that is correct. fixed it, thank you
It doesn't have to reset to 0 every day. Can also just be a lifetime sensor
unless you want it resetting for your own needs
Yeah is more as I use it as an entity but if the automation doesn't work i'll just pull the info from the energy UI. Any ideas on the (-) result? for the info? annoyingly I can't just swap the CT clamp round as its correct in the API supplier.
Yeah you'd have to make a template sensor as I see people suggested already
then that template into Reimann
and for the 0 part you can keep reimann as lifetime sensor and then use a utility meter integration to create sensors that 0
handy if you also have more than one tariff
Hey everyone.
I'm trying to add my PV to Home Assistant but in the dashboard the entity that shows production isn't in the dropdown list.
When I open the entities logs I can see values coming in though
How does HA choose what entities you can choose from in that dropdown menu?
Ok think I got it might need to wait a few hours
Anyone know why my PV goes to the grid (and back) and not to my house in the animation?)
yeah I have no idea how that template would be written since the output wouldn't show as a sensor I don't think
this is an example of one. You'd just need to change the name and have the correct template so the state
template sensors are normal entities
what do you mean wouldn't show as a sensor ?
what units and attributes does your entity have?
based on the big table under dev_tools --> state
or did you get it working?
your PV entity is one showing the total solar production right?
and you added as return to grid?
My solar forecast went crazy today, I'm using the built in integration https://www.home-assistant.io/integrations/forecast_solar. I didn't make any changes, will see what happens tomorrow.
I'll have to have another look tomorrow but I mean the result of the template, can that be imported into the energy screen or the Reimann to then be accepted by the energy screen
of course. You'd be creating a new entity/sensor. Then you can use that new one into Reimann and than that into Energy
Yes, so long as you use the device class of power, then the Reimann sum of the entity will give you energy, that can be used in the Energy dashboard (keep in mind energy dashboard requires kWh, not Wh).
Here is an example of a template sensor I am using for power. You'll just need to come up with your own template in the state: part that inverts the data as you require.
template:
- sensor:
name: Grid Export Power
state_class: measurement
icon: mdi:transmission-tower
unit_of_measurement: W
device_class: power
state: >
{{ [0, states('sensor.mqtt_production') | int - states('sensor.mqtt_consumption') | int ] | max }}
So, forecast.solar seems to be overly optimistic for me.
I suspect it has bad weather data. Perhaps using a city wide forecast rather than a spot forecast? (My city covers enough area and with volatile enough weather that a citywide forecast is pretty worthless for these things, and is even pretty questionable for just temperature.)
The peak being centered at solar noon also seems rather questionable for east facing rooftop mounted panels, but I've entered Declination and Azimuth correctly, so Its unclear why that would be.
mine is rather optistic too... the highest i've ever seen from my system is a total of 73kWh and that was during a cooler month... it thinks i'm going to hit 90+ most days
To jump into the 'i haven't read the history so i'm going to ask the same question everyone else asks'...
I have a few different sensors available to me, but none of them seem to be useful to HA's energy dashboard.
I have a production meter on the power coming from my inverters, then i have a grid meter which measures power from/to the grid.
In addition, I have a consumption meter that measures the amount the house itself consumes.
Generation is easy, i have a generation meter and HA asks for a generation meter.
But consumption seems much less simple.
If I put my consumption meter's output in where HA asks for consumption, it thinks that my consumption = consumption + solar, so much higher than reality
If I puy my grid net meter into the consumption box, it reads positive when pulling from the grid and negative when pulling from the grid, but apparently HA is too stupid to realize that negative values mean pushing to the grid, so it still thinks my house consumed way more than it did.
Is there a way to feed in these values so HA stops trying to be smart about calculating things it doesn't need to calculate?
Or do I need to create fake sensors to combine the various sensors just to counteract HA's internal calculations?
(I am also using the PVOutput integration. PVOutput has import/export available in its api, but of course the integration doesn't reveal them...)
alternatively, using grid net:
it's like... almost there...
Ideally, you don't want to use the consumption sensor at all for the Energy screens. But you do want separate import/export sensors ideally in an always counting up format, like a monodirectional energy meter, although daily or monthly reset can be fine too.
I'm not sure if there is an easy way to split a net energy sensor like that into an import and an export. I'd try searching this channel for info on that.
Worst case, you may need to look at power, and create two template sensors. One that is positive when importing, and and negative when exporting. Then for each, integrate over time to get energy, and finally use the "utility meter" integration to enable it to behave properly over resets.
I'm not sure why a single net sensor does not work though in light of pull requests like: https://github.com/home-assistant/core/pull/55850
i wonder if there's already an open issue to handle net meters. probably 80% or more of houses in the usa with solar have net meters and nearly none will have separate import and export meters...
It's not that uncommon for meters to actually supply sperate import and export numbers, even though it is not universal
my utility uses meters that only output a single value, the current value displayed, over radio frequency... maybe it's a northeast thing
Mine apparently only displays imports, but tracks and reports exports without displaying it on screen. Which seems REALLY dumb, as if wireless fails, it makes it impossible to have a meter reader properly read it by sight, and they need to use a terminal on the optical port to read it properly.
nice
๐
i guess i'm just grumpy that the energy dashboard asks you to put in an energy consumption value, but it really doesn't want that, it wants import
maybe i'll see about putting in a PR for pvoutput that adds import and export values
That's an extremely valid gripe. I'd suggest filing a bug report on the frontend repository about that.
It is very misleading as it currently is
While not perfect the solcast custom integration looks to do a better job for me:
nice!
+1 for solcast. works very well for me in Australia
I have a Shelly pm3 measuring my overall power consumtion. Besides that I also have Shelly plugs to to measure the consumption of certain devices. Now I would like to have some chart that displays the plugs measurements in relation to my overall consumption, maybe in a pie chart. Does someone have an idea how I can achieve this in HA? I can probably do that in Grafana but would prefer a HA dashboard.
Wh is also fine AFAIK. The dashboard just converts everything to kWh. MWh too even
I would do what saku said. Two template sensors. 1-value and value-1 for import and export with an if statement in the template that if its < 0 to stay 0
I know Apex charts are rather handy for showing data like that. At least bar graphs. But for pi charts I haven't come across any cards
https://github.com/RomRider/apexcharts-card
I had an energy entity that wouldn't show in the list in the energy dashboard that resolved when I made it kWh instead of Wh. It's entirely possible that was a red herring and something else was amiss.
I have seen it happen before to be honest
but technically based on the code it is supposed to accept Wh, kWh and MWh
but code ๐
I show individual usage of key appliances against total energy usage in apex charts.
Stupid question, but where did the energy setup page move to? I can't find it after the settings page has been reworked...
Setting > Dashboards
how do you make the values stack?
they aren't stacked, just showing fill. Although I'd be surprised if apex didn't allow for it.
Thanks
any ideas why this is not good enough for the energy dashboard?
once an hour updates
it likely is missing the correct attributes
quick question about the energy tab, i can add individual devices and sources, that means if i add something in both of these things, it will be counted twice in total consumption ?
Oh hi @deft nexus if You still remember, i tried to solve the issue with one card showing 0 instead of total monthly kWh used, it worked when i changed the name of couple things in the whole chain, but when i used the name i wanted it wouldn't work, and i checked for duplicates more than enough times so that wasn't the issue, now since its been a while, im looking to try out the energy tab, since if i add a new device my whole template and sensor stuff has to be updates and it just takes way to long...
Sorry, could anyone help me, search is returning too many hits. I will install solar tomorrow and beside having nearly all outlets covered with shelly I installed a light sensor at the main breaker. Instead of havin 50 shellys in the energy dashboard as consumption devices I will get the readings from the main fuse. And then I add the solar as.. well... solar. How does hassio behave in this case as the solar power is already deducted at the main fuse sensor as in (i guess) many households. Does it just show as an overlay and not as a sum then?
HA will show solar separately. Based on the production or return of your house it can show which part was used from the solar energy
But this would mean I would need to give it the sum of all consumption as sensor reading and it deducts the solar later on. Basically adding the main fuse plus solar as consumption (brutto consumption) and than add solar again as solar to get a netto consumption
how is everyone else doing the metering. Here all solar plus consumption goes through a house meter/fuse and you can't get a separate metering if you go the self-made shelly/Esphome way. Plus it appeared to me that getting every outlet measured by a shelly didn't get me to my main diy goal tio measure the overall consumption as we have many 3 phase circuits that you aren't supposed to get close to (or at least you aren't supposed to). I guess I will find out tomorrow. My scope would be to see the overall power consumption, the solar production and the netto consumtion sort of clearly separated in one overview.
Imho I gues thats how most of Europe with DIY solar works if I am not mistaken. Wasn't their a request to give the dashboard a configuration option whether the overall consumption was already deduced by the solar production or not?
If I am looking at the energy help pages focussing on ct clamps (as this is basically what it is) the information given is misleading and just relates to a pure solar production without consumtion on the same wires if I am reading it correctly. Maybe someone can help me out if i am mistaken
quick question #2 ๐ about the energy tab, i can add individual devices and sources, that means if i add something in both of these things, it will be counted twice in total consumption ?
https://www.home-assistant.io/docs/energy/individual-devices/
It doesn't count them twice. The Electricity Grid and Solar Panels input areas determine the whole of house energy usage views. The individual devices gives you a breakdown of energy usage per device but it isn't summed with those whole of house measurements.
Check that it has the correct device_class: energy
But it states in Youโre link that it does include that โฆ -> Home Assistant can integrate the energy usage of individual devices into Home Assistant. That way you can see the impact of individual devices on your total energy consumption.
it shows this in addition under the other energy views - it doesn't affect the other views, as you can see by my car charger being shown separately.
it works for you without last_reset? I have every attribute that's required plus then some
I'll try changing state_class from measurement to total
referring to this post, you want the state_class: to be total_increasing or total. I don't use last_reset.
https://community.home-assistant.io/t/last-reset-for-energy-sensors/396837/2
hi. Any idea hot to fix this daily 45000kWh values? i am running: Home Assistant 2022.7.4 Supervisor 2022.07.0 Operating System 8.2 Frontend 20220707.0 - latest
You probably uses some old information (from about a year ago). At that thime state_class: measurement and last_rest were needed. This has been changed I think in August or September last year..
Use a sensor that doesn't go back to 0 when the sun is down ๐
that might be.... as i am monitoring solar inverter "2" times. one over modbus TCP, and second it public API via monitoring... now i need to wait for hass to finish upgrading and then i check
i found the issue... Not in solar energy production sensor, but the problem is in forecast.
some values are with comma and others with dot.
I have an aqara wall switch (zigbee 3.0 perhaps) that doesnโt show any power/energy measurements. Iโve checked the ZHA integration for issues with this plu but no luck. Any thoughts that could help me?
Itโs connected to a conbee II-stick
How do I like edit my energy configuration? I know I can just edit the file .storage/energy but I feel like there should be a settings menu in the webui similar to the first time wizard. Am I missing something? Solved
this looks so good, i like the granularity, got any links on how to achieve that?
with, or without neutral @fallow osprey ? https://www.zigbee2mqtt.io/devices/DLKZMK11LM.html https://www.zigbee2mqtt.io/devices/DLKZMK12LM.html
the version without, Doesn't work as a router and doesn't support power meter
Sorry. Wall plug
have you tried: Gear icon "Settings", and then on top in search bar type energy -> it till offer energy configuration. hope it helps
Tysm!
i had the same situation... and found by accident ๐
It's also under Dashboards
No links, just quite a bit of YAML to get apex-charts how I wanted it visually and also in panel mode so you get a bit more size on a PC or when landscape on a phone. So long as you've got sensors for power with a reasonable resolution you should be able to do the same.
hi and good evening to all the staff ... my name is Marco I am a newbie home assistant ....
I am writing to you home assistant experts for help with reading my voltronic Axper inverter ... currently I use solpiplog to read data from my inverter ... but I would need your help in configuring and manipulating data in mqtt in home assistant ....
from the premise if I listen in my mosque I can see the data of my inverter but I do not know how to configure the graphs
Thank you for your understanding and patience
Hello. I'm having trouble adding my solar production to my energy dashboard. I'm collecting the data from my SMA successfully using modbus. Current output in W is collected to "PV Current Production" under modbus. I've set up a helper converting the W to kWh using Reimann sum integral sensor called "sensor.solar_kwh".
then I've built my template sensor:
- name: "Solar Generation"
unique_id: sensor.energy_dashboard_solar_generation
friendly_name: Energy Dashboard Solar Gen
unit_of_measurement: 'kWh'
state: >
{{ (states("sensor.solar_kwh") | float) | round(2) }}
device_class: energy
state_class: measurement
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
but it doesnt show up under "Add solar production"
any ideas?
Settings -> Dashboards -> Energy
For mine, I have the production defined as state-class: power and the reimann sum assigns the integral of power as energy. I don't have a template sensor doing anything to the output of the reimann sum as it's ready for the energy dashboard.
I also don't use last reset.
Iโm trying to add a Shelly EM using the add consumption option in the energy dashboard but it wonโt select
It shows the channels in the dropdown but clicking them doesnโt do anything and I canโt add any of them
so something like this?
- platform: integration
source: sensor.SMA_Power_AC
name: solar_gen_sum
unit_prefix: k
round: 1
method: left
state-class: energy
And here is sensor after update:
- name: "solar_generation_dashboard"
friendly_name: "Solar Generation"
unique_id: energy_dashboard_solar_generation
value_template: >
{{ (states("sensor.solar_gen_sum") | float) | round(0) }}
unit_of_measurement: kWh
device_class: power
state_class: total_increasing
this one seems to work now as a utility meter:
solar_generation_daily:
source: sensor.solar_gen_sum
name: Solar Generation Daily
cycle: daily
Sorry I meant to type state_class: not state-class:. I have that set against the input entity, not the platform: integration. Bit hard for me to post yaml now, I'm on mobile.
This is the link I started with. I made a fair few changes but took this approach to setting up my energy reporting.
I think It is working now with the utility meter I added
but as I really cant understand why it is working I will still read that thread you posted, thanks ๐
Good to hear. The only thing I'm iffy about is that your energy (in kWh) is showing as a device_class: power - I'm not sure if that will cause issues.
@covert plover posted a code wall, it is moved here --> https://hastebin.com/icisuzezox
bot didnt seem to like my message but see link above @limber warren
I guess there's different ways to achieve the same result. If the data is good in energy dashboard then probably good enough but it's nice to understand what works and what doesn't.
Anyone know whatโs up here?
I used this code to summarize the channels and used the output instead: https://community.home-assistant.io/t/shelly-3em-3-phase-net-metering-templates-for-import-export-and-consumption/390237
maybe that helps
@sly cargo name your shelly sensors sensor.l1_power etc in entities settings
my problem is the EM is not giving me correct values though. Something is wrong with the installation...
device_class should be energy
And you should add availability: "{{ states('sensor.solar_gen_sum') | is_number }}" to avoid drops to 0 when the source sensor is not available
Thanks but that sensor doesnt work still. Im using the other one now, see https://hastebin.com/icisuzezox
But I will try update it again
This is the sensor now:
- name: "solar_generation_dashboard"
friendly_name: "Solar Generation"
unique_id: energy_dashboard_solar_generation
value_template: >
{{ (states("sensor.solar_gen_sum") | float) | round(0) }}
availability: "{{ states('sensor.solar_gen_sum') | is_number }}
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
Friendly name is not valid there
name: is the friendly name, the entity id will be a lowercase underscored version of that
ok
Btw, you could also just add the missing attributes using customize
like this now:
- name: Energy Dashboard Solar Generation
unique_id: energy_dashboard_solar_generation
availability: "{{ states('sensor.solar_gen_sum') | is_number }}"
value_template: >
{{ (states("sensor.solar_gen_sum") | float) | round(0) }}
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
This looks fine
Lets see now if it shows up ๐
no, still not listed. And doesnt show up as entity either
ah
ill try change
so {{ (state("sensor.solar_gen_sum") | float) | round(0) }}
The system cannot restart because the configuration is not valid: Invalid config for [sensor.template]: expected dictionary for dictionary value @ data['sensors']. Got [OrderedDict([('name', 'Energy Dashboard Solar Generation'), ('unique_id', 'energy_dashboard_solar_generation'), ('availability', "{{ states('sensor.solar_gen_sum') | is_number }}"), ('value_template', '{{ (state("sensor.solar_gen_sum") | float) | round(0) }}\n'), ('unit_of_measurement', 'kWh'), ('device_class', 'energy'), ('state_class', 'total_increasing'), ('power_import', OrderedDict([('friendly_name', 'Power Import'), ('unit_of_measurement', 'W'), ('value_template', "{% if (states('senso.... (See ?, line ?).
sensor:
-
platform: template
sensors:- name: Energy Dashboard Solar Generation
unique_id: energy_dashboard_solar_generation
availability: "{{ states('sensor.solar_gen_sum') | is_number }}"
value_template: >
{{ (state("sensor.solar_gen_sum") | float) | round(0) }}
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
- name: Energy Dashboard Solar Generation
I moved it to the top of the file
you are mixing up both legacy(old) and new format for template syntax
old one is under sensor: domain whereas the new one is under each own template: domain
value_template and friendly_name are both for the old one (platform: template)
the new one has state and name
Yes it is an old yaml file, I resently booted up my Pi and updated HA again so there might be some old stuff in it still
you need to choose which way you will be writing your template. One or they other. Can't mix and match
TheFes was showing you the new way
Im OK with writing new sensors the new way, however some of my old stuff might break
state: "{{ your template }}" instead of value_template: "{{ your template }}"
Not states() to state()
You need to new format of you want to include state_class, it is not supported in the legacy format
oh crap haha
But again, you can just change sensor.solar_gen_sum using customize to it has all the right attributes
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks. Here's an example
Don't forget you can edit your post rather than repeatedly posting the same thing.
For over 15 lines you must use a code share site such as https://dpaste.org/ (pick YAML for the language), https://www.codepile.net/ (pick YAML for the language), or https://paste.debian.net/ (pick YAML for the language).
Please format your code as code :)
That's the wrong one
I will probably do this instead
You are using the sensor integration here, you should be using the template integration
You can not place this in sensor.yaml if you are using that
Under the sensor: key.
This needs to be placed under the template: key
template:
- sensor:
- name: Energy Dashboard Solar Generation
unique_id: etc
yeah moved it to this
should it show up instant under available options or do it have to contain data+
solved it with customize
added device class and changed from total to total increasing, it showed up
thanks for your help @zealous rampart
Is it sorted now? I think we're on opposite timezones but I can post some yaml for how my power sensor is made good for energy dashboard if it helps.
Could you help me with the graph? Mine doesn't include the solar sensor into the energy usage card. I just see the consumtion devices. The solar production panel looks the same as yours.
Facepalm for me: RTM. In the energy configuration it clearly states what you have to do... Lets see if that works as expected
Hey
where is the forecast data stored? I need to remove the peak from 12. of july
I cant find it in statistics tab
I don't think it stored in statistics
where is it stored then?
Hi, can anyone help as to why this isnt showing up under my energy tab?
where does it come from?
did you create it in the config?
i think the increasing type is missing
Its from the Solax integration
where do you want it to add to the energy dashboard?
under solar production
you need a total increasing one for that
currently you have the current value
but you need a sum
you can create a rieman integral helper for this
no wait
your value already is the complete production in kwh right?
my previous sensor worked fine, but i had to change the brand of inverter and this is where we are at
yes
ah okay
the problem is the state_class
it is measurement but it needs to be total_increasing
so state_class: increasing should fix it?
I can create a new sensor and use that as a source?
yes
`template:
- sensor:
- name: Solax - Generated energy (Total)
state: "{{ states('sensor.solax_energy_total') }}"
unit_of_measurement: 'kWh'
state_class: total_increasing
device_class: energy
attributes:
last_reset: '1970-01-01T00:00:00+00:00'`
- name: Solax - Generated energy (Total)
give it a try
Thanks will do
I will have to wait a while to see if it appears in energy dashboard?
can you add it already?
i've added it again, it was added before
it will need some time to appear in the dashboard, its only updated every hour (and you need a change in the solax value in this time)
ok cool, if I have anymore issues, I'll be back ๐
hope it works now
documention is not that great for the whole HA energy thing
sometimes it still feels a bit beta ๐
someone has an idea where I can find these values in the database?
@zealous cliff You don't need a last_reset
Thanks, its working now so big thank you @cyan needle
just something to keep in mind if you make others
was it a custom integration?
energy is essentially never measurement
If you can see those peaks even a month ago then they will be in the database probably
as in same as long_term_statistics
but I'm not entirely sure where they come from
I know there's the integration but maybe it's only same as normal history (2 weeks)?
ah i think i found something in states database
deleted everything for this date but it still appears
maybe its cached somewhere
yep
It was from the Solax integration which is built in to HA
restart fixed it
Hey folks- I'm a newcomer to HA and have it up and running in a VM on my unRAID server. It "auto detected" my encore solar panels, and it presents an energy dashboard but the data isn't registering/displaying properly. For example, for the last week, it shows I have %0 "self consumed" energy and I know that's not right. Also, it shows my net return to grid as zero also. Can anyone provide setup pointers on exactly what I need to do to get the data displayed here to reflect reality..?
You have probably added the same sensor twice in the dashboard settings
you need 3 different entities in total
- Energy produced from your solar
- Energy you get from the grid
- Energy you return to the grid
The display seemed to "auto populate" - I didn't set anything up that I recall... I just opened the panel and it was showing stuff...
If you go to settings --> Dashboards --> Energy you can see the current configuration
also- I am just getting started with HA so I am not entirely sure where to look for entities..
this is what I see:
IS there a guide somewhere on "how to setup solar panels/inverters/smart meter for HA..?
I don't have one specific link. Pottentially the hyperlinks you see there on each section
I think the problem is with your return to grid sensor
Lifetime energy pruduction sounds like it's what your solar produces
you want there the kWh you give back to the grid (if you produce more than what you consume)
A technical question as I am using a different solar approach: Is it common to employ dedicated sensors for grid return? Excess energy usually flows through the house meter, unseen. At least if the meter doesn't count it seperately. How would a template sensor for this calculation look like? Something if house consumption is less than solar production sum the difference up? I am wondering as I am getting more and more solar installed and my meter does not measure the excess
๐ would you share your calculation?
Sure, standby
- sensor:
- name: "Return"
unit_of_measurement: "W"
device_class: power
state: >-
{% set mains = states('sensor.power_usage_796024') | float %}
{% set solar = states('sensor.solar_pac') | float %}
{{ (solar - mains) if (solar > mains) else 0 }}```
- platform: integration
name: solar_return_kWh
source: sensor.return
round: 3
method: left
unit_prefix: k```
oh tidy. With templates there's a few ways to achieve the desired outcome. I'll share mine too as it's slightly different and may help someone depending on their input data:
name: Grid Import Power
state_class: measurement
icon: mdi:transmission-tower
unit_of_measurement: W
device_class: power
state: >
{{ [0, states('sensor.envoy_122014055180_current_power_consumption') | int - states('sensor.envoy_122014055180_current_power_production') | int ] | max }}```
name: Grid Export Power
state_class: measurement
icon: mdi:transmission-tower
unit_of_measurement: W
device_class: power
state: >
{{ [0, states('sensor.envoy_122014055180_current_power_production') | int - states('sensor.envoy_122014055180_current_power_consumption') | int ] | max }}```
Then integration exactly the same as lits has done.
To the few who use GoodWe inverter and HomeKit energy consumption monitor - could you please help me on how you integrated the data to home assistant and what sensors you added to the energy dashboard to view the data inside home assistant and where?
I want to be able to make the full use of my energy monitoring, from the grid and from the solar panels, how much we are consumption and from where and how much we are sending back to the grid.
I would love to see some work and be inspired! ๐
Please and thank you.
you can read here https://github.com/mletenay/home-assistant-goodwe-inverter
yes please do!
See if you can apply this to your power entities:
https://www.toptal.com/developers/hastebin/cuvohifube.yaml
I noticed my home assistant glow pulse meter resets its total_energy value each time it reboots. I want to make this value persistent. Can I configure the utility meter integration to read the current power consumption read by the glow pulse meter?
Or does somebody know how I can fix ha-glow resetting the value?
Thanks. I didnโt add the sensors in the configuration. I will give this a try.
Hello,
I've recently set a power switch on the energy dashboard and was working fine but it suddently stopped graphing even though the sensor is still reporting changes
the top graph is the termo consumo sensor that you convert to kWh using the Riemann Sum Integral?
the templates are definitely wrong though
yes
but it was working before
The first too are irrelevant for this but to be fully correct
voltage --> device_class: voltage
current --> device_class: current
energy is only for (k)Wh
and your last sensor is measuring Watts
that is power consumption, therefore that would be device_class: power
not the same as energy consumption
and all these sensor are live date meaning the need state_class: measurement
total_increasing is for sensors that only increase
If you look at the history of sensor.termo_consumo I'm sure it doesn't just increase
thanks, i've adjusted to the following now:
that now does look correct
measurement can go also on the other two but either way it doesn't matter as much for those
what are the attributes of the kWh sensor ?
It's the last entry on the template termo_consumo
look att dev tools under states tab. there is a large table with all your entities
if you find the one above there it will tell you its attributes on the last collumn
ah you mean this
state_class: total
source: sensor.termo_consumo
unit_of_measurement: kWh
device_class: energy
icon: mdi:chart-histogram
friendly_name: Energia Consumida
i can't find the other settings i set when setting this sensor
like the integration method, precision and metric prefix
and the time unit
those attributes do look correct too
if you've set up the Reimann Sum from the UI there should be a button when you click on the more info
so the gear on this pop up
there. The blue text
if i click on the integration it will only come up with the precision
oooh
Hmm
but i believe it was set as trapezoidal rule, 2 precision and metric prefix K with time unit to hour
but if i forget about this in the future, is there a way to check them?
maybe i should set it manually via configuration file instead
I was just making one myself to check
I indeed see the same
which is weird. You should have the option to change them
yeah, i thought it was weird but i've only updated recently and i only explore HA when i have something to setup
the default method is trapezoidal sure though
so i wasn't sure if there was another place to look into
I thought the options button that leads to the precision was coming up with the other options
doesn't look like there's any other place
Is this correct?
entities are most times unique to you, without explanation or details of what they contain our assumptions don't have a high confidence rating.
Hello! What is the best way to track energy consumption only with individual devices? Maybe with stats/sum for each month?
I suppose you could add them all up as one entity with a template
@deft nexus Hi Thanasis, do you have any idea when energy development team will correct the issue where gas energy is not added to electricity grid energy ? they wrote several months ago that this was not a priority but that they will work on it. thanks
Iโve created a bunch of template sensors adding up the devices by categories (eg heating, kitchen, lights) and then have imported those into my energy dashboard not as individual devices but as my grid consumption entities. I then get stacked bar charts with a summary for each time period.
The Powercalc HACS integration is then also great, since it allows you to model energy use for devices whose state you know in HA (smart lights, TV etc) but for which you donโt have an energy meter entity.
My near term plan it to actually measure the full energy consumption at the fuse box using a Shelly 3em and then create an โotherโ sensor which will compute the difference between devices I am capturing and those I am not.
I was wondering if there is a tutorial on how to configure HA to properly display details from my solar panel system on the Energy dashboard. I have a fresh HA install (I'm just starting out with HA- new user) and it discovered my panels, but it is not displaying correct data. It is showing my consumption as "zero" and my return to grid as 'zero" so it seems I need to connect things in some manner, but I am somewhat unclear on the steps I need to take. Is there a tutorial somewhere..?
That's a good idea i'll try that in my sandbox system, i have power meter in every plug in my house so no simulation needed ๐
I'm wondering if there is any din power meter with zigbee2mqtt support and 32A or even more capabilities, no need to be very precise
Zwave, but the qubino smart meter is like what you want. Or even a Shelly 3em over wifi. But I donโt know any Zigbee.
You would need entities that report kWh
Specifically one that is measuring the total amount of kWh your solar is producing (either lifetime or per day)
Then another entity measuring the kWh you consume from your energy provider (grid) and another measuring the KWh you give back to the grid
So 3 separate entities in total