#energy-archived

1 messages ยท Page 51 of 1

deft nexus
#

although not sure what rating

#

but it's equally around the 90 price range

#

was more thinking in terms of it being DIN rail mountable

scenic relic
#

yea the other thing is are you able to run 2 shelly em at once

deft nexus
#

why wouldn't you be able to?

scenic relic
#

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

deft nexus
#

Do you at least have already a way to integrate solar?

#

Sorry you mean through HA right?

scenic relic
#

yes

deft nexus
#

to the solar or the HA part? haha

scenic relic
#

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

scenic relic
deft nexus
#

Mini PC is always a better investment

#

and bettter reliability

scenic relic
#

yea found a refurbed one for 50ยฃ

deft nexus
#

for your solar it could be your inverter has an integration already

deft nexus
scenic relic
#

its got a data logger so it not a huge worry if not possible

#

its an i3 8th gen

deft nexus
#

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

deft nexus
#

and with an SSD for storage

scenic relic
#

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

deft nexus
#

or you saying you know you can

scenic relic
#

im pretty sure you can

#

as shelly is on the integration list

deft nexus
#

Ah Shelly you can yes

scenic relic
deft nexus
#

I thought you were saying you can already without Shelly

#

sorry my bad

#

been a long day lol

scenic relic
#

no sorry poor explination

deft nexus
#

If you are in no hurry and you do go with Shelly might be worth waiting for Black Friday

scenic relic
#

yes definatly

deft nexus
#

I don't know if they will do equally good ones this year

#

I got the EM last yeear 45% off

scenic relic
#

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

deft nexus
#

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

scenic relic
#

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

deft nexus
#

But you have a single phase you said

#

So nothing needs adding together

scenic relic
#

Yes

#

just wether shelly is configurable that way

weak juniper
#

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

glossy cairn
#

TED 6000 help needed

unreal jewel
#

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.

deft nexus
#

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

flint swan
#

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

deft nexus
#

I had this recently ๐Ÿ˜…

#

Ctrl + -

#

To minimise the dashboard it should show at some lower percentage

flint swan
#

hehe

rapid lily
#

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?
unreal jewel
ripe oarBOT
#

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.

deft nexus
unreal jewel
mild forge
#

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?

unreal jewel
#

2 digits I was hoping for some

deft nexus
#

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

mild forge
#

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

deft nexus
#

Lifetime is also fine

mild forge
hybrid parcel
#

Heya, is there a way of finding out where all the historic energy data from a home assistant instance has gone?

river finch
#

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

mild forge
#

Thanks. I was referring to the required mqtt topics and the sensor configuration interface.

hollow oar
#

@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

mild forge
#

Nope, I don't see any crosstalk.

hollow oar
#

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?

mild forge
#

Yes, I tested it

hollow oar
#

dang - that's kinda interesting.

mild forge
#

I pulled 3.5kW on one without any effect on the other ones

hollow oar
#

is that 240v or 110?

mild forge
#

240

hollow oar
#

Nice. I first looked at it and went "oh jesus, no grounds, and sense loops right next to each other".... but I'm surprised....

mild forge
#

Have you experienced crosstalk happening with CTs close to each other?

hollow oar
#

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

mild forge
#

There might be 1W-2W difference to other circuits, but that could be measurement error

hollow oar
#

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...

mild forge
deft nexus
#

the link to the dev docs has the detailed information but I also tried to summarise that into the message below the link

unreal jewel
#

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 ๐Ÿ™‚

ripe oarBOT
smoky ridge
#

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)

smoky ridge
#

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

old surge
#

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)

smoky ridge
#

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

mild forge
#

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

unreal jewel
# old surge Hi Guys, are there washers that you can start from home assistant?

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 ๐Ÿ™‚

unreal jewel
#

Has anyone found a way to track energy usage costs based on Time of Use?

limber warren
#
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.

spice tiger
#

Is there a recommended CT clamp system that works best with HA for USA?

#

To monitor overall energy + individual circuits?

sly cargo
#

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?

cyan needle
#

Hello together

#

in home assistant the values are waaaay to high

#

any ideas where there could be an error?

cyan needle
#

ahhh got it

#

i had to delete the demo sites from the solcast api

#

๐Ÿคฆโ€โ™‚๏ธ

opal tree
#

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).

limber warren
opal tree
#

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

vernal cloak
#

why is this happening?

opal tree
vernal cloak
#

the high bars vs precipation

opal tree
#

looks like the value from your solar feed is reporting high kWh

vernal cloak
#

It is reporting in Wh but its a big installation

