#Tesla Powerwall & HA Energy
1 messages ยท Page 1 of 1 (latest)
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?
Batteries are not supported yet
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.
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.
that's a power sensor. this is the only sensor that the integration provides? no energy sensors?
power vs energy ๐
@eager dirge the Energy integration requires, as the name says, Energy sensors. ๐
(:
Could I make a sensor that takes the site sensor, divides it by the voltage to get the current (energy?)
those energy_exported / energy_imported values are in the wrong unit, energy is in kWh or Wh
wait. It's in watts ๐ the math thing wouldn't work unless it's power over time
energy is in Wh not W
energy_exported_(in_kW): 12670.7
โ๏ธ That is impossible ๐
as energy is never kW
I'll have a look at the powerwall's api. Maybe they already have something.
contact the author of the integration, is it a custom component?
No. It was made into an official integration.
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?
Yeps
this is in Home Assistant
I would raise an issue for this in the Home Assistant Core issue tracker
definitely wrong
besides, those should be separate sensors anyways :S
yes
It's a little strange since they're included in all the usage sensors from the component.
can you show us the list of all sensors please?
all sensors of that integration, that is...
yep. Just give me a minute. New linux install does't have image tools
sorry, didn't mean to rush you ๐
https://cdn.discordapp.com/attachments/736859512476008469/872462839061815316/Screenshot_from_2021-08-04_22-54-38.png - A screenshot of all the entities.
Here's a gist with all the values:
https://gist.github.com/sebasptsch/09f7b6b3c6b8cf92d314872a1aa8ebf7
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.
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?
Here's the issue. Let me know if you want me to change or add anything. https://github.com/home-assistant/core/issues/53944
If they are only refreshed every 5-10 minutes, then no
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!
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.
You can use the integration I linked for that ๐
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?
ok perfect - makes it much simpler!
Thanks for your help!
use lifetime sensors, that is, never reset.
the energy integration supports those
I think it's ok Sebastian. Now it's up to devs...
monitor it
I will. If I find the time I might see if I can make the modifications myself. Slim chance though of finding the time.
you can do a PR and see if it's accepted
Thanks! Have got the integrated sensors connected now so will wait for some data to build up and see what happens.
what value did you use for last_reset?
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"
ok, you used the integration platform, good. the final sensor should have the correct attributes then.
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!
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...
Yes that's what I'm using!
but, you can now have a lovelace card with elements from energy and yours, so you can customize it as you prefer
Here you can find the code to replicate the energy card in lovelace, so you can then customize it: https://community.home-assistant.io/t/home-energy-management-in-2021-8/325539/18?u=alexdelprete