#devs_energy-archived

1 messages · Page 3 of 1

sacred warren
#

and with "0" do you mean that in your statistics table the sum was set to 0?

icy yew
#

@sacred warren has anyone discussed implementing the PG&E APIs which I believe are standards based? I looked into them years ago and its somewhat convoluted, would require running a remote server with TLS auth for PG&E to push data to but they instantly approve any project to work with as many users as it wants. https://www.pge.com/en_US/residential/save-energy-money/analyze-your-usage/your-usage/view-and-share-your-data-with-smartmeter/reading-the-smartmeter/share-your-data/third-party-companies/application-programming-interface.page

#

If Nabu set up a single server and did the OAuth thing that would instantly allow anyone with PG&E to have energy data in somewhat close to realtime

sacred warren
#

have not looked into it

icy yew
#

will poke around

sacred warren
#

it's just OAuth2 it seems

icy yew
#

For polling yes

#

I believe

#

For push you absolutely need to have a pre-registered URL and do TLS auth

#

Oh no, you need TLS auth for poll too

#

Our latest APIs follow the current North American Energy Standards Board (NAESB) Energy Service Provider Interface (ESPI) standard and provide access to Energy Usage Information (EUI) through a set of RESTful interfaces

#

Yeah it is standards based at least, so if you implement it once it should work for most if not all utility providers in NA

sacred warren
#

wonder if it is real time

icy yew
#

For PG&E at least it ain’t

#

24 hours at best I believe

#

but thats the best you can do without smart meter integration

#

It’s a good first step though, no cost to end users

stable zealot
#

I posted in #energy-archived earlier about this, but jumping in here in case any devs can provide some insight. The MQTT datastream from my utility provider gives me minutely summations of energy usage (basically "watt-minutes") which I'm converting to kWh. I'm setting the last_reset topic to the the timestamp in the MQTT minute/summation message. Since the Energy Dashboard is not showing anything close to reasonable data , I started trying to figure out what's going on. Looking in the statistics table in the database for the metadata_id associated with the entity, I'm only seeing one entry per hour. I was expecting to see 60 entries per hour (one for each minute of usage data). Any hints?

stable zealot
#

OK, so what piece of the puzzle am I missing since I have an entity that resets every minute?

keen zodiac
#

Guess it isn't supported. You could sum it up by a template.

stable zealot
#

Well that's a bummer. I assumed the new Energy stuff was taking care of all that sensor summation stuff "behind the scenes". Is there a way to create a template that sums the last hours worth of history and it just reports that value for the next hour (while it accumulates another hours worth of data)?

#

I've been using the utility_meter integrations (which does the summation nicely), but those can't be used as Energy sources, as far as I can tell.

gusty blade
#

hi all i have silly question about this energy template sensor readout here is my setup daily_power:
friendly_name: daily power
unit_of_measurement: kWh
value_template: "{{ (states('sensor.daily_energy')|float)|round(1) }}"

#

and i get this reading: 6,244,332.51 kWh

#

how do i narrow it down to 6,244,3kwh?

open wadi
gusty blade
#

ok sorry

stable zealot
#

Darn... I can't use a template from an hourly utility_meter sensor either:
Invalid config for [template]: [last_reset] is an invalid option for [template]. Check: template->sensor->0->last_reset

vocal shard
#

Hi guys, I might have found a reason for the spikes in the kWh usage, not sure if that was found already. there seems to be some odd behaviour on calculation when a metering device restart (or reconnect) causing the total energy value to be added as if it was a change from 0 to actual value rather than remember the previous value and compare... Not sure it does make perfect sense in my explanation.. if you want I can show

#

Sensor created by utility meter, as soon as I restart the only device in that room, the consume goes up as much as the "total" value of kWh for that device since day 1

#

Hope this helps

ashen jacinth
vocal shard
#

Oh, thanks pascalwinters, seems to be the same thing that I show above 🙂

floral tapir
leaden viper
#

hey everyone - i'm trying to integrate my enphase envoy with Home Assistant and i'm having a hard time interpreting their API. I was able to calculate the daily production and daily consumption in Wh but I can't figure out how to calculate the imported. could someone take a peak and see if they see something i don't? i'm not sure if i'm supposed to calculate this based on other numbers. I'm just a lonely python engineer and i have no solar experience. https://developer.enphase.com/docs

stable zealot
leaden viper
#

hey i'm trying to get my sensor to show up in the energy configuration but only 1 of them are showing up and it makes sense

#

it seems if i don't set a last_reset it doesn't show up...

stone breach
floral tapir
floral tapir
wispy snow
#

Hey All, As above - Still looking for a solution or why my "Solar Production" graph isn't working properly or at all! https://imgur.com/a/HyEM5HV

floral tapir
wispy snow
#

everything seems to work fine.. except nothing shows up in the "Solar" graph

#

can product more images.. but i thought it seemed clear what wasn't working from the picture i posted

#

it is showing up in the energy useage part as consumed

floral tapir
wispy snow
#

unit_of_measurement: kWh
friendly_name: Solar kWh
icon: mdi:solar-power
device_class: energy
last_reset: 1970-01-01T00:00:00+00:00
state_class: measurement

vivid pumice
wispy snow
#

well i've posted it 3 times and nobody can help.. seems to be a devs problem as i can't figure out why it isn't working because everything except that graph is fine? unless im missing something?

vivid pumice
#

what's the link to that issue?

wispy snow
#

? what link

vivid pumice
#

to the issue posted on the issue tracker on github

wispy snow
#

i haven't posted it on github.. not sure what i need to post

vivid pumice
#

this channel is for the development of energy related "things", if you are not developing anything for it, please use #energy-archived and if you encounter issues, post them on github.

leaden viper
#

they said that the energy stats are supposed to update at every hour at 12min past but it didn't trigger

stone breach
manic rivet
#

