#Tesla Powerwall & HA Energy

1 messages ยท Page 1 of 1 (latest)

eager dirge
#

At the moment all my energy data is focussed around a Tesla Powerwall but that system is also hooked up to an enphase envoy which, at the moment only seems to provide lifetime stats.

#

My questions is: Do I need to wait for my Tesla stats to become part of the long-term data before they'll appear in HA Energy?

waxen locust
#

Batteries are not supported yet

eager dirge
#

Ok. I wasn't looking for battery support but more the Tesla Gateway integration. It provides entities like solar production, site load ect. But they may not have the right properties to be recognised by long-term statistics i guess.

waxen locust
#

sure not everything supports this yet

#

it is new

eager dirge
#

sensor.powerwall_site_now value: 6.816

state_class: measurement
frequency: 50
energy_exported_(in_kW): 12670.7
energy_imported_(in_kW): 48806.8
instant_average_voltage: 232.9
instant_total_current: 0
is_active: true
unit_of_measurement: kW
friendly_name: Powerwall Site Now
device_class: power
#

Thanks for the awesome work you're doing by the way. The solution might be just to wait until someone updates the integration to work properly with the new long-term stats.

coral berry
#

We only support energy

#

That is a power sensor

midnight flume
waxen locust
#

power vs energy ๐Ÿ˜„

midnight flume
#

@eager dirge the Energy integration requires, as the name says, Energy sensors. ๐Ÿ™‚

eager dirge
#

(:

#

Could I make a sensor that takes the site sensor, divides it by the voltage to get the current (energy?)

midnight flume
eager dirge
#

wait. It's in watts ๐Ÿ™‚ the math thing wouldn't work unless it's power over time

waxen locust
#

energy_exported_(in_kW): 12670.7
โ˜๏ธ That is impossible ๐Ÿ™‚

#

as energy is never kW

eager dirge
#

I'll have a look at the powerwall's api. Maybe they already have something.

midnight flume
#

contact the author of the integration, is it a custom component?

eager dirge
#

No. It was made into an official integration.

midnight flume
#

strange that someone that develops an integration for the PowerWall doesn't know the difference between power and energy

#

official???

#

so we have an official integration that says this?

energy_exported_(in_kW): 12670.7
energy_imported_(in_kW): 48806.8

#

can you show me the list of sensors provided by this integration?

waxen locust
#

Yeps

#

this is in Home Assistant

#

I would raise an issue for this in the Home Assistant Core issue tracker

midnight flume
#

definitely wrong

waxen locust
#

besides, those should be separate sensors anyways :S

midnight flume
#

yes

eager dirge
#

It's a little strange since they're included in all the usage sensors from the component.

midnight flume
#

all sensors of that integration, that is...

eager dirge
midnight flume
#

sorry, didn't mean to rush you ๐Ÿ™‚

eager dirge
#

No problem

#

Did you want anymore info?

midnight flume
#

names are not very descriptive, anyway, the unit of measurement for energy should be in kWh or Wh. Only power is measured in W or kW.

#

open an issue on Core, regarding the integration

#

while you're at it, mention also that for energy sensors the last_reset attribute is needed.

turbid cargo
#

Sorry to drop in-
All my home power sensors are in kW as they give the value at that time, refreshing every 5-10 mins depending on where they're fed from.
I notice that the 'Utility Meter' integration isn't yet giving kWh sensors valid for the new Energy stuff - is there an easy way to calculate the kWh from kW so that I can start using the Energy platform please?

eager dirge
coral berry
#

It needs a way higher sampling rate to calculate kWh reliable

turbid cargo
# coral berry It needs a way higher sampling rate to calculate kWh reliable

What period is Home Assistant looking for the kWh of the sensor to be covering and then resetting? 1 minute? 1 day? 1 hour?
Things like my grid I can increase frequency to 30 seconds or whatever, but my solar inverter only reports every 5 minues.
Surely it could just take the kW and multiply it by the time since the last report to get the kWh in that period? Might not have that same granularity, but better than nothing!

coral berry
#

That would be way off ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

turbid cargo
#

I mean if the kW is varying wildly over the reporting period, sure.
But if my solar is producing 3kW for the last 5 minutes then that's 0.25kWh.

coral berry
#

You can use the integration I linked for that ๐Ÿ‘†

turbid cargo
#

Ah cool thanks!
Does the Energy platform expect it to be reset periodically or will it handle a sensor just giving a running total forever?

coral berry
#

Both can be handled

#

I would advise a running total

turbid cargo
#

ok perfect - makes it much simpler!
Thanks for your help!

midnight flume
#

the energy integration supports those

midnight flume
#

monitor it

eager dirge
#

I will. If I find the time I might see if I can make the modifications myself. Slim chance though of finding the time.

midnight flume
#

you can do a PR and see if it's accepted

turbid cargo
midnight flume
#

what value did you use for last_reset?

turbid cargo
#

I've literally just created an 'integration' sensor for grid import, grid export etc. feeding from my kW sensors and the Energy integration seems to accept them directly.

  • platform: integration
    source: sensor.grid_import
    name: "Grid_Import_Total"
midnight flume
#

ok, you used the integration platform, good. the final sensor should have the correct attributes then.

turbid cargo
#

Will be curious to see if future development will accept 'power' inputs in kW- especially to show flow from solar to home, battery etc.
Showing a 'flow' for kWh doesn't make much sense huh!

midnight flume
#

I agree...that dynamic flow diagram should relate to power, not to energy...I've had mine since a long time with the tesla card...

turbid cargo
#

Yes that's what I'm using!

midnight flume
#

but, you can now have a lovelace card with elements from energy and yours, so you can customize it as you prefer