I don’t see any advantage. Your sensor for total energy is correct.
When it goes up by 1kWh your utility meters should also each go up by 1kWh. Not 1000kWh as seems to be happening.
I don’t see any advantage. Your sensor for total energy is correct.
When it goes up by 1kWh your utility meters should also each go up by 1kWh. Not 1000kWh as seems to be happening.
Switched to rest sensors, adopted the totalling sensor, and all seems to work now (at least it did for the last 2x 5min cycles).
Thanks @tom_l for you help!!
Great!
But why?
I’m guessing it has something to do with the sensor class and unit. The state may actually be in Wh but defining a unit of kW displays them as divided by 1000. Like if you define a binary sensor device class the underlying states are still ‘on’ and ‘off’ but they are displayed as things like open/closed, movement/clear etc…
What do your three Shelly for Hass sensor states look like in the developer tools / states menu?
I posted that already. Please look up some posts.
They all show kWh. I do NOT alter any of those. I’m totally out of ideas. But who cares now. I got a working solution. Thanks
All I see are Lovelace screen shots. Which may be altered by the sensor class and unit.
Humour me. Look this up in the dev tools states menu:
sensor.shelly_shem_3_dc4f227648a6_1_total_consumption
Well that blows that theory out of the water then.
Oh man. Was working fine for two days. I was not changing A THING. Totally nothing. And out of the blue …
Any relevant errors in the log?
How many days is your recorder set to retain?
Did you restart HA shortly before 11am?
It happened at 10:29:16, and there are absolutely NO relevant logs at that time.
purge_interval: 1
purge_keep_days: 5
And no restarts at all …
Strange thing is: It still works for the hour…
Are you still on 0.108.x?
Because you have to remove that line before updating to 0.109, just FYI.
I’ve got no idea why this happens to you. Diogo commented earlier so hopefully he has been following along and will comment if he as anything to help.
Yes. 1.108.9, thanks for the reminder.
I’m completely out of ideas what could have caused that. Especially because I didn’t touch it. It was running untouched for 48h+
It’s really strange:
Today at 10:29:30 the value of 1.628,01 was added to daily, weekly, monthly and yearly sumup, but NOT to the hourly one, and since then ALL of them are running fine again. Just a 1.628,01 delta of course.
Try upgrading HA to 0.109.4, there was a patch for the Utility meter. No idea if it will help:
completely unrelated (it’s a fix to calibrate service when you want to calibrate using a float value)
I’ve no clue what’s going on
I’m nonetheless betting in sensor.shelly_total_power_consumption being the root cause.
Next time share not only the utility_meter sensor but also the source sensor graph.
Well, it IS strange. Happened once, and never again since. It’s counting up like it should.
I also checked the total consumtion value that feeds the utility sensor, but it was flat like the desert. No bumps or abnormalties. I’ll keep an eye on it.
Another issue with another instance of utility_meter.
I use is to give daily, weekly and monthly rain accumulation.
Worked fine for a few days, and suddenly went crazy with numbers after the decimal point.
The meter is always adding 0.31 to itself. Any way that I can just reduce it to one or two numbers after the decimal point?
Hi all,
reopening this discussion as I think I have a similar issue…
I am using Shelly EM to report the energy consumption of two floors with two distinct probes.
What I did is to create a template sensor that sum up the values of these two probes and the use this template sensor within Utility Meter.
It all works fine until i restart HA. When I do that, all the UM values loose sense.
I think the issue is with the status of the template sensor across reboot, which breaks Utility Meter.
This is the template sensor:
After the reboot the daily energy monitor report the total consumption not the daily one.
My template code is
- platform: template
sensors:
energia_complessiva:
friendly_name: Energia Elettrica Complessiva
unit_of_measurement: "kWh"
value_template: >
{% set current_state = states('sensor.energia_complessiva') | float | round(1) %}
{% set new_state = ((states('sensor.shellyem_energy1') | float) + (states('sensor.shellyem_energy2') | float)) | round(2) %}
{% macro max(X, Y) -%} {{X|float if X|float > Y|float else Y|float }} {%- endmacro %}
{{ max(current_state, new_state) }}
and the Utility meter:
utility_meter:
daily_energy:
source: sensor.energia_complessiva
cycle: daily
tariffs:
- mono
weekly_energy:
source: sensor.energia_complessiva
cycle: weekly
tariffs:
- mono
monthly_energy:
source: sensor.energia_complessiva
cycle: monthly
tariffs:
- mono
any useful clue how to prevent this?
thanks
Hmmmmm… My meter gets even more precise these days