Is anyone aware of energy meters that show net energy consumption (meaning the meter's value can both increase and drop) as opposed to only supporting an increasing energy consumption?
@copper lagoon mentioned Portuguese electricity meters do not split energy in two sensors (import and export), it's instead a single value.
@full spade 's solar panel system shows a decreasing total energy production during dusk and dawn which we believe is because the solaredge API is taking into account the energy used by the inverter which is larger than the yield from the panels at that time, but it could also be a bug.
Are there others?

copper lagoon
cedar tangle
#

@manic rivet I have a AlphaESS inverter that also gives a positive value when using grid power and a negative value when feeding to the grid

manic rivet
#

@cedar tangle Thanks. Is your inverter supported by a native integration? You mention power (W or kW), does it have energy sensors too (Wh or kWh) exposing a value which may increase or decrease?

cedar tangle
#

No integration unfortunately. It sends MQTT. It is in watts, which is the converted to kWh in HA

manic rivet
#

👍

odd saddle
manic rivet
#

@odd saddle can you link to it or share the model name?

quaint wave
manic rivet
#

@quaint wave what you're showing now is a separate import sensor point which will only grow?

quaint wave
#

yes it is. this is a pure 'hardware' sensing. Ive added a shot of the fulll ModBus data. On the api sensor connection to that same inverter, (or to my Solaredge account I must say) no 'decrease' is measured.

#

you can see the pulsetot and export being equal. Because of that, it seems doubtful the energy import would be taken into account?

#

noticed you merged the 'small dip' pr, would that prevent 'reset' for this too? Maybe an edge case, but it happens ... https://imgur.com/a/r4ABQON. Unless that would be a 'short dip' 😉

manic rivet
manic rivet
quaint wave
#

that, or an mqtt issue maybe (these values are published over mqtt to HA's add-on)

#

in any case it would be clear this to be a glitch, and no reset..

manic rivet
# odd saddle Aeotec HEM Gen 5

Aha, so it's a set of current clamp meters, and the energy usage is calculated by integrating? Net metering in this case means the reading will decrease if you have a solar system installed, the meter does not provide separated import and export sensors?

odd saddle
manic rivet
#

ok, and if you don't have solar it will only count upwards and ignore any negative measurements maybe?

odd saddle
#

well you can configure it to not net meter

#

but yes it'd ignore negative measurements

manic rivet
#

ok, interesting

odd saddle
#

actually last time I had a configuration issue it pretty much abs'ed the negative values lol

manic rivet
odd saddle
#

also you can setup an Iotawatt to net meter too

manic rivet
#

but iotawatt also does support separated import and export according to some quick googling of mine?

odd saddle
#

it can if you set it up that way 😉

manic rivet
#

right

sacred warren
#

It's beta day ! This means that you can try out the new total_increasing feature. It should help make integrating custom things into energy management hopefully a lot easier

grand bloom
#

I've got the new Energy dashboard running, and I think it's pretty cool. However, I think the info-text on the lovelace cards could use a re-write, especially "Self-consumed solar energy." Anyone want to collab on this or should I just issue a PR to frontend, where the text lives?

sacred warren
#

What do you propose?

grand bloom
#

I have some thoughts. Let me organize them, will post back here.

grand bloom
#

Here goes! Once I finally had everything running in the dashboard, I found it pretty confusing—especially the cards in the sidebar. But as I started re-writing the info-text, I realized some other changes I would make to the sidebar cards. I’ll take them from the top.

#

1. The energy distribution card
This card is very cool! I have one suggested change, which I’ll mention as part of my critique of the next card.

#

2. Grid neutrality gauge
There’s a number of things here that I’m not crazy about. First of all, it’s basically redundant with the energy distribution card above. It’s just doing a few operations to tell you whether you returned more than you consumed, which you can tell by glancing at the energy distribution card anyway. Second, it’s not immediately clear what the needle position represents. It’s clear that the number displayed in the gauge is just returned - consumed, but what does the needle position mean? What are the units/limits of the gauge? I’ve looked at the code, so I get what it’s doing, but it wasn’t clear before I did that. For these reasons, I would suggest removing this card from the energy dashboard. I could see leaving it around as an option for other Lovelace dashboards (especially for users not using the energy distribution card). Another option is to integrate it into the energy distribution card, since it is so closely related. One way to do that would be to make the perimeter of the “Grid” circle into a blue/purple pie chart, just like the “Home” circle—that would pretty much show the same information. If this card is definitely sticking around in the energy dashboard, here are some changes I would make:

#

a. Switch the green/red colors to the purple/blue return/consumption colors used in the energy distribution and energy usage cards. That’s exactly what the gauge zones represent: what is now green reflects net energy return (purple) and what is now red reflects net energy consumption (blue). This change would make the card much more consistent with the others.

The use of green/red has two additional problems as well. First, green is also used in the energy distribution card to indicate non-fossil grid consumption, which is totally different. Green/red also has the problem, IMO, of introducing positive/negative valence, which makes the info-text on the next graph a bit confusing. (I’ll comment on that next.)

#

b. Eliminate the yellow range. The size and position is totally arbitrary, and not mentioned in the info-text anyway. It seems only to reinforce the positive/negative valence, which I think is a problem in the first place.

#

c. The info-text is not correct. It says that if the needle is "in the red, it means that you relied on the grid for part of your home's energy consumption.” In fact, the needle represents net usage. It could be in the green even if you relied on the grid at night, which is, of course, typical. I would change the text to the following (coupled with the above color change):

#
This card indicates your overall energy dependency.
<br /><br />
For a given day, if the needle is in the purple, you returned
more energy to the grid than you consumed. If it's in the blue,
you consumed more energy from the grid than you returned. 
#

3. Solar consumed gauge
The info-text here says "If you frequently produce more than you consume, try to conserve this energy by installing a battery or buying an electric car to charge.” The first thing I think is confusing here is that it is not necessarily clear how to compare the info-text with the graph. It takes a second to realize that “produce more than you consume” counterintuitively refers to a situation where the number is very low. Secondly, I don’t think it’s correct to say that channeling energy into a battery or an electric car is “conserving” energy compared to returning it to the grid—even if there are some advantages to batteries (which are controversial, anyway). Third, the text sort of makes excess production seem like a bad thing, which is hard to square with the green/red color choice in the previous card (which, as I said, I think should be eliminated anyway). So my proposed text is:

#
This card indicates how much of the solar energy you produced was used by
your home instead of being returned to the grid.
<br /><br />
If this number is typically very low, indicating excess solar production,
you might want to consider charging a home battery or electric car
from your solar panels at times of high solar production.
#

4. Carbon consumed gauge
No real problems here. I would just clarify that higher is better, since the valence of the other gauges is not totally straightforward. (In other words, whether it is better to lean towards production, consumption, or a balance, depends on what your goals are). But a high proportion of non-fossil consumption is unequivocally good, in my view—so why not make that clear?

#

Suggested text:

This card indicates how much of the energy consumed by your
home was generated using non-fossil fuels like solar, wind and
nuclear. The higher, the better!
#

That's all from me for now—it's bedtime. Looking forward to your thoughts.

manic rivet
manic rivet
#

OK

misty heart
#

so from my utility I have access to hourly usage information via API, with the caveat that it is updated only several times a day and the information from the last 4-8 hours is never available yet. Is there a way to provide historical information to statistics/sensors? (I’m implementing this presently as a sensor using total_increasing, on the latest rc). I suspect I’m fighting the way this is meant to work so I might just time-shift it by 24 hours as a compromise.

misty heart
#

nevermind, see that something pretty close came up earlier this month in the aussie energy thread.

sacred warren
#

we're looking into being able to import historical data

jade hawk
sick sleet
#

When i open settings > Energy i got the follow error, but its correct that they dont have the unit of kwh because they are the prices. How can i solve this?

vivid pumice
untold pilot
#

Omg y'all! Finally finished reading all the energy launch docs. So excited! I'm in the US and run a clean energy company (energy storage). My house is an R&D project w 4 sets of CTs, solar and DC coupled battery running in self-supply mode. Electrifying stuff as possible and wanting to make HA the brains of the house. Super excited to see what's happening with the European coops. Have some thoughts and challenges seeing with making this useful in US. I'm a hacker, not a developer...where is the best place for me to plug in? How do I support?

sacred warren
#

Well basically this channel is the place to be.

#

Battery support is in beta right now.

#

What challenges do you see in the US?

main veldt
#

Started using the new state classtotal_increasing

grand bloom
# sacred warren What do you propose?

What do you think of my notes? ⬆️
Feel free to mark if there are some points you agree with or others you don't. I'm happy to put together a PR for the tooltip rewrites, color changes, or anything else. Would love to help make the energy dash as clear as possible!

sacred warren
grand bloom
#

Will do!

#

Issue or discussion?

#

Not exactly a bug, not exactly a feature request either.

sacred warren
#

discussion is fine

grand bloom
#

👍

leaden viper
#

i just pulled after not pulling for a few days and i'm getting this error 2021-08-27 12:39:09 ERROR (SyncWorker_4) [homeassistant.components.recorder.util] Error executing query: (sqlite3.OperationalError) no such column: statistics.last_reset any ideas?

sacred warren
#

drop your database @leaden viper , we had a couple of days a migration that we reverted

leaden viper
#

bah, ok

exotic briar
#

Hello, I have two sensors, one on home power consumption, one on my solar powerplant. So when the solar is producing more than needed by the house, the surplus is given to the grid, when less, the energy is taken from the grid. Is possible to set it in this way?

grand bloom
exotic briar
devout bear
#

I would like to opt for a district heating / city heating functionality in future versions. Widespread in Scandinavia s and western part of Europe

sacred warren
#

We talked about it but there is no device anyone can buy to read it out? It's only diy

devout bear
#

@sacred warren M-Bus is used by the heating company to remote readings. You will need an encryption key from the company but it can be done. But it is perhaps DIY?

sacred warren
#

Yeah. The problem is that not enough people will be able to get that data

#

It can still be added to Home Assistant and make your own energy dashboard

keen zodiac
#

It's just an arbitrary kWh consumption value used explicitly for heating.
Like gas in many countries. Same for central heated townhouses / flats or maybe electrical night storage heating.

devout bear
#

@sacred warren You are right. Did it already

quaint wave
#

Still feel we should be adding water to our energy dashboards, considering the usage of either kWh or Gas m3 is directly related to that. There’s a fine small device avialae for those of us not having it directly read on the smart meter https://smartgateways.nl/product/slimme-watermeter-gateway/ which I am using myself

copper lagoon
vivid pumice
#

Hydro power

quaint wave
#

Yeah, that’s why I referenced it to be better called Resources

copper lagoon
vivid pumice
#

I'm not, but you never know, maybe one (or more) of our users are doing that 🤷😅

quaint wave
#

No, but feeding 4 daughters that use the showers and you’ll understand my stance….

copper lagoon
#

actually enjoy watch videos of people building micro-dams 😄

quaint wave
#

And all of those warmth pumps ( not sure of the English name for those, sorry) we are pushed into using, I fail to understand there’s no urge yet adding it to our Home resources panel …

keen zodiac
#

They don't consume water, they consume electricity which is supported in energy panel.

livid briar
#

The new Energy integration work great. How do I change the colours of the graphs. The on-peak and off-peak graphs are both shades of blue

torn meteor
nimble light
sacred warren
#

@nimble light hey 👋 sounds good

sweet hornet
#

Is this where I can post an idea or feature request for energy?

open wadi
grand bloom
sacred warren
#

We're really busy with the release

grand bloom
#

I imagine! I'll check in next week

#

(If that makes sense)

mystic burrow
#

Anyone figured out how to get gas consumption data into Hass form a dumb NA gas meter?

drifting yacht
#

Hi - I'm looking to integrate my power providers data (rest api), but their readings are first available 48 hours after the fact - Is this a lost cause? I just want to use it to gather the data in the new Energy section.

stone breach
#

and I pointed you to the post that said that they're looking into it

drifting yacht
#

Oooh thought you linked to the group only - sorry 🙂

#

Thank you - guess I'll have to keep tabs on the chatter here, to see if it gets implemented.

vernal echo
reef chasm
#

3 hours after the update 2021.9.1.

how to fix the problem?

torn meteor
eternal sinew
#

Could this Gauge card be included in the next release? The higher the value the better. For example: If it's at 100% it means all of the energy you consume comes from your solar panels and it means you are self-sufficient. If it's above that, it means you're producing more than you're consuming

torn meteor
#

That is about the same as this, but in percentages?

quaint wave
#

still wondering about that orange zone.... it's either consuming or returning is it, no danger zone in between 😉

torn meteor
#

it gets less bad when your are almost neutral

quaint wave
#

I think I sort of get what you say, though imho, this is in fact a binary. Even the popup text only mentions red and green. There's simply no go between, and even if there were, it would be arbitrary.

grand bloom
#

Balloob wrote today to separate my issue—I guess into one per card—but I feel they are all related because an overarching issue is consistency in colors, the values conveyed by the tooltip text, and redundancy in the dashboard. I am happy to separate them but I feel like it would be harder to see the connections and the opportunity to improve consistency and clarity overall.

keen zodiac
#

Self sufficiency is not self consumption and not net return rate.
If you use 5 kWh at night and 10 kWh at daytime and produce 20 kWh at daytime self sufficiency would be 66% (it can't be > 100). Self consumption would be 50% and net return 5 kWh. 3 different metrics.

quaint wave
#

shouldnt the cost and compensation entities be restored when a restart happens on the same day? seems buggy when the frontend says 'unknown' while the history if the entity has a value in the history graph

stone breach
sacred warren
#

Sure we can try and should align colors but we also mainly do

quaint wave
#

Just a thought: there’s no indication about the usage for the top listed devices

#

Because the legenda is only at the bottom (and on mobile there is not even a popup on hover)

vernal echo
#

is there a way to remove a bad stat ? I had a powerplug, report more then 288 MEGA Wh on 1 reading, now my energy dashboard has this reading in week/month display

copper lagoon
#

@granite cloud you should discuss that on #energy-archived but your 2nd bullet has a solution right away

lofty cape
#

is there a way to add fast fake sensor

#

so i can get the energy dashboard running on development

#

?

stone breach
lofty cape
#

untimeError: I/O must be done in the executor; Use await hass.async_add_executor_job()

#

async def async_update(self):
"""Fetch new state data for the sensor.
This is the only method that should fetch new data for Home Assistant.
"""

    response = get("https://6133bf307859e700176a379c.mockapi.io/test")

    print(response)
    self._state = int(self._state) + 1
#

I get the error but i why do i need to call that?

stone breach
#

well, you're doing IO in an async function, which isn't allowed

#

it tells you what to do

lofty cape
#

so this should't be async X?D

#

I feel like a complete moran

stone breach
#

or, follow the instrutions in the error

lofty cape
#

freaking python

#

well i don't have access to hass inside a custom class do I?

stone breach
#

or, use the demo platform that I mentioned

lofty cape
#

okay its kinda working

#

i don't get how to get the energy dashboard running on the dev container

#

I see there is a demo platform as you mentioned

#

but that doesn't support energy? (yet)

stone breach
#

anything supports energy with the right attributes. that's why I said "and customize"

lofty cape
#

I need to do that in configuration.yaml right?

#

I also just found out the zeversolar turns off when the sun is down so requests get cancelled lol

#

Can you help me point me in the right direction?

#

So probably i need to add sensor:
platform: demo
with configuration?

#

sensor:

  • platform: zeversolar
    ip: 192.168.1.118
  • platform: demo
    device_class: power
    state_class: measurement
#

Something like this?

#
  • platform: demo
    friendly_name: Energy Consumed
    device_class: energy
    state_class: measurement
lofty cape
#

@property
def state_class(self):
return STATE_CLASS_MEASUREMENT

@property
def device_class(self):
    return DEVICE_CLASS_ENERGY

@property
def last_reset(self):
    return self.hass.util.dt.utc_from_timestamp(0)
#

can someone explain me why my entity is not shown at the dropdown for solar panels?

languid shore
lofty cape
#

hmmm

#

i did set:

#

@property
def unit_of_measurement(self):
"""Return the unit of measurement."""
return ENERGY_KILO_WATT_HOUR

#

@languid shore

lofty cape
#

self._attr_state_class = STATE_CLASS_MEASUREMENT
self._attr_device_class = DEVICE_CLASS_ENERGY
self._attr_unit_of_measurement = ENERGY_KILO_WATT_HOUR
self._attr_available = True

#

still doesn't show up....

lofty cape
#

state_class is not showing up at attributes maybe that is the issue? how do you correctly set a state class?

#

it's fixed

#

pffff

#

class ZeversolarSensor(SensorEntity):

instead of

class ZeversolarSensor(Entity):

lofty cape
#

What kind of measurment do the solar panels need for the energy tab?

#

daily gained kwh

#

or just keep the current wattage up2date?

keen zodiac
lofty cape
#

So i should use the float that goes up and resets daily

#

not the one that gives the current solar generation

#

because that raises and drops all the time?

lofty cape
#

something went terribly wrong XD

#

it says i made 30kwh today

#

should be 8

#

should i put it on measurement?

#

instead of total increase?

keen zodiac
lofty cape
#

I found the bug...

#

there is a bug in my inverters api

#

when it counts the gained kwh per day it goes like this in the API:

1
1.1
1.2
1.3
1.4
...
1.11
1.12
1.13

#

they do never return 1.01, 1.02

#

lol

#

And that makes the total_increase resets itself everytime when it drops

vernal jacinth
#

Are there any plans to implement pricing info in the energy panel?

#

As in visualizing pricing per hour?

willow bronze
#

I have a suggestion. It would be nice if we could associate some predefined energy consumption for every switch.

quaint wave
#

any chance we would be allowed to PR the currency code for energy tariffs to use , and prevent this frontend issue: Invalid currency code : €/kWh at new NumberFormat
#frontend-archived message

#

using €/kWh in the frontend is so much nicer than EUR/kWh (and it does work in the energy dashboard)

eternal sinew
#
  unit_of_measurement: W
  state: >
   {% if is_state('switch.device', 'on') %}
      [DEVICE_POWER_ON_STATE]
   {% else %}
      0
   {% endif %}```
willow bronze
eternal sinew
#

no, you can then create a riemann sum integral of the power sensor

cobalt atlas
#

I have been using HA to monitor my Solar output, Smart Electricity Meter import and export of energy, control EV charging and house heating etc for years now.
I would like to use the amazing new Energy module but I have a challenge. My SmartMeter (Smart-Me) data is being brought into HA using a RESTful sensor. As such, it is not visible in the dropdown choices for 'consumption' and 'return to grid'. Is this something that I can workaround or does it need to be added as a feature request to allow RESTful sensors to be used?

solid spruceBOT
vivid pumice
cobalt atlas
#

Are you confirming that this is not a dev requirement?

#

From the documentation, I was lead to this group

vivid pumice
#

Unless you are making changes to the integrations involved I can confirm that this is not the correct channel

solid spruceBOT
#
The topic of this channel is:

Development of energy related functionality for Home Assistant.
For support related questions please use the #energy support channel.

worthy ocean
#

How does this work? The energy in the battery is also from Solar so basicly that percentage is a little bit a discussion i guess?

#

also, i have real time information on solar in and output in watts, would be great to see real time data as well if possible in that energy distribution grid

vivid pumice
#

And what integration is you developing/adjusting?

frozen perch
#

One of my customers just received this error on the energy panel:

sensor.home_general_energy_price (-0.06)```

https://github.com/madpilot/hass-amber-electric/issues/24

Negative prices are very much valid, at least in Australia. Yes. The generators pays the consumer to consume energy
#

I'll pop in a issue in github

void cypress
sacred warren
#

@void cypress it's really cool

manic rivet
#

@frozen perch the issue is a bit misleading, what OP has a problem with according to the screenshots is that the energy sensor briefly drops to 0. This is interpreted as the start of a new billing cycle.

#

then Home Assistant itself complains about the negative price, but that will only affect the total cost sensor which there are no screenshots of

#

is your custom component providing both the energy sensor and the price sensor?

#

if it is, is there some case where the state is set to 0, e.g. if you can't reach the energy provider's API, before you got the 1st update from the API etc.?

#

Or the hass-amber-electric component is all about the prices, not the energy usage?

frozen perch
#

It’s only prices

void cypress
# sacred warren <@!384303876204920833> it's really cool

Thanks a lot @sacred warren, did my best to make things as easy as possible for users. The component really shines in the LUT mode (which are real measurements taken of light bulbs in every possible brightness / color setting)

quaint wave
#

before creating a FR: is there any dev horizon on live updating/reloading configuration for these custom components, ( and utility_meter: entities for that matter)? Would save many many restarts..

manic rivet
#

support for negative energy price requires state_class total, it will probably have to wait for HA 2021.10

#

hopefully the joy of being paid for using electricity outweighs the annoyance of HA complaining about it 🙂

frozen perch
#

And I don’t need to do anything in my integration?

manic rivet
#

Right, Home Assistant's built-in energy cost sensor will complain about negative prices and the cost graph in Home Assistant's energy dashboard may get wonky too

#

But that's not your fault, and you don't need to do anything in your integration

frozen perch
#

Excellent! Thanks for your help!

manic rivet
#

I found one additional issue, the energy price sensor validation requires the state_class of the price sensor to be total_increasing which makes no sense

#

@frozen perch is your custom component respecting that?

frozen perch
#

No, it has no state_class

#

Just a device class of DEVICE_CLASS_MONETARY

copper lagoon
#

@manic rivet sorry to diverge conversation, but can the total costs sensor reset ? (I was planning sensor that tracks your energy bill, therefore reseting periodically)

manic rivet
#

thanks @frozen perch 👍

#

@copper lagoon yes it can and it does. the total cost sensor relies entirely on the meter cycle functionality, it's only useful for statistics

#

at every startup of Home Assistant it will reset to 0, it will also reset if the underlying energy sensor was reset

copper lagoon
#

I'm talking about the total cost

manic rivet
#

yes..?

copper lagoon
#

I'm saying this because our meters are not aligned with month start

manic rivet
#

are you talking about the automagically spawned cost sensor in energy/sensor.py (that's what I was talking about), or about something else?

copper lagoon
#

when you define "consumption" you choose the energy sensor and a "total cost" entity

#

I'm talking about this total cost entity

#

not the automagicaly cost sensor which is not relevant in Portugal

manic rivet
#

that total cost entity can also be automatically generated if you instead choose a fixed price or a price entity, that's what I'm talking about 😄

#

for a Portuguese, or other, total cost sensor, you can do whatever you want, as long as you set state_class to total or total_increasing

copper lagoon
#

OK... so then there is a bug because I got negative cost 🙂

manic rivet
#

maybe your sensor is buggy? 🙂

copper lagoon
#

it happened after the total cost reset

copper lagoon
manic rivet
#

hehe

#

could you share a dump from the statistics table for the sensor?

copper lagoon
#

I'll send you in pvt

manic rivet
#

thanks

#

are you using the last_reset attribute, or is this atotal_increasing sensor resetting to 0?

copper lagoon
#

at the date of reset (20 August) I was in 2021.08 so using last_reset

manic rivet
#

OK. last_reset is a bit difficult to use; last_reset MUST be changed together with the 1st state of the new cycle or it won't work

#

do you still have states available from August 20th?

odd saddle
#

has anyone kicked around the idea to add "demand" to the energy panel?

#

would need a max stat on the grid power consumption sensor

warm grotto
#

hmm, is this 'dropping' or 'increasing' ?

2021-09-09 12:12:01 INFO (Recorder) [homeassistant.components.sensor.recorder] Detected new cycle for sensor.dsmr_reading_phase_power_current_l1, value dropped from 1.0 to 2.0
2021-09-09 12:12:01 INFO (Recorder) [homeassistant.components.sensor.recorder] Detected new cycle for sensor.dsmr_consumption_gas_currently_delivered, value dropped from 0.0 to 0.008

quartz monolith
#

@manic rivet Since upgrading to 2021.9.5, a custom component which I am looking into, is generating warnings Entity sensor.fronius_smartmeter_energy_ac_sold_compensation (<class 'homeassistant.components.energy.sensor.EnergyCostSensor'>) with state_class measurement has set last_reset.

#

Is this related to the recent PR changes?

manic rivet
#

Yeah

#

It's not a problem though

quartz monolith
#

@manic rivet Ok so no code changes needed and this warning will disappear in a future home assistant release?

manic rivet
#

we could block the warning in a hotfix, but I'm not sure it's worth the trouble

quartz monolith
#

probably not, although it was causing some git issues to be filed on some custom components

manic rivet
#

NVM, I thought that was fixed but it's not (the log has swapped the arguments)

#

the issues on the custom components are correct, state class measurement + last_reset is deprecated

#

what's new here is that the energy cost sensor is now also using a deprecated feature 😅

warm grotto
quartz monolith
#

Yeah we already updated the component to use STATE_CLASS_MEASUREMENT , but new issues were getting filed and the devs thought it was just annoying users who hadn't updated.

manic rivet
manic rivet
warm grotto
quartz monolith
frozen drift
#

anyone here have cost sensors that are being generated by the energy integration? e.g. you have energy sensors but I think manually have to specify a cost?

#

nvm Paulus set me straight

glad bough
#

hi since 2021.9.5, rainforest integration with a eagle 100 not displaying energy per hour properly.

#

any clues?

manic rivet
#

I'm not sure what to do about it 🤷‍♂️

copper lagoon
#

very common @manic rivet ten's of issues related to templates where users cast states to int/float and in case on the sensors is unavailable the value drops to 0 causing issues with utility_meter

odd saddle
#

just to be clear, if the availability on a sensor is false utility_meter won't attempt to pull it's value right?

sacred warren
#

unknown/unavailable yeah

#

the issue is that the built-in default float filter in Jinja is returning 0

odd saddle
#

i've done something like this to filter out random upwards spikes:

   availability: "{{ states('sensor.power_meter_power')|float < 30000 }}"
quaint wave
#

It would be a way yes, and I suggested to add that option to the much used platform mqtt: which many use for their energy sensors. It would prevent us having to write all template sensors. I got flamed though….

brazen surge
sacred warren
#

there is no integration for so no

odd saddle
quaint wave
#

Sure but we can’t use that for a template like yours can we?

odd saddle
#

i'd consume the mqtt into a template and then use the template sensor as the feed rather than the raw mqtt

quaint wave
#

Yes, suppose we can do that now. Still this is exactly what I try to prevent: having to create some 50+ extra template sensors, where we could have an ‘validity’ template in the integration.

limpid zodiac
#

Has anyone else experienced the HA energy tab not showing up in the side bar? I want to use the new energy management dashboard but can’t find it. I’m running the latest version 9.5. Any suggestions?

stone breach
solid spruceBOT
#
The topic of this channel is:

Development of energy related functionality for Home Assistant.
For support related questions please use the #energy support channel.

keen zodiac
#

Hi 👋! Can a sensor representing an energy tariff have the native_unit "EUR/kWh"? Or should it be "EUR" and use state_class "monetary"?

hardy cipher
#

It is an optimization algorithm that will provide HA with the information on when the water heater, the pool pump, or whatever consumption you want to control should be turned on or off

#

So it's an optimized energy management

#

I have been working on this on my spare time for a while and with the new energy dashboards in HA I just thought that this will be a really nice complement

brazen surge
quaint wave
rotund stirrup
hardy cipher
# rotund stirrup <@!781521364431405067> Cool, I will take a look 👍 I also do optimization of he...

I think that that should be the way to go in the future, to find a standardized energy optimizer. My code is a first approach. It is based on forecasted values of PV production and load consumption. My model does not include thermal modeling that could use the outside temperature forecast as an input to the optimization. However this is in my TODO list to further improve the package. I have some ideas on how to do this based on others work (for example the package OMEGAlpes), but if you could share how are you achieving this it could be great. Even if your solution is very customized to your place, we could surely find a way to put it in standard fashion. In any case it was the goal of my package, to be standard and easy configurable.

quaint wave
#

for the energy distribution panel, is hold and tap action on the roadmap?I keep clicking these so I can navigate to some detailed views (solar view, power view etc). It feels really un 'HA' right now, not being able to click for more-info... let me know if this requires a FR?

vivid pumice
marsh lantern
#

Hi, I have been in contact with Klaas who developed the Energy Dashboard. I told him that I am very interested in having a Power distribution illustration, similar to the Energy distribution which is part of the Energy Dashboard, but it should show power, obviously, in real time. He told me to ask what you think. Have anyone considered that? One can realize such thing with https://github.com/reptilex/tesla-style-solar-power-card, but I think Klaas' Energy distribution is nicer.

open wadi
#

Klaas is 🙋‍♂️

lyric berry
sacred warren
#

We don't currently do power. Also can't just drop power in an energy dashboard. It needs its own thing

devout bear
#

@sacred warren Concerning the wish to have District Heating included in the energy dashboard, there is now an “ out-of-the-box“ solution for a widely used meter from Kamstrup https://github.com/golles/ha-kamstrup_403.
Could that make you reconsider?

sacred warren
#

I think the concensus has been that district heating should be filled in as the "gas" usage for now

#

that one will be allowed to use kWh in the next release

devout bear
#

Great. Looking forward. Could it be possible to rename the “gas” text then?

sacred warren
#

nope not right now

dapper wolf
#

pardon me if its been discussed (search didn't find anything but i'm new to Discord)... any interest in adding water usage to the "energy" page? I can read my water meter the same way i'm reading gas, but no built-in place to visualize the data.

I suppose "energy" would then be misleading. "utilities" would be a better name for such a dashboard.

Or maybe there needs to be a new "utilities" page that visualizes utility meter entities.

Just spitballing.

sacred warren
#

We have no plan on adding water to energy for exactly that reason

#

however, statistics are being generated for water and you can add the water statistics graph to your Lovelace dashboard

whole oracle
#

So far I love the new energy feature!
Just a quick idea / feature request:
Could you display the percentage and absolute values of used solar and grid power (fossil/non-fossil) when hovering over the home circle? Would be great!

lyric berry
whole oracle
dark moat
#

Is there any (more experienced) dev who could possibly help me add Loop into HA (we could opensource it)? #energy-archived message

marsh lantern
marsh lantern
pulsar hamlet
#

Hey guys. Mysa thermostats have energy monitoring!! But for some reason the data doesn't import into home assistant. Anyone know how to make this happen?

solid spruceBOT
#
The topic of this channel is:

Development of energy related functionality for Home Assistant.
For support related questions please use the #energy support channel.

devout bear
#

Running new beta. Using the kWh unit to record my district heating into the gas integration. Works ok But Fixed priced is still in pr. M3 instead of pr. KWh

zealous barn
#

Report it in the #beta channel.

lilac fiber
vivid pumice
quaint wave
vivid pumice
quaint wave
#

sorry, the image disappeared, once again then. I'll let you decide. It was reported before, but now seems to have re-entered during beta, so it is valid in any of these channels and Ill post a link there

warm grotto
#

Hi, I saw the following in my log, should I indeed create a bug report for it or is it a known 'issue'?

2021-10-05 09:12:00 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.dsmr_reading_electricity_delivered_2 from integration dsmr_reader has state class total_increasing, but its state is not strictly increasing. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+recorder%22

worthy ocean
#

There seems to be a little calculation issue in the energy dash. It does not calculate the right thing when i deliver energy from my batteries to the grid which is something im doing on a daily basis. As soon as the energy from the battery is higher than the energy from the grid, the home usage is being equalled to the energy from the battery

#

can anyone point me in the direction where those calculations are done? I would like to see if i can fix this thing

brisk thistle
#

If anyone has some time to take a look, any help would be greatly appreciated:https://github.com/SurferSD/chargepoint Looking to complete the integration. I've already captured the needed creds via MiTM and have updated the servers to use the ANYCAST servers rather than Canada specific. Doesn't look as though the original developer of the integration ever completed the YAML setup. Sadly, there is no other HA integration for this line of Home/Public EV chargers and they have not yet implemented OCPP. Would really like to see this in my energy integrations to know if I'm using solar or grid to charge vehicle.

gusty blade
#

hi all. iam trying to figure out what is causing this problem when i try to add this sensor into energy monitor here is my error entity_unexpected_device_class

#

sorry for this small picture

#

and i get this error in logfile The unit of sensor.load_5m (None) does not match the unit of already compiled statistics ( ). Generation of long term statistics will be suppressed unless the unit changes back to

zealous barn
golden cape
#

I have two inverters on my solar system, that report production independently. Any chance I could get the Solar Production view to stack the values rather than currently having them side by side? Where should I raise this as a feature request?

keen zodiac
stark pollen
#

Greetings!
Where would you start from to develop a solar panel system and storage, which could produce enough and necessary energy given a certain type of lifestyle? so based upon your life needs "lifestyle" / " cost of living ", can give as a result an average of what you would need to carry out a system that can make you live without paying the bills.

granite cloud
#

Any chance that liters get allowed for gaz consumtion ?

torn meteor
#

That is an easy conversion, your integration should do that probably

granite cloud
#

no, not that easy... It's an underground propane tank filled by truck. It contains liquid propane and price is also per liter, so would really prefer if liters get accepted.

#

to make the calculation, 1l of liquid propane is equivalent to 0,73m³ natural gaz

plucky comet
granite cloud
#

@plucky comet indeed, and as measurement and price are in liters of liquid gaz, I would prefer using liters in the dash...

ashen parrot
# granite cloud to make the calculation, 1l of liquid propane is equivalent to 0,73m³ natural ga...

Hi you did not answer to my question raised in #energy-archived : where do you find this ratio 1 l propane =0,75 l natural gas ? For me propane has a far higher energy/volume than natural gas
Understood: you compare liquid propane and non liquid natural gaz. What is important is the measurement method . I would be interested which physical measurement system you have to measure a number of liters

torn meteor
#

We have no plans to support this at this moment

ashen parrot
torn meteor
#

monitoring gas in liquid form

ashen parrot
granite cloud
#

@ashen parrot measurement is with a kind of gauss (analog) sensor mounted on the tank, read out with ESPhome

torn meteor
ashen parrot
floral tapir
#

Hi, I really love the energy feature. What would make it perfect (at least for me) is if I would could see important devices in the energy distribution visualization as well (e.g. heat pump or hot water boiler). In my appartment I monitor the energy from the grid and the energy to the hot water boiler. Of course I see the hot water boiler in the individual devices viz - but having this or a heatpump energy consumption in the energy distribution viz would improve my user experience. Have you thought about it?

cedar inlet
#

someone here with a GUNTAMATIC Heating ?

devout bear
#

@torn meteor But the missing gas price sum is a clear bug. Won’t it be fixed either?

devout bear
#

@torn meteor I measure my district heating through the gas feature of energy dashboard. Works fine but when I try to use the fixed price feature (price pr.kWh ) I cannot get an amount. The dashboard just shows zero cost

torn meteor
#

You got an issue open for that?

devout bear
devout bear
#

@torn meteor should I make a new issue?

torn meteor
#

Yeah, but in the core repo please

devout bear
#

Ok

solar heart
#

Hi, I noticed that when you hover over the (lovely) graphs on the energy page, the popup has inconsistencies in the words used - sometimes it has the name of the data source, sometimes something nicer. I don't know how to screenshot this but I hope it is clear what I mean!

brisk thistle
#

If anyone has a ChargePoint EV charger that you would like to see in Home Assistant, please shoot me a DM. I have a WIP that I could use some assistance with.

zealous barn
rugged bane
#

I have a oil heater which consumes oil, measured in liters, with a corresponding total_increasing sensor. Any pointers of what I would need to adapt in the energy dashboard to add it there?

shrewd escarp
#

Is there a plan to add cost per device?

vernal jacinth
#

Hey devs! Just wondering... Have you thought of adding prices to the energy frontend? Two use cases:

  • It makes sense to visualize pricing to see if the home is able to match usage with lower pricing during the day.
  • Future prices! Visualization makes it much easier to make decisions on energy usage in the near future, for example, when to take a shower or when to wash clothes.
zealous barn
golden cape
eternal sinew
#

What happens if you have two forecasts for two Solar Systems?

half vector
#

Home Assistant assumes a single energy system for a single home. If your two solar systems are interdimensionally connected in such a way that you cannot share the energy and just calculate a sum forecast... how are you communicating the results anyway?

eternal sinew
#

I can calculate a sum of the solar energy produced, I just decided to leave them separately to check how much each side of my roof produces at a given time

half vector
#

🤦

#

OMG. I thought you were making a joke about two astronomical solar systems

#

Like on Arrakis or Tatooine or something.

#

Or you just had a very long cable to a solar farm around Betelgeuse

#

I'll go do something else now and let you grownups carry on your serious discussions...

eternal sinew
#

😆

torn meteor
candid solar
#

How about an sma inverter with two strings ... one facing NE(South Hemi morning), one NW (South Hemi afternoon) - different peaks and timing - effectively a broad curve rather than a sharp peak ... I just set to North, but only have a couple of days data and its cloudy 😦 so I cant tell how good the forecast fits reality

torn meteor
#

You can add 2 forecasts to 1 solar source

copper lagoon
#

in the solar forecast integration the "Dumping factor" is a float, yet I cannot setup a float value in the UI....just me?

open wadi
#

I think there was an issue about that 🤔

copper lagoon
#

thought it was a problem in my custom_component, but oficial components have the same issue...

#

which browser you use @open wadi ?

open wadi
#

Chrome

copper lagoon
#

me too ... and you can type a float without any issue ?

ashen osprey
#

Is there a way to prevent a generated EnergyCostSensor from reseting everytime hass is restarted?

floral tapir
sacred warren
#

Yes

#

hmm looks like the blog post hasn't been published yet

#

it's been merged though

floral tapir
sacred warren
#

yes

#

there is example code in that PR that you can use

#

it needs to be part of a an integration

floral tapir
wet root
#

Ive got some energy hardware that I'm doing the integration for, and it's all working out ok. But I'm curious what's likely to be "best" as far as data interval. I'm currently sending 1minute data, but I also have 2second interval, and 5/15/60. I'm already letting people pick betweenthe 1/5/15/60minute data, but would there be much call for energydata at a 2 second update rate? it does let you do interesting automations on it, but it's a LOT more data. is that rate somethingusers would expect? what sort of rates are common for other energy sources?

untold pilot
# wet root Ive got some energy hardware that I'm doing the integration for, and it's all wo...

That's a lot of data. I can't speak much for the HA ecosystem, but in the monitoring platform we use in our company (and a pattern I have seen with others), the data fairly quickly gets averaged into larger time chunks. 1s data gets averaged into 1 min data points after an hour (this happens at various levels for us via Influx). In the electric utility world (in US) 15 min data is some reasonably expected increment for customers to download their data (and also expected increment for modeling software). Hope that's useful

#

I'm seeing something weird in energy dashboard that think may be a dev issue. For about last 10 days dashboard is showing a massive negative energy spike at midnight. Upon closer examination, it seems that spike is the equivalent to total of previous day consumption. I am using Sense to provide "daily usage" value to feed the energy dashboard. At midnight, value of daily usage goes from the day's total down to zero, which seems to be registering as a negative value in the dashboard for that time interval. Anyone else seeing that? Any suggestions to fix?

wet root
#

it is definitely a of data, so I guess the question is a) what's HA doing wrt rollups on data right now? and b) would anyone even want that frequency of data?

#

it's almost definitely not useful for energy but it's an interesting rate for getting power/current for taking action on.

#

this is integrating to the measurement devices themselves, so there's no concerns with cloud data pulling, it's just "what's interesting" for a user.

tough ridge
#

All my energy sensors are showing consomption in my energy control dashboard in Lovelace, but since this morning (since last core update?) no energy consumption in showing in the Energy module (no grid consumption, no devices comsuption), 0 kWh so far for today... What can be wrong?

lethal hawk
#

Hi Irelands been gray with no Co2 / fossil fuel data for a good while now, but I have values direct from Eirgrid that are updated every 15 minutes is there any way to substitute the Co2 polling for my alternative source?

fallen walrus
#

Hey all! Long time dev but HA newbie here! Looking to create and contribute my first integration that seems to be missing. But not sure where to start. Hoping someone here can point me in the right direction. I'm looking to create a Solar Panel integration for the "Owl Intuition" I'm managed to get the UDP data collected in NodeRed and reported on a dashboard. But I want the generation and consumption data integrated in HA. Is there a good existing integration for another system I could use as a sample?

keen zodiac
fallen walrus
#

Great thanks.

pearl cosmos
#

Hi, is there a way to style the main graph of the energy card ? It's in a <canvas>, so i think it isn't possible right ?

sacred warren
#

Not possible Right now

next tartan
#

New to Home Assistant & I recently had a new power meter installed on my house. I found a community thread based around my exact meter model. How can I help you all integrate this device in your ecosystem?

next tartan
#

I visited the site last night. I wouldn't call myself a developer, but I have a couple friends who I can probably call on to help.

keen zodiac
gritty sparrow
#

I am looking to collect energy data from my supplier into HA. They provide an API that gives 30 minute usage data, but not live - e.g. at 3am each day I can get all the data from the previous day. There is a custom integration that pulls the data from the API, but it shows all the day's use at 3am. Is there a way to pull the data into HA in hourly chunks (the API can provide the data in this way)

#

It is Octopus Energy in the UK.

knotty hatch
knotty hatch
#

Hey all, my smart meter has 2 energy monitoring values (Energy Today & Energy Total.. both in kWh), which one should I use to track its energy usage in ha?

vernal jacinth
#

Is there any development of the energy panel? Are there any concrete ideas under consideration? I feel like the energy panel was added as a huge step forward in home/energy visualization, but then just... stopped!?

copper lagoon
#

@vernal jacinth this is the dev channel 🙂 you are welcome to create PR to add new features 😉

vernal jacinth
#

Simply asking (in the dev channel) if there is any development being done on the energy panel, as it seems a bit stalled… That’s a fair question, no?

copper lagoon
#

it's mostly up to dev's (we) to propose new features

half vector
#

☝️ Inclusive "we"

vernal jacinth
#

So asking about the ideas and the future of the energy panel is fair game in the #devs_energy-archived channel?

copper lagoon
#

It's fair to discuss ideas and features, I'm just stressing that ideas/features must be implemented by anyone who wants them - this is how OSS works 🙂

vernal jacinth
#

Then we are all in the clear! 😁

#

I am in no way able create features (for anything) but I have a few ideas on how the panel could be improved… So I am just gonna jot them down here… Maybe something is already underway regarding some of this, maybe not! The energy panel is awesome already, but has a lot of potential…

#

It would be awesome to see the percentage of the total consumption used by a single device.

#

I’d love the ability to see other data compared to the energy usage, for example temperature data.

#

It would be great to see electricity cost by the hour on top of usage by the hour.

#

And future pricing to enable a user to plan ahead better to avoid spikes in the energy cost.

stone breach
#

Seems like

solid spruceBOT
#

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.

stone breach
#

Then. Otherwise your post immediately scrolls offscreen, as it just did 🙂

sharp remnant
#

Looking at the issue with this graph where there's a spike at the start of the day, I think it's due to the sensor only updating every 5 minutes so if it updated at 11:59PM, then the reading at 12:00AM is from the previous day

#

is there some attribute that can tell it that it hasn't been updated?

vernal jacinth
hazy iron
#

My tool turns automated meter readings into sensors in HA. One of the sensors I am trying to create is for the consumption value of the last interval (if the meter uses IDM or NetIDM protocols then it reports the consumption for the last 27 or 47 intervals depending on the protocol). I figured this would be useful to people but I'm not sure how to create this sensor. It seems like it should have a state_class of measurement but its also most likely going to be device_class of gas or energy which seems like a problem

#

I suppose it could be state_class of total but I'm not sure how to set last_reset. It's not an ever-increasing value and meter readings don't have a date/time value for when the interval began.

#

oh wait nvm, I think it does give the start time, it just does it oddly. ok I think I got it then, sorry about that!

crimson sentinel
#

Hi all, I've developed an energy dashboard for my home (input: timescaleDB, continuous aggregated data so the data is near-realtime but also cpu-friendly, output: Grafana.). I've been thinking a while if i can help with some of these idea's for the official Energy dashboarding in Home Assistant (i've 10 years experience in BI). If anyone of the dev-team would be interested, let me know 👍

floral tapir
#

that looks cool

open wadi
#

Like that layout 🙂

rotund stirrup
snow sage
sharp remnant
snow sage
#

I used this for mine and it's been working without issue.

  • platform: template
    sensors:
    kwh_solar_production:
    unique_id: "Solar Power Production Measurement"
    value_template: "{{states('sensor.solar_production_kwh') | float }}"
    unit_of_measurement: kWh
    attribute_templates:
    last_reset: "1970-01-01T00:00:00+00:00"
    state_class: measurement
    device_class: energy
sharp remnant
#

That's inconvenient for most people

snow sage
#

Alternatively, you may be able to just make it a simple counter that never resets. I haven't tried that though.

sharp remnant
#

maybe the last_reset attribute can be used

snow sage
#

Worth a shot. I fought with getting it to work for a couple of days when the energy page was first added, but I'm far from adept with how everything had to be formatted and configured.

sharp remnant
#

I wonder if the energy graphs will honor that attribute

snow sage
#

Worst case, you should be able to copy and paste my template, and just rename the unique_id to whatever you want, and the value_template to whatever your sensor is that's measuring the power.

sharp remnant
#

I'm not so much interested in a workaround, I want to fix the component for everyone

snow sage
#

You'll need to chat with probably RobC on it. As far as I know, my config isn't the work around, it's the current proper implementation. I just try to help people troubleshoot the little bits that I can. I know next to nothing when it comes to the actual dev side.

sharp remnant
#

yaml is never the "current proper implementation" these days

gritty sparrow
#

My energy provider exposes meter usage data through an API. However the API only updates once every 24 hours, with the previous day's readings (every 30 minutes, hour, day). Is HA limited to adding a daily reading once a day, or is there some way to get the "historical" data in once per day? I'm looking to help develop the integration at https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy so it adds hourly data in a batch. Is this even possible currently?

crimson sentinel
untold flame
#

So the smart_meter_texas script(s) just got updated to v-0.5.0, which includes a new async get_15min(). I'm trying to write up how to import this daily data (similar to the question from above) to report on yesterdays surplus generation (for those of us that both have texas meters, and use solar). as this is my VERY first time trying to contribute to this project, i was wondering what to add to the existing SMT integration to make use of this data.

lone thunder
#

Hello. I noticed a bug in energy regarding individual devices. I have a fibaro wall plug in the individual devices. When I select days or months the total kWh is correct. But when I select month or year it’s multiplied by 10.

#

The wall plug is connected to my synology NAS. And has a power consumption of 50 watts. So a little more then 1 KW a day. In days and weeks this number is correct.

#

This is days.

#

And this is month. As you can see in months the value is higher then my total grid consumption

#

It should be 6.** kWH instead of 60

#

Ps month is not complete because I got my p1 power grid meter since last Friday.

copper lagoon
#

@lone thunder please open a new issue on github

lone thunder
#

@copper lagoon which GitHub? Is there a special one for energy?

royal sequoia
#

Hey, so ever since the release of the energy system I've been thinking about how cool it would be to be able to schedule energy intensive home appliances, like a clothes dryer, to run when the electricity price is the lowest. From my understanding it's not extreamly common for hourly tariff prices being available to the general consumer like it is here in Sweden but atleast high and low tariffs seems to be more common.
Has there been any discussion about adding support for future prices to the home assistant or is this not common enough to have warranted any attention yet?

#

(sorry if this is the wrong channel to ask these questions)

floral tapir
rotund stirrup
proper spear
#

Hello everybody, can anybody give a short update what's the state of Tuya energy meters support on the energy dashboard? @full spade mentioned here https://github.com/tuya/tuya-home-assistant/issues/307#issuecomment-950190567 that support has been added in 2021.11, but it's apparently not the case. Is there an active github issue/pull request on this issue or are there some technical obstacles why this can't be implemented?

full spade
#

They report power usage

#

Not energy

#

You can use the integration integration to make energy out of that

#

Tuya simply doesn’t provide the used energy value for their devices in the cloud api

proper spear
#

thanks for the clarification. however i imagine that the "integration" part could be done automatically by the tuya integration based on the provided values...?

full spade
#

No it cannot

#

Home Assistant provides devices as is

#

It’s up to you how you utilize that

#

And honestly, if you are looking for some decent energy monitoring, you might want to consider some alternatives to Tuya stuff

proper spear
royal sequoia
untold nimbus
# royal sequoia Hey, so ever since the release of the energy system I've been thinking about how...

hey, I live in the US & my utility also offers rate plans that would benefit from this sort of thing. I'm still building the hardware for this, but my approach to this is to schedule loads that are easy to turn on & off, rather than ones that aren't. Rather than scheduling the clothes dryer, I plan to focus on:

  • water heating, using a thermostatic mixer to ensure the same water temperature comes out of the hot water tank regardless of the temperature of the tank
  • air conditioning/air heating, by super cooling & turning the HVAC system off during periods of high demand.

I expect to be able to dynamically change the thermostat value for those two things depending on the current power demand. I plan to drive that using Home Assistant, and use ESPHome on the controller devices. I don't expect to need to implement any new plugins or anything like that.

whole pike
# full spade And honestly, if you are looking for some decent energy monitoring, you might wa...

Using LocalTuya it is possible anyhow to monitor for instance two plugs (one is the 3D Printer and the other is the Washing Machine) anyhow I agree that Tuya devices are not really the best for the power monitoring usage (are quite difficult to configure in HA), therefore I ordered some Tasmota pre-flashes plugs that should arrive soon (crossed fingers I hope those will work better). 🙂

full spade
#

They will work better 🙂

mild quail
#

Not sure if this is the right channel.
I have a Home Battery system which has an Android/IOS app but they refuse to give me any kind of API/SNMP or other capability to collect information. I have been thinking that I can probably create a web scraper given that all the info is on a website however I would like to ask here if anyone else has a way of getting Solar/Battery electrical info without web scraping?

sudden warren
#

are the values of the energy dashboard available? As sensor or entity? I would like to reuse them to sent them per mqtt to a other device.

mild quail
#

@sudden warren are you replying to me? currently there is no sensor. I would have to write something.

sudden warren
#

@mild quail It was more a general question, if we could read the values what are calculated by HA already. So we can reuse them again for other things. I am also refering to the long term values, as it would be nice to also get these values to use them somewhere else.

untold nimbus
gritty sparrow
# crimson sentinel What difference do you mean between [Is HA limited to adding a daily reading onc...

Let me try to explain - presently, with the integration with Octopus Energy, HA receives a daily value for energy consumption. This is recorded as the consumption at the time the value is received. This results in the consumption chart only showing a single bar for that consumption at the time it was received (3am the day after the consumption happened).
The Octopus Energy API can supply consumption figures for every hour during each day instead of the total. But it only provides those figures once per day, at 3am the day after the consumption has happened.
So my questions is, if data is only made available once per day, can HA only accept a single figure, or can it accept 24 figures and then record them for each hour of the previous day?
Is this something that can be resolved by changing the integration, or is it a current limitation in HA?
The pull request linked by @frozen perch seems to address this - and the example data looks very similar to the data from Octopus Energy API - I guess a lot of energy companies will be doing similar.

void rover
#

Is there any plans to include more "sources" to the dashboard?, right now we have Grid, Solar and Gas I would like to see the possibility to add District Heating or replace Gas with District Heating (user setting).

full spade
#

District heating can be added as gas already

void rover
full spade
#

Renaming that is not possible at this point

void rover
#

Then that is my feature request 🙂

slim tendon
#

Gas can be consumed for more than just heating

void rover
#

That's true, but then gas takes to much focus on the dashboard, in a case when maybe gas is used for your owen then a individual device should make more sense.

But I guess that the dashboard is created in a country that uses much gas and where district heating is not available, so to make this dashboard useful customization is necessary.

I think it's better to leave the Gas unchanged and add a new possibility to add District Heating in the same way as Gas, and if you don't configure it then it will not make any impact on the dashboard, like it is right now with Gas.

sterile mural
#

hello everyone!

#

I am John, Solution Owner at EnergyWeb Foundation

#

We at EnergyWeb are very interested in this topic and potentially willing to collaborate on development

elder vapor
#

Is there any reason water usage should be considered in the Energy dashboard? ... Technically not an "energy" source - but is a resource and tied in with utility companies... I'd love to see my water usage as well as my energy usage in one view ... but I'm sure you've though this over before...

void rover
#

I think that is a great idea, everything that you put in a nice overview or graph, makes it more simple to reduce the consumption.
I don't know if there is any plans for later realses and functions but to add more sensors to the dashboard seems like a good way to keep this dashboard modern.

prisma eagle
#

are there plans to include a water meter into the energy dashboard? I think this one is the only thing missing from what goes "into" the house?

elder vapor
#

Besides water usage - another thing I'd like to see from a solar perspective is a KW reading of current generation ... I find it a little confusing it uses daily statistics ... and it would be nice to just get a snapshot of now 🙂

#

Of course Energy != Water ... so it maybe isn't fully to go in the board 🙂 ... unless I'm running a hydropower setup somehow

elder vapor
#

Oh another idea!!

Could we get hour/by/hour weather on the energy panel so i can corolate solar w/weather?

mild quail
dusky yarrow
#

Hello guys, I’ve got a small question : I’m looking to use the Daily / Weekly / Monthly and Yearly total energy consumption and cost that you get in the « Energy » tab but I can’t find any sensors that stores those informations. Is there an easy way to get this data out (it’s to use it in a telegram bot)

torn meteor
#

They are provided by the statistics integration, it is not just a sensor you can get the value of

dusky yarrow
#

So how can I extract those values ?

radiant dawn
#

I wanted to ask, in the energy side bar/menu, it says I have no statistics, but this is wrong. Because I have forked from a custom integration which reads the values of my home's "global load control" and I modified the custom integration's code such that it returns the correct state class (either measurement or total_increasing) for each read value the domotic system offers. Yet in the energy menu it still says I don't have any consumed energy statistics, what's up with that?

#

After having done some testing, the state_class property doesn't even get called to assert what the state_class is

naive forge
#

Since update to first 2022.2 beta my energy tab shows no data. Sensors for energy works good as before and have no issue with them. Entities for collecting data are also visible in energy tab configuration panel. I don't see any information about energy in changelog besides moving to dashboard in configuration.

thorn stream
#

This is my energy dashboard since the last version 2022.2 is there any breaking change with the imput data?

abstract stream
torn meteor
radiant dawn
#

Have already @torn meteor

#

That’s the issue

#

The state_class property refuses to get read

torn meteor
#

then you probably did something wrong

weary wave
#

Howdy! After updating to latest HomeAssistant version, the "Energy" options is suddenly gone from the Configuration view. Did it move somewhere else? (Can't find any mention of it in the release notes)
The Energy dashboard is still there and working as it should, but i can't set up new consuming devices etc.

ashen jacinth
#

It is moved to Configuration - Dashboards - Energy

solid spruceBOT
#
The topic of this channel is:

Development of energy related functionality for Home Assistant.
For support related questions please use the #energy support channel.

naive forge
solid spruceBOT
scenic shadow
#

For those of you in Australia, PowerPal is starting their API + Wifi

kindred kestrel
naive forge
kindred kestrel
#

This is how I have it

#

This is how HA Developer tools shows it. Do you think it's correct? I think it should be right

keen zodiac
lean quail
#

I have a IotaWatt connected with the official integration, it populates "Wh accumulated" sensors which specify unit_of_measurement: Wh, I added those to my energy dashboard a long time ago and they were working fine but it looks like the latest update messes up the units and thinks they are actually kWh, it is reporting a value in the range of 55,000 Wh as 55,000 kWh when it should be ~55 kWh instead. Anyone else notice this with sensors reporting in Wh? Should I open an issue?

zealous barn
lean quail
tranquil skiff
#

Morning all, first question if I may...

Within the Energy config file there is this value:

"cost_adjustment_day": 0.0

What is it's use?

Could I add my daily standing charge to this value (though I suspect its a percentage modifier)?

Thanks in advance

ember pawn
#

Hi! I searched this Discord channel and the frontend repo, but couldn't find anything regarding this: Instead of just naming it Gas, maybe make it configurable what the heat source is? As heatpumps are becoming more popular, it would be nice to name it as such.
And one idea for an additional card on the energy dashboard: degree of self-sufficiency. So instead of only looking at self-consumed solar energy, the quota of solar energy out of the total energy used is an interesting KPI

wary hawk
#

re: SRP_Energy component. I am trying to understand how the integration was set up, a couple of items seemed strange: 1) the sensor is defined as "total increasing" however it actually is a daily total that represents the previous daily kwh read so it seems to me it should be kept as a "measurement" or have a reset everytime it updates. 2) the sensor currently pulls useage data every 24 minutes however the data only updates when the date changes or once a day, it also appears that SRP adjusts the last hour of data for a few hours after midnight.

civic pelican
#

👋 howdy folks! very new to home automation, but i am preparing to upgrade my house to 200A service and install solar later this year. one thing i'd like to eventually be able to do is to set up non-cloud-based power monitoring that can report directly to HA (not a huge fan of companies mining my energy usage information by storing it in the cloud). i was just reading over https://www.home-assistant.io/blog/2021/08/04/home-energy-management/ and looked through the integrations page. i did see some home power monitor integrations but it looks like everything tends to be cloud-centric. i'm curious what if anything y'all at HA might have in the works that would allow users like me to avoid the cloud polling approach.

keen zodiac
civic pelican
gilded citrus
#

Hi

#

First of all thanks for this great energy module... very usefull

#

I can see two minors improvements in the presentation:

#

i) in the solar production, add the total expected production of the day (in kWh), the cummulated expected production until now (in kWh) and the cummulated measured production until now (in kWh) like :

