question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Utility meters not working in 2022.4.0b0

See original GitHub issue

Despite PR #627 (Fix compatibility with rewritten utility-meter in HA 2022.4), Powercalc v0.19.3 fails to load on 2022.4.0b0 with the error message below if create_utility_meters is enabled. The regular power and energy sensors work if I disable create_utility_meters in the config and restart.

(I am using a pretty standard config for Powercalc. The only other global config I have enabled is enable_autodiscovery, which I believe is now the default anyway.)

Logger: homeassistant.components.sensor
Source: custom_components/powercalc/sensors/utility_meter.py:157
Integration: Sensor (documentation, issues)
First occurred: 7:48:05 AM (16 occurrences)
Last logged: 7:48:05 AM

Error while setting up powercalc platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/powercalc/sensor.py", line 233, in async_setup_platform
    entities = await create_sensors(hass, config, discovery_info)
  File "/config/custom_components/powercalc/sensor.py", line 299, in create_sensors
    new_sensors = await create_individual_sensors(
  File "/config/custom_components/powercalc/sensor.py", line 425, in create_individual_sensors
    await create_utility_meters(hass, energy_sensor, sensor_config)
  File "/config/custom_components/powercalc/sensors/utility_meter.py", line 100, in create_utility_meters
    utility_meter = await create_utility_meter(
  File "/config/custom_components/powercalc/sensors/utility_meter.py", line 157, in create_utility_meter
    utility_meter = VirtualUtilityMeter(**params)
TypeError: __init__() missing 4 required keyword-only arguments: 'cron_pattern', 'tariff_entity', 'tariff', and 'unique_id'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
holdestmadecommented, Apr 1, 2022

Yep, that cures it for me, thanks for the quick fix

0reactions
krazoscommented, Apr 1, 2022

All good in 0.19.4. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Utility Meter Reset service not work 2022.4.0 #69569 - GitHub
The problem The utility_meter.reset service not work on the new release 2022.4.0. I'm using it in to a script, but using UI dev...
Read more >
Utility meter not available as source in energy dashboard
I have set up cheap and peak rate sensors using the utility meter integration UI. The energy dashboard does not offer either of...
Read more >
Smart Meter FAQs | Dominion Energy
Smart meters help provide better service – like power outage detection, faster problem resolution and remote meter readings. Because the meters communicate ...
Read more >
Electricity Meters Modules - Itron
Electricity Meters + Modules. Filters. Filter by: Filter by: Category. 7Smart Residential Metering. 5Meter Installation + Programming.
Read more >
Metering - Public Utility Commission of Texas
Every residence or business has an on-site electric meter that registers the amount ... Since in-person meter readings will not be required, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found