homeassistant-powercalc: upon restart, many (light) sensors show unavailable
System Health details
no powercalc system health available, as all yaml, and no powercalc integration panel is displayed in the integrations overview
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
even though my main config is set to show 0 in those cases:
powercalc:
enable_autodiscovery: false
energy_sensor_naming: '{} device energy'
power_sensor_naming: '{} device power'
ignore_unavailable_state: true
energy_sensor_precision: 2
unavailable_power: 0
create_utility_meters: true
utility_meter_types:
- daily
- yearly
sensors:
using a pure yaml config.At first I believed it to be influenced by turning on/off eg a light, but that didnt make sense, it simply should not do that. It does however, turning on several of the lights, immediately makes them have the device_energy sensors get a state.
the issue also happens for non discovered entities like:
- entity_id: device_tracker.airport_express_water
fixed:
power: 4.1
but they seems to get a value after a minute. Not so for these entities in the screenshot (and a huge amount of others that didnt fit in there…)
during this writeup, those have now also started showing their value, which is happening after 11 minutes of uptime, and reproducible.
btw, as a side question: could it be the
unavailable_power: 0
throws off the utility_meter entities, and the energy panel in HA for that matter, resetting the state_class on energy sensors? Ive seen that a lot lately, and now writing this issue, suddenly realize this might be related? Would it be better to have these sensors be ‘unavailable’ and even though a bit ugly I the dashboard, not have them mess with the internal calculations?
To my understanding the unavailable_power: 0 is in fact only used on those power sensors, and should not interfere at all with energy sensors?
Reproduction steps
- restart
…
Debug logs
return to this later
Diagnostics dump or YAML config
No response
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 16 (14 by maintainers)
ok thank you for the clarification. I’m only recently getting started with HA and learning all I can. I’ll have a look see at linked issue you gave
Done
https://github.com/home-assistant/core/issues/98967