#

ii) when at least one "Monitor individual devices" is defined, would be great to have add new circle with its own animation in the Energy distribution

#

like

#

when for example your extra individual device is a heat system (water/air)

somber kernel
#

bit of a newbie question. I have an sensor reading giving the current grid consumption in watts. Im using the new Riemann sum integral Helper to give me a KW value and passing that to energy dashboard. However I'm getting that there is no last reset state class. As this is a helper how can I set one?

zealous barn
somber kernel
quaint wave
whole pike
#

Guys thanks a lot for the great work done on this part of HA I just got how to monitor the power consumption of most of the devices.. it was pretty easy to do so with the integral and history combined.. just a couple of templates to write and.. all woks fine… thanks once again 🙂

elder elk
#

The Energy platform is great, I've got it synced with my solar, now just trying to link to electricity bill. I'm curious if homeassistant would work well with API from. Anyone know if this could work? https://arc.arcadia.com/
Here's their github with many US energy providers already linked up.
https://github.com/ArcadiaPower

floral tapir
#

I'm not sure if it fits in #energy-archived or here, so let me just ask:
Energy Dashboard updates once an hour. I would like to make it update once every 15 minutes.
Any possibility of doing this?

turbid hearth
#

@void cypress question: Does Powercalc create sensors for any other type of devices besides lights?

