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.

Powercalc fails to start after upgrade to 0.24

See original GitHub issue

Hi,

I upgraded to v0.24 (on HA 2022.6.7) and a configuration that worked fine on 0.23 is preventing my HA from restarting even. it’s all yaml based.

Here is the log

and here is my powercalc-related config

configuration.yaml

powercalc:
  create_utility_meters: true
  utility_meter_types:
    - daily
    - weekly
    - monthly
    - quarterly
    - yearly
  power_sensor_naming: "{} Power"
  energy_sensor_naming: "{} Energy"
  create_domain_groups:
    - light

sensors.yaml

- platform: powercalc
  create_group: Group Bedroom Sufit
  entities:
    - entity_id: light.bedroom_sufit_1
    - entity_id: light.bedroom_sufit_2

- platform: powercalc
  create_group: Group Kids Sufit
  entities:
    - entity_id: light.kids_sufit_1
    - entity_id: light.kids_sufit_2
    - entity_id: light.kids_sufit_3

- platform: powercalc
  create_group: Group Shower Sufit
  entities:
    - entity_id: light.shower_sufit_1
    - entity_id: light.shower_sufit_2

- platform: powercalc
  create_group: Group Bath Sufit
  entities:
    - entity_id: light.bath_sufit_1
    - entity_id: light.bath_sufit_2

- platform: powercalc
  name: "Light Kuchnia Reflektory"
  entity_id: light.kuchnia_reflektory
  power_sensor_id: sensor.light_kuchnia_reflektory_power
  energy_sensor_id: sensor.light_kuchnia_reflektory_electric_consumption_kwh

- platform: powercalc
  name: "Light Salon Table"
  entity_id: light.salon_table
  power_sensor_id: sensor.light_salon_table_power
  energy_sensor_id: sensor.light_salon_table_electric_consumption_kwh

- platform: powercalc
  name: "Light Salon Kulki"
  entity_id: light.salon_kulki
  fixed:
    power: 7.7 # 3x Intertechno @ 0.7 + 4x kulki @ 1.4 W
  standby_power: 2.1

- platform: powercalc
  name: "Light Gabinet Bed"
  entity_id: light.gabinet_bed
  fixed:
    power: 2.6 # Intertechno @ 0.7 + punktowe @ 1.9 W
  standby_power: 0.7

- platform: powercalc
  name: "Light Bedroom Bookcase"
  entity_id: light.bedroom_bookcase
  fixed:
    power: 4.5 # Intertech @ 0.7 + punktowe @ 1.9W x 2
  standby_power: 0.7

- platform: powercalc
  name: Vacuum MrBobot
  entity_id: vacuum.mrbobot
  calculation_enabled_condition: "{{ is_state('vacuum.mrbobot', 'docked') }}"
  linear:
    attribute: battery_level
    calibrate:
      - 1 -> 20
      - 79 -> 20
      - 80 -> 15
      - 99 -> 8
      - 100 -> 2.5

- platform: powercalc
  name: AMP Subwoofer Salon
  entity_id: binary_sensor.amp_subwoofer_salon_on
  fixed:
    power: 12 # assume powered on whenever TV is on
  standby_power: 0.6

- platform: powercalc
  name: Fiddlestix Gabinet
  entity_id: media_player.squeeze_gabinet
  fixed:
    states_power:
      playing: 4.8
      paused: 4.8
      idle: 4.8
  standby_power: 3.1

- platform: powercalc
  name: Fiddlestix Sypialnia
  entity_id: media_player.squeeze_sypialnia
  fixed:
    states_power:
      playing: 3.1
      paused: 3.1
      idle: 3.1
  standby_power: 2

- platform: powercalc
  name: Squeezeplayer Salon i Sypialnia
  entity_id: media_player.squeeze_salon_i_sypialnia
  fixed:
    states_power: # salon is measured through the plug
      playing: 1.1 # this is just excess power since sypialnia will be clocking "off"
      paused: 1.1
      idle: 1.1
  standby_power: 0

- platform: powercalc
  name: Squeezeplayer Dziwadelko
  entity_id: media_player.squeeze_dziwadelko
  fixed:
    states_power: # salon is measured through the plug
      playing: 2.8 # this is just excess power since sypialnia and gabinet will be clocking "off"
      paused: 2.8
      idle: 2.8
  standby_power: 0

- platform: powercalc
  name: TV Salon
  entity_id: media_player.tv_salon
  fixed:
    power: 65
  standby_power: 0.9

- platform: powercalc
  name: IT Network Gear
  daily_fixed_energy:
    value: 12.7 
    unit_of_measurement: W

And here is the log powercalc.txt

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
szatan81commented, Jul 25, 2022

Beta master does not throwing an error. Looks good.

0reactions
bramstrokercommented, Jul 25, 2022

Thanks for reporting and testing. Closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

decimal.InvalidOperation · Issue #914 · bramstroker/homeassistant ...
I am running HA 2022.8.0b0. PowerCalc 0.24.3. I think the error was probably hapening before I upgraded from 2022.7.7, but cannot be certain....
Read more >
Powercalc - Virtual power sensors - #477 by arganto
I installed Powercalc recently and been adding stuff, but it seems for some reason when I reboot it adds up something to the...
Read more >
COMPLETE power monitoring for your home! - YouTube
One year ago, Home Assistant introduced Energy Monitoring, but today we look at ultimate power and energy monitoring HACS component.
Read more >
Fetal and umbilical Doppler ultrasound in high-risk pregnancies
Doppler indices from the umbilical artery start to increase when approximately 60% to 70% of the placental vascular tree is not functioning (Thompson...
Read more >
Sun Server X4-2 Installation Guide - Oracle Help Center
server module (blade), and blade chassis are updated periodically. You can obtain the latest software in one of three ways:.
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