snarky-snark / home-assistant-variables

A custom Home Assistant component for declaring and setting generic variable entities dynamically.
Apache License 2.0
274 stars 16 forks source link

Failed to initialize - 2022.10.1 #85

Closed svhelge closed 5 months ago

svhelge commented 1 year ago

Updated to the latest version of Home Assistant, the var integration didn't initialize.

`Logger: homeassistant.setup Source: setup.py:255 First occurred: 23:31:18 (1 occurrences) Last logged: 23:31:18

Setup failed for custom integration var: Integration failed to initialize..`

cisco187 commented 1 year ago

I have had the same problem.

ercsey commented 1 year ago

Same situation here. Anybody found a solution for this?

snarky-snark commented 1 year ago

What was the last working version of HA you had before the upgrade? I don't see anything in the release notes for 2022.10 that stands out as a breaking change to the var component.

ercsey commented 1 year ago

Last used it about 1 year ago. Then I've abandoned the whole HA project so at me the HA version is not really relevant. The error message is the same regardless if I install it via HACS or manually.

snarky-snark commented 1 year ago

Do you have any variables defined in your config?

This is the line causing the error in HA core: https://github.com/home-assistant/core/blob/aabd681d7e0470b8384da984199400232dfbf724/homeassistant/setup.py#L255

And this is the line in the var component that I suspect is triggering the error: https://github.com/snarky-snark/home-assistant-variables/blob/5595daa10fec38913ac4c8245cc73e5e24537d67/custom_components/var/__init__.py#L220

That line should only return False if no var entities are found in your config.

I suppose under those circumstances (no vars defined), the component should still initialize. However, the failure is benign in that case and should not affect anything.

snarky-snark commented 9 months ago

Any luck with the latest develop version?