Breina / idrac_power_monitor

HomeAssistant integration to monitor the power of a server through its iDrac's Redfish API
17 stars 17 forks source link

HASS Core 2024.1.2 - Integration does not work. #6

Closed baudneo closed 6 months ago

baudneo commented 6 months ago

I am unsure of when the integration went down (might of been after updating to a previous release), but I noticed today. The only logs I can see so far are:

Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 1:44:48 PM (1 occurrences)
Last logged: 1:44:48 PM

Error setting up entry PowerEdge R540 for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 141, in async_setup_entry
    return await component.async_setup_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 188, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
Kathou99 commented 6 months ago

Hi mine too, is now broken, I got this on my side

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:360
Integration: Capteur (documentation, issues)
First occurred: 15:48:28 (3 occurrences)
Last logged: 15:50:29

Error while setting up idrac_power platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/idrac_power/sensor.py", line 48, in async_setup_entry
    IdracCurrentPowerSensor(hass, rest_client, device_info, f"{serial}_{model}_current", name),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/idrac_power/sensor.py", line 61, in __init__
    self.entity_description.name = name
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'name'
Breina commented 6 months ago

Should be fixed in the latest version. Please test. :)

nowjon commented 6 months ago

Should be fixed in the latest version. Please test. :)

Verified that version 1.1.0 resolved this issue, my idrac powers are now updating again :)

baudneo commented 6 months ago

Fixed, thank you!