tidal halo
#

It looks like your solar forecast isnt configured well

#

how did you configure it? Config/integrations-> Forecast.Solar?

vernal cloak
#

that is correct. fixed it, thank you

deft nexus
#

unless you want it resetting for your own needs

opal tree
# deft nexus 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.

deft nexus
#

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

fickle trout
#

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?)

opal tree
deft nexus
#

template sensors are normal entities

#

what do you mean wouldn't show as a sensor ?

deft nexus
#

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?

stoic hemlock
opal tree
deft nexus
#

of course. You'd be creating a new entity/sensor. Then you can use that new one into Reimann and than that into Energy

limber warren
# opal tree I'll have to have another look tomorrow but I mean the result of the template, c...

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 }}
full bronze
#

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.

brisk nimbus
#

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...

full bronze
#

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.

brisk nimbus
#

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...

full bronze
#

It's not that uncommon for meters to actually supply sperate import and export numbers, even though it is not universal

brisk nimbus
#

my utility uses meters that only output a single value, the current value displayed, over radio frequency... maybe it's a northeast thing

full bronze
#

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.

brisk nimbus
#

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

full bronze
#

It is very misleading as it currently is

full bronze
brisk nimbus
#

nice!

limber warren
#

+1 for solcast. works very well for me in Australia

cosmic wave
#

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.

deft nexus
deft nexus
deft nexus
limber warren
deft nexus
#

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 ๐Ÿ˜›

limber warren
young ether
#

Stupid question, but where did the energy setup page move to? I can't find it after the settings page has been reworked...

zealous rampart
#

Setting > Dashboards

cosmic wave
limber warren
young ether
tepid eagle
#

any ideas why this is not good enough for the energy dashboard?

#

once an hour updates

deft nexus
#

it likely is missing the correct attributes

unreal jewel
#

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 ?

unreal jewel
# deft nexus it likely is missing the correct attributes

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...

final spire
#

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?

zealous rampart
#

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

final spire
#

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

unreal jewel
#

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 ?

limber warren
limber warren
unreal jewel
#

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.

limber warren
#

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.

tepid eagle
#

I'll try changing state_class from measurement to total

limber warren
odd cape
#

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

zealous rampart
zealous rampart
odd cape
odd cape
#

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.

fallow osprey
#

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

naive path
#

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

crimson dirge
# limber warren

this looks so good, i like the granularity, got any links on how to achieve that?

blazing quail
odd cape
naive path
#

Tysm!

odd cape
deft nexus
#

It's also under Dashboards

limber warren
clever sapphire
#

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

covert plover
#

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?

covert plover
limber warren
sly cargo
#

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

covert plover
#

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

limber warren
# covert plover so something like this? - platform: integration source: sensor.SMA_Power_...

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.

https://community.home-assistant.io/t/using-home-assistant-to-calculate-my-energy-bill-using-data-from-my-solar-inverter/344913

covert plover
#

but as I really cant understand why it is working I will still read that thread you posted, thanks ๐Ÿ™‚

limber warren
#

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.

ripe oarBOT
covert plover
#

bot didnt seem to like my message but see link above @limber warren

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.

sly cargo
covert plover
#

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...

zealous rampart
#

And you should add availability: "{{ states('sensor.solar_gen_sum') | is_number }}" to avoid drops to 0 when the source sensor is not available

covert plover
covert plover
covert plover
#

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
zealous rampart
#

Friendly name is not valid there

#

name: is the friendly name, the entity id will be a lowercase underscored version of that

covert plover
#

ok

zealous rampart
#

Btw, you could also just add the missing attributes using customize

covert plover
#

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
covert plover
#

Lets see now if it shows up ๐Ÿ™‚

#

no, still not listed. And doesnt show up as entity either

zealous rampart
#

You have this under:

template:
  - sensor:
#

Wait, value_template: should be state:

covert plover
#

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
#

I moved it to the top of the file

deft nexus
#

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

covert plover
#

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

deft nexus
#

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

covert plover
#

Im OK with writing new sensors the new way, however some of my old stuff might break

zealous rampart
#

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

covert plover
#

oh crap haha

zealous rampart
#

But again, you can just change sensor.solar_gen_sum using customize to it has all the right attributes

ripe oarBOT
#

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).

zealous rampart
#

Please format your code as code :)

covert plover
#

ยดยดยด

#

oops ๐Ÿ˜„

zealous rampart
#

That's the wrong one

covert plover
#

yeah

#

trying to figure out where I broke the config now...

covert plover
zealous rampart
#