void cypress
scarlet timber
#

Hi all,

A big thanks to all you developers of this great energy feature.

I am looking for thoughts and feedback on adding emissions in to the energy pages. I have made some changes (the code needs a rework and refactor as there was a lot of learning of the code and environment).

Screen shot and more details are at
https://community.home-assistant.io/t/carbon-footprint-sensor/139890/7

I added three new cards and some functionality to calculate emissions, offsets and avoided/exported (“truly negative” emissions).

At the moment the emissions are calculated in the same way as the fossil/non-fossil gauge (taking the energy stats and the co2 signal).

What are your thoughts on the idea and if emissions discussion belong here in this channel or if it should go to a new channel and the fit for energy dashboard.

scarlet timber
heady arrow
#

Hello, is there anyone working on realtime (renewable) energy availability based automations. Could schedule things like heat pump, dishwasher, clothing drying, car charging

still lagoon
#

Hi @heady arrow

heady arrow
#

Hello @still lagoon

This thing should be developed as an integration ?

still lagoon
#

I’m just an enthusiast I don’t know anything

heady arrow
#

Ok ok @still lagoon . It would be good to gather some more people interested in this so we could discuss ideas and to do something good for the community. Also because much people do not have lots of time to do this full time, and we could distribute work.

Is there anyone else thinking/planning to do something on energy management/automation for home assistant that is easy for end users like an integration?

