ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
36 stars 8 forks source link

Integration stopped working after update to HA 2024.4.0 #34

Closed 35gh closed 3 months ago

35gh commented 3 months ago

Hi,

After update to HA 2024.4.0, all integration entities but state became unavailable.

I see those suspicious errors in logs, not sure they are related:

Enregistreur: homeassistant
Source: util/async_.py:35
S'est produit pour la première fois: 23:34:13 (1 occurrences)
Dernier enregistrement: 23:34:13
Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 629, in async_add_entities
    await add_func(coros, entities, timeout)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 535, in _async_add_and_update_entities
    tasks = [create_eager_task(coro) for coro in coros]
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 35, in create_eager_task
    loop=loop or get_running_loop(),
                 ^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop
Enregistreur: py.warnings
Source: runner.py:189
S'est produit pour la première fois: 23:34:13 (1 occurrences)
Dernier enregistrement: 23:34:13

/usr/local/lib/python3.12/threading.py:299: RuntimeWarning: coroutine 'EntityPlatform._async_add_entity' was never awaited def __enter__(self):

Thanks!

corgan2222 commented 3 months ago

I can confirm this bug after updating to 2024.0.

Debug output: grafik

This happens to both of my servers (dell and ASRock). It looks, that only the SDR List Items are effected. The power state and the power switch are available.

grafik

ateodorescu commented 3 months ago

I'm sorry but it feels like I'm playing ping-pong with this Python async/or not async methods calling in HASS APIs. It's kind of frustrating. I have fixed it again but I'm not sure if you would see the sensors in the following scenario: you have your server shut down, you start HASS, you only see some sensors, you start the server and the rest of the sensors should be visible. I don't think that this scenario works anymore but I also don't know why those bloody APIs do not work properly.

35gh commented 3 months ago

1.6.0 brought back the sensors for me, thank you. Hope you'll sort out how to play with those bloody APIs :)

corgan2222 commented 3 months ago

Sadly im not deep enough into HA development and those bloody APIs to help. :/ But same here. 1.6.0 works fine! Thanks for the quick fix!