bramstroker / homeassistant-powercalc

Custom component to calculate estimated power consumption of lights and other appliances

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Energy sensors not updating

erkr opened this issue · comments

commented

System Health details

Ok

Checklist

  • I have read the FAQ to see if there is a known solution to my problem.
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

I'm using the new feature to force energy calculations based on the group power.
I noticed these energy sensors don't update as long the group power doesn't change. That is a know issue with riemann sensors, so I guess this group power value isn't updated by a timer (I think you are doing that for individu lights as I noticed this option: force_update_frequency)

Best Eric

Reproduction steps

This Is a config example:

enable_autodiscovery: false
create_energy_sensors: false
create_utility_meters: false

sensors:

    - create_group: woonkamer lights
      unique_id: powercalc_group_woonkamer_lights
      create_energy_sensor: true
      force_calculate_group_energy: true
      entities:
      - entity_id: light.tv_lamp
      - entity_id: light.leeslamp
      - entity_id: light.bureau_koof
      - entity_id: light.zithoek
     ...

Debug logs

Na

Diagnostics dump or YAML config

No response

For the individual power sensors Powercalc forces a state update to let the Riemann sensor do it's work.
The group sensors doesn't however.
I saw some developments at HA core where there will be a time based implementation.
So I suggest to wait for that development (probably next month release), as there would probably not be a hack needed which I implemented for the virtual power sensors.

commented

Yes the real issue is definitely in the riemann integration. And the author initially (two years ago) even didn't agree it was a bug. I'm following that timer fix for months now, but don't share your optimism when it will be in 😏
If it is a lot of work for you I agree to wait! Otherwise it would be helpful as a temporary fix

There is actively being worked on seeing the latest pull requests:

home-assistant/core#110685
home-assistant/core#113932

commented

Yes, we are monitoring the same change 🤞

commented

Didn't make it for 2024.5.0 😳

commented

The Riemann pull request finally made progress 🥳

The Riemann pull request finally made progress 🥳

Nice!

commented

I didn't update yet, but I guess it's in the release.