still lagoon
#

I’ll first take a look at the latest energy dashboard looks like I’m behind a bit

keen zodiac
#

For real-time automations the energy dashboard data is not suitable. It is calculated from an hourly mean value (see long-term statistics).
You'd probably need live-entity-state like a simple state trigger provides.

still lagoon
#

Well I think forecasts are more important, those are typically hourly

#

You want to know when to fire up the clothing dryer, heat pump, maybe dishwasher and other big consumers

static lion
#

Hello, I don't know is this belong here, but I have a question. In Poland, energy providers, counting only 80 % of exported energy on my account (like a storage), 20 % is considering as a fee.
In energy dashboard imported energy counting properly, exported as well (I'm multiplying my entity of exported energy by 0.8). Production of solar energy is proper too, but 20% of solar energy is accounted for “grid consumption” but in my case it’s shouldn’t be counted at all. Any chance to menage this?

keen zodiac
static lion
keen zodiac
#

You don't get payed for that 20% anyway. Doesn't matter if you multiply e * 0.8 * t or e * t * 0.8, does it? (PS this conversation is #energy-archived stuff)

solar wharf
keen zodiac
nimble light
#

Hey folks, just a heads up that we're looking for a new dev to work on our HA based home energy management system for energy co-ops - mainly low level device integration via open protocols (OCPP for EVs, Sunspec for PV etc) - remote working welcome, get in touch to chat if it's of any interest or pass on to anyone looking for interesting work in the open source community. https://carbon.coop/2022/05/were-recruiting-software-engineer-iot-energy/

golden cape
placid kiln
#

Hi

Im the creator of the Solcast Integration (https://github.com/oziee/ha-solcast-solar)

Im trying to add a solar forecast for each sensor in the integration. Currently I followed the forecast-solar integration using the energy.py file and it works, but its global, not linked to a seperate sensors

I tried to do something like
class RooftopSensor(CoordinatorEntity, SensorEntity, EnergyPlatform)
And in that class applied the function 
async def async_get_solar_forecast(hass: HomeAssistant, config_entry_id: str)
But the integration then does not list any forecast items in the energy dashboard to link to
What am I doing wrong?How do I link a sensor to be an item that shows in the energy dashboard that is selectable and will return its own data values for that sensor

placid kiln
#

No one?

full spade
#

Its not pluggable at this point

placid kiln
#

thanks @full spade so that means that it can only be written in like the energy.py file and is static.?

I would like to see if it goes further to be able to pass in date range to filter dataset returns

full spade
#

It is static indeed at this point. We made the choice to make it static, as we are not happy about how we handling things like forecasting in general. Thus, we for now hardcoded this while we figure out the bigger problem/wish first

terse harness
#

@full spade is there a way or a planned feature to increase granularity of the energy dashboard for when you have sensors/data that comes in faster via MQTT? Like half hourly or quarter hourly?

full spade
long moat
#

I reverse engineered the API of my energy providers web site that lets me see my power usage per hour, however, the data is available with 1 day delay, so todays usage will become available tomorrow, now i want to integrate the date to homeassistant, but i wonder does homeassistant even support adding energy data with a 1 day delay?

stone breach
#

Nope

rotund stirrup
#

@long moat You can insert it as statistics. Tibber does that https://github.com/home-assistant/core/blob/40fba130e8ee4bb141095e88ca832896ec708025/homeassistant/components/tibber/sensor.py#L563

It will not be a sensor, but can be used in the energy dashboard

GitHub

:house_with_garden: Open source home automation that puts local control and privacy first. - core/sensor.py at 40fba130e8ee4bb141095e88ca832896ec708025 · home-assistant/core

vernal jacinth
#

Hey! I hav an hour offset between the data that goes into the energy dashboard and viewing it in the dashboard....
The data appears (in the dashboard) to have been recorded an hour later than it actually was...

open wadi
#

You mean something with this? Or with some other integration?

solid spruceBOT
#

@vernal jacinth Your message has been deleted as it contains a link or a domain name 'pasteboard_dot_co' that is on the blocked list because of: 'Virus detected!'.
Please re-post by removing/changing the domain name/link. Your original message has been DM'ed to you.

open wadi
#

😅 O come on bot 🤣

vernal jacinth
#

Oh, forgot.... SOry!

#

Cannot find an easy image sharing site.....

#

Not solar, but yeah....
So here is a view of todays energy consumption as seen in the Energy Dashboard....
Note the 4.2kWh used between 5 and 6 this afternoon?

#

Here is the same data as recorded by the hardware reading my meter:

#

It is actually recorded between 4 and 5....

#

The system time on the hardware is correct, and TZ in HA is correct, so I can only assume that mapping the timings in the energy dashboard is incorect....?

#

Not correctly handling daylight savings would explain the offset, it might be that....

#

Open to any suggestions to errors on my part. Also happy to help diagnosing if someone would like to take a look at what happens...

open wadi
#

What I was thinking is that there is of course a difference at what point in the hour HA stores the value and when your ESP does 🤔

vernal jacinth
#

No…? The ESP reads a message on the bus from the meter and immediately transmits that to the broker…

#

IIRC, the message on the bus containing the total consumption is transmitted just after the top of the hour. It is the middle of the night here now, but I can check the exact timings for those messages tomorrow. ☺️👍🏻

#

Actually, that was easier than I thought… 😅

vernal jacinth
#

No idea what is going on?

#

The more I look at this, I beleive the error is somewhere in the Energy Dashboard....

#

Here is the sensor reading for the 4.2kWh consumption I used as an example:

#

It is recorded in HA at 17:00:13.

#

And in the Energy Dashboard it is registered as consumption that happened between 17 and 18....

vernal jacinth
#

Technically, the updated data on consumption is received within the hour of 17-18... When does the energy dashboard cut the line between this hour and the last?

vernal jacinth
#

Realizing this channel i not the best, and looking for where the issue/feature request should be reported... @full spade ?

full spade
#

issues in the github issue trackers, FRs in the forums

vernal jacinth
full spade
#

🤷‍♂️

vernal jacinth
#

😄

#

Thanks!