Utility meter is having a bad time
See original GitHub issueFigured I had enough time to mess around with finally configuring this today but seem to have hit a wall with the utility meters
The power and energy sensors are both working great but it has only generated some of the utility meter entities, all of which are forever stuck with a value of “unknown” and my logs get updated every few seconds with:
Logger: homeassistant.helpers.event
Source: components/utility_meter/sensor.py:176
First occurred: 7:40:51 PM (327 occurrences)
Last logged: 7:56:03 PM
Error while processing state change for sensor.electricity_used_server_rack_light_2_virtual
Error while processing state change for sensor.electricity_used_front_porch_light_1_virtual
Error while processing state change for sensor.electricity_used_back_patio_light_1_virtual
Error while processing state change for sensor.electricity_used_server_rack_light_1_virtual
Error while processing state change for sensor.electricity_used_kitchen_ceiling_light_2_virtual
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 269, in _async_state_change_dispatcher
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 433, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/utility_meter/sensor.py", line 176, in async_reading
for sensor in self.hass.data[DATA_UTILITY][self._parent_meter][
KeyError: 'sensor.electricity_used_kitchen_ceiling_light_2_virtual_daily'
Running the current power calc master branch / home assistant core-2021.10.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
3 Reasons Your Utility Bills Are Inaccurate - Aquicore
1. There Are Problems with Your Utility Meters. Issues you could have with your meters themselves range from installation errors to communication failures....
Read more >How Often Should Electricity Meters Be Changed?
If your electricity meter is either moving too fast or too slow or telling the wrong time, it is probably not functioning correctly....
Read more >Faulty meter? Here are the warning signs | Energyprice.be
But if prices have remained stable, it's time to have a look at your gas or electricity meter as it may be turning...
Read more >Is My Electric Meter Faulty?
Are your high electrical bills caused by a faulty electrical meter? Probably not, but it's worth it to check. Read our post to...
Read more >Check if your energy meter is faulty - Citizens Advice
If the meter is still moving, it's probably faulty. If it's a gas meter, you might have a gas leak - report it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I decided to go a bit further and give home assistant a fresh database, unfortunately this error still persists (no more restore state messages though so that’s nice). I’ve let it run for a couple hours now and nothing appears broken so I’ll just let it run for a week or so and see if it occurs on the next restart again
I’ve updated to 0.10.1 and enabled about 3/4 of the devices I plan to use So far everything appears to have created the correct entities and it’s all working great
I was getting this error yesterday which I couldn’t work out and am still getting after I updated
Functionally everything seems fine though
The only other error related to utility meters that I seem to be getting a lot since updating home assistant (this isn’t specific to powercalc as it happens to essentially any new meter or anything that hasn’t received any data and for low power usage devices such as a virtual item using only 0.5W, it can sometimes take forever to update with a value)
~I’ve created 2 group (1 for lights, 1 for plugs) to test that out and the entities were created correctly but they don’t seem to be adding the values of every virtual device together. Rather it just uses a flat value of one of the devices. This could be user error though and me not understanding the configuration properly just yet so I’ll play with the groups a bit more tonight~ Groupings not working were 100% user error, works as expected (when configured correctly lol)
I’ve dumped my current powercalc config / some debug logs over on pastebin