I do have a smart meter where I get the values via esphome via the following configuration for my esphome - it was a project I just used from GitHub because it works for my smart meter:
which shows the correct values and I think also the properties are good??
When I now want to add it to the energy dashboard I see just the sensor from the ESP which is in Wh and I have no chance to add the sensor from the template.
Any hints what else to try? thanks a lot in advance
The values seem to be valid what I get, just have now the following issue, after adding it to the energy dashboard I got the message “statistics_not_defined” - unfortunately I didn’t do a screenshot and don’t get this message now anymore. Do I have to care about it? I will just observe If I see any issues the next couple of days when values are available…
I have read a bit about but I am not an experienced user with yaml configuration - not sure if I can handle it, will try to adapt the examples provided - I am not sure if I need it, I get the values from my smart meter and they are increasing on the smart meter itself - it could happen, that the connection is broken for whatever reason, but after connection is up again their might be some bigger increase, not more…
I will check the next couple of days how the values are in the energy dashboard are evolving compared to reading it directly from the smart meter… and if there is maybe an issue with the message “statistics_not_defined”.
Go to Developer Tools → Statistics and see if there are any FIX ISSUE buttons listed. Press them if there are.
It’s pretty simple, you just need to add a template that makes sure the sensors you are feeding the template are valid. You should also define default values for your float filters. Like this:
This way if either of the source sensors are not numbers (e.g. none, unavailable or unknown) the template sensor state will become “unknown”. This will prevent big spikes in your energy dashboard when the source sensor comes back.
Hi! Forgive me if this is not the place to post, but I’m experiencing a similar issue when trying to add a custom template sensor to my energy dashboard. It works fine in the template editor, but can’t see to source it when trying to add devices.
Sensor delivers value in Wh and I want to use it in energy Dashboard.
But it is not available here.
# Meross Switch Heizlüfter liefert Wh und die können wir im Energy Dashboard nicht brauchen,
# daher rechnen wir aus Volt und Ampere Werten die Watt aus.
- sensor:
- name: "HeizlĂĽfter Energieverbrauch (kWh)"
unique_id: heizluefter_energie_kwh
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
state: "{{ states('sensor.smart_plug_2211015479756951080148e1e9ada23a_energy')|float(default=0) / 1000 }}"
availability: "{{ states('sensor.smart_plug_2211015479756951080148e1e9ada23a_energy')|is_number }}"
Please help, home assistant is powerful, but using and configuring is like 300 years ago…
these virtual sensors go to energy dashboard. But the sensors do not work correct with the home assistant energy module
in energy Dashboard the values are wrong. can you help me ?
I have a similar problem and I think it might have to do with state_class? total or total_increasing feels wrong, but wherever I look for it in home assistant threads, that’s the recommendation
Values shown in energy board are ridiculously high (even if it was the sum of everything since i set it up yesterday)
This should show the current energy production, right?
Sensor values seem to be right:
solar Sensor configuration is simple:
- name: solar
device_class: energy
state_class: total
unit_of_measurement: "Wh"
value_template: "{{ value_json.production.solar }}"
Update: so it’s probably because i get watts (W) but HA Energy Dashboard wants Wh. Not sure how to solve that but that’s a new approach to google with. I must say it’s way more complicated than I expected. I put in several hours yesterday to reach this point.
I got installed my solar panels and want to integrate them into HA. I pass values (from_grid, to_grid, consumption) via MQTT to HA. In a first try I’ve been successful using any parameters from my solar panels. To clean up my energy-dashboard I used the hint I found somewhere in their internet and deleted ./homeassistant/.storage/energy
When I became more familiar with what is required by the dashboard I tried to provide accurate values and failed, as the provided parameters/values are not shown in the drop-down list of the energy-dashboard.
My current definitions in ./homeassistant/mqtt/sensor.yaml are
Opposite to my expectations sensor.daily_enery, which I defined (and finally deleted) earlier is still shown in the drop-down, although ist doesn’t exist any longer in my yamls.
Holy cow. The fix issues button just saved me after fiddling around for an hour. For how much these problems affect certain integrations, they should be easier to find … Thanks!