You can not place this in sensor.yaml if you are using that

covert plover
#

im not

#

this is configuration.yaml wrote all sensors there

zealous rampart
#

Under the sensor: key.
This needs to be placed under the template: key

#
template:
  - sensor:
      - name: Energy Dashboard Solar Generation
        unique_id: etc
covert plover
#

yeah moved it to this

zealous rampart
covert plover
#

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

limber warren
final spire
# zealous rampart

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

cyan needle
#

Hey

#

where is the forecast data stored? I need to remove the peak from 12. of july

#

I cant find it in statistics tab

zealous rampart
#

I don't think it stored in statistics

cyan needle
#

where is it stored then?

zealous cliff
#

Hi, can anyone help as to why this isnt showing up under my energy tab?

cyan needle
#

where does it come from?

#

did you create it in the config?

#

i think the increasing type is missing

zealous cliff
#

Its from the Solax integration

cyan needle
#

where do you want it to add to the energy dashboard?

zealous cliff
#

under solar production

cyan needle
#

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?

zealous cliff
#

my previous sensor worked fine, but i had to change the brand of inverter and this is where we are at

#

yes

cyan needle
#

ah okay

#

the problem is the state_class

#

it is measurement but it needs to be total_increasing

zealous cliff
#

so state_class: increasing should fix it?

cyan needle
#

I dont know if you can change that or maybe overwrite somehow.

#

total_increasing

zealous cliff
#

I can create a new sensor and use that as a source?

cyan needle
#

yes

zealous cliff
#

`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'`
cyan needle
#

give it a try

zealous cliff
#

Thanks will do

#

I will have to wait a while to see if it appears in energy dashboard?

cyan needle
#

can you add it already?

zealous cliff
#

i've added it again, it was added before

cyan needle
#

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)

zealous cliff
#

ok cool, if I have anymore issues, I'll be back ๐Ÿ˜†

cyan needle
#

hope it works now

#

documention is not that great for the whole HA energy thing

#

sometimes it still feels a bit beta ๐Ÿ˜„

cyan needle
deft nexus
#

@zealous cliff You don't need a last_reset

zealous cliff
deft nexus
#

just something to keep in mind if you make others

#

was it a custom integration?

#

energy is essentially never measurement

deft nexus
#

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)?

cyan needle
#

ah i think i found something in states database

#

deleted everything for this date but it still appears

#

maybe its cached somewhere

#

yep

zealous cliff
cyan needle
#

restart fixed it

plucky ice
#

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..?

deft nexus
#

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
plucky ice
#

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...

deft nexus
#

If you go to settings --> Dashboards --> Energy you can see the current configuration

plucky ice
#

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..?

deft nexus
#

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)

final spire
# deft nexus you want there the kWh you give back to the grid (if you produce more than what ...

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

silver dagger
#

I calculate my return

#

Pretty simple function

final spire
silver dagger
#

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```
limber warren
# silver dagger ```# Template.yaml - sensor: - name: "Return" unit_of_measurement: "W"...

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.

unreal jewel
#

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.

limber warren
somber jackal
#

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?

unreal jewel
torn vale
#

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

deft nexus
#

the top graph is the termo consumo sensor that you convert to kWh using the Riemann Sum Integral?

#

the templates are definitely wrong though

deft nexus
#

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

torn vale
#

thanks, i've adjusted to the following now:

deft nexus
#

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 ?

torn vale
#

It's the last entry on the template termo_consumo

deft nexus
#

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

torn vale
#

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

deft nexus
#

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

deft nexus
torn vale
#

it doesn't come up with the other settings

deft nexus
#

there. The blue text

torn vale
#

if i click on the integration it will only come up with the precision

deft nexus
#

oooh

torn vale
deft nexus
#

Hmm

torn vale
#

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

deft nexus
#

I was just making one myself to check

#

I indeed see the same

#

which is weird. You should have the option to change them

torn vale
#

yeah, i thought it was weird but i've only updated recently and i only explore HA when i have something to setup

deft nexus
#

the default method is trapezoidal sure though

torn vale
#

so i wasn't sure if there was another place to look into

deft nexus
#

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

unreal jewel
#

Is this correct?

crimson dirge
# unreal jewel 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.

flint trench
#

Hello! What is the best way to track energy consumption only with individual devices? Maybe with stats/sum for each month?

deft nexus
#

I suppose you could add them all up as one entity with a template

topaz lake
#

@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

twin estuary
#

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.

plucky ice
#

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..?

flint trench
#

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

twin estuary
deft nexus
#

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