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.

Beta version 2021-10 of Home Assistant added a `parent_sensor` to the init method of UtilityMeterSensor

See original GitHub issue

Hi, Version 2021-10b of Home Assistant causes a crash of this integration. Find below the message. Although the error reports a problem with net_consumption, a blame on utility_meter sensor code shows line 132 was added 7 days ago, and IMO causes the problem.

https://github.com/home-assistant/core/blame/dev/homeassistant/components/utility_meter/sensor.py

Logger: homeassistant.components.sensor
Source: custom_components/powercalc/sensor.py:674
Integration: Capteur (documentation, issues)
First occurred: 14:18:29 (1 occurrences)
Last logged: 14:18:29

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 201, in async_setup_platform
    await create_individual_sensors(hass, merged_sensor_config)
  File "/config/custom_components/powercalc/sensor.py", line 281, in create_individual_sensors
    entities_to_add.extend(create_utility_meters(energy_sensor, sensor_config))
  File "/config/custom_components/powercalc/sensor.py", line 473, in create_utility_meters
    utility_meter = VirtualUtilityMeterSensor(
  File "/config/custom_components/powercalc/sensor.py", line 674, in __init__
    super().__init__(source_entity, name, meter_type, DEFAULT_OFFSET, False)
TypeError: __init__() missing 1 required positional argument: 'net_consumption'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bramstrokercommented, Oct 4, 2021

@vlebourl Yes I experienced this same issue when testing the new beta against my integration. Will work out a solution soon.

0reactions
vlebourlcommented, Oct 7, 2021

Fixed in #311

Read more comments on GitHub >

github_iconTop Results From Across the Web

2022.11: A heck of a release! - Home Assistant
Setting it means that all date inputs, date range pickers, schedules, calendars, and even time conditions in automations, will take this into ...
Read more >
Troubleshooting your configuration - Home Assistant
To enable debug logging for an integration, go to Settings -> Devices & Services and then click the triple dots for the integration...
Read more >
2021.1: Happy New Year! - Home Assistant
Happy New Year! Kicking off the year with Home Assistant Core 2021.1! Now don't get too excited. The 2020.12 release was jam-packed, and...
Read more >
2022.10: All over the place - Home Assistant
This release introduces a new way to export data from Home Assistant: Google Sheets. With this integration, you can add new rows to...
Read more >
Apple TV Integration - tvOS 15 Beta - #121 by newmanzone
I have a “Skip Forward 10 seconds” button. To enable it, I pull the media_position attribute from my AppleTV and use a function...
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