Hello,
I’m running the latest Home Assistant version and I have a bunch of utility meters configured, some of them show in the energy tab (so I can add them as individual devices to monitor) but some doesn’t.
I’ve added them few days ago, restarted HA and still nothing:
Example of a sensor that doesn’t show on the dashboard:
Right! There was a problem reported there, no idea how, about a change in unit. Will see if HA fixed the problem by itself now! I’ll report, thanks for the moment
I have the same problem but can not fix it. The unit is not shown in the statistics but do not know why.
You can see the export Daily which has no unit. The export Montly has a unit. Both are utility meter values from sensor.energy_export_sum which is also shown.
It seems to be accepted as a statistic, otehrwise it would not show in this tab
How did you set it up, i.e. template / code may allow to help you more then showing an empty field
This is the code which sets it up. All other sensors are present with a unit only the sensor.enery_export_daily not.
sensor:
- platform: template
sensors:
# Template sensor for values of power import (active_power > 0)
power_import:
friendly_name: "Power Import"
unit_of_measurement: "W"
value_template: >-
{% if (states('sensor.powersensor_channel_a_power')|float + states('sensor.powersensor_channel_b_power')|float + states('sensor.powersensor_channel_c_power')|float) > 0 %}
{{ states('sensor.powersensor_channel_a_power')|float + states('sensor.powersensor_channel_b_power')|float + states('sensor.powersensor_channel_c_power')|float }}
{% else %}
{{ 0 }}
{% endif %}
availability_template: "{{
[ states('sensor.powersensor_channel_a_power'),
states('sensor.powersensor_channel_b_power'),
states('sensor.powersensor_channel_c_power')
] | map('is_number') | min
}}"
# Template sensor for values of power export (active_power < 0)
power_export:
friendly_name: "Power Export"
unit_of_measurement: "W"
value_template: >-
{% if (states('sensor.powersensor_channel_a_power')|float + states('sensor.powersensor_channel_b_power')|float + states('sensor.powersensor_channel_c_power')|float) < 0 %}
{{ (states('sensor.powersensor_channel_a_power')|float + states('sensor.powersensor_channel_b_power')|float + states('sensor.powersensor_channel_c_power')|float) * -1 }}
{% else %}
{{ 0 }}
{% endif %}
availability_template: "{{
[ states('sensor.powersensor_channel_a_power'),
states('sensor.powersensor_channel_b_power'),
states('sensor.powersensor_channel_c_power')
] | map('is_number') | min
}}"
# Template sensor for values of power consumption
power_consumption:
friendly_name: "Power Consumption"
unit_of_measurement: "W"
value_template: >-
{% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.power_solargen')|float(0) - states('sensor.power_export')|float(0)) < 0 %}
{% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.power_solargen')|float(0) - states('sensor.power_export')|float(0)) > 0 %}
{{ (states('sensor.power_solargen')|float(0)) - states('sensor.power_export')|float(0) }}
{% else %}
{{ states('sensor.power_import')|float(0) + states('sensor.power_solargen')|float(0) }}
{% endif %}
# Sensor for Riemann sum of energy import (W -> Wh)
- platform: integration
source: sensor.power_import
name: energy_import_sum
unit_prefix: "k"
round: 2
method: left
# Sensor for Riemann sum of energy export (W -> Wh)
- platform: integration
source: sensor.power_export
name: energy_export_sum
unit_prefix: "k"
round: 2
method: left
# Sensor for Riemann sum of energy consumption (W -> Wh)
- platform: integration
source: sensor.power_consumption
name: energy_consumption_sum
unit_prefix: "k"
round: 2
method: left
utility_meter:
energy_import_daily:
source: sensor.energy_import_sum
name: Energy Import Daily
cycle: daily
energy_import_monthly:
source: sensor.energy_import_sum
name: Energy Import Monthly
cycle: monthly
energy_export_daily:
source: sensor.energy_export_sum
name: Energy Export Daily
cycle: daily
energy_export_monthly:
source: sensor.energy_export_sum
name: Energy Export Monthly
cycle: monthly
energy_consumption_daily:
source: sensor.energy_consumption_sum
name: Energy Consumption Daily
cycle: daily
energy_consumption_monthly:
source: sensor.energy_consumption_sum
name: Energy Consumption Monthly
cycle: monthly
The code is from a website to get a shelly 3em better integrated into the energy dashboard. Some of the users of the website do have exact the same problem like me. Currently no solution. This is why I am asking here.
There is a history in both cases. Today the sun comes up and I do not have exports now but you can see in the history that yesterday there were values present. This is the history of the problematic sensor with no unit.
For me this all looks fine, could be a bug
Can you add a utility meter for daily, e.g. using the Helpers, and see if that makes a difference?
I do have to add that the title vs. the screenshots are not the same topic.
I did a check myself with mixed results: I have gas-usage utility meteres defined via yaml, they can not be added to the energy dashboard.
I have electricity related UM via the GUI > Helpers and they can (!) be added…confused myself now
Do not understand exactly what you describe.
But here ist my add Screenshot of the Energy Dashboard. There are a lot of things I can add like the “Energy Export Monthly” which is configured like the daily on I want to add (Configuration of the Monthly is shown above too). But I want to use the daily which is not available. I think because of the missing unit you can see in the picture above. My question is now how can I set the unit to do a workaround?
By the way, thanks for your fast feedback and the time you invest in my topic.
I have the impression that your utility meter is not well setup, and you did this via Yaml
You can also use that via the gui
Settings > Devices > Helpers tab
Try adding another one with a slightly different name for daily and see how that behaves
Really strange behavior. Why it did not work within the Yaml. I followed your instruction and created a other one within the GUI with a different name and it seams that this was a good workaround for me.
Thanks a lot! It really helped me. Now I have a nice energy dashboard with all I want to have in it.
Thanks again for your help and time!
I had the issue where none of my utility meters were shown in the energy dashboard.
The screenshots above should have made it clear to go into Developer Tools and Statistics and then find my meters in here and press the fix issue button. Now working fine