You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like untested code has sneaked in. Changing optimizer.id to optimizer_id in line 774 of sensor.py fixes the issue.
Reproduction steps
Configured integration with active optimizers
Relevant debug logs
Jul 28 16:14:50 ha hass[2668]: Traceback (most recent call last):
Jul 28 16:14:50 ha hass[2668]: File "./lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 258, in _async_setup_platform
Jul 28 16:14:50 ha hass[2668]: await asyncio.gather(*pending)
Jul 28 16:14:50 ha hass[2668]: File "./lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 397, in async_add_entities
Jul 28 16:14:50 ha hass[2668]: await asyncio.gather(*tasks)
Jul 28 16:14:50 ha hass[2668]: File "./lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 641, in _async_add_entity
Jul 28 16:14:50 ha hass[2668]: await entity.add_to_platform_finish()
Jul 28 16:14:50 ha hass[2668]: File "./lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 776, in add_to_platform_finish
Jul 28 16:14:50 ha hass[2668]: self.async_write_ha_state()
Jul 28 16:14:50 ha hass[2668]: File "./lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
Jul 28 16:14:50 ha hass[2668]: self._async_write_ha_state()
Jul 28 16:14:50 ha hass[2668]: File "./lib/python3.10/site-packages/homeassistant/helpers/entity.py", line 569, in _async_write_ha_state
Jul 28 16:14:50 ha hass[2668]: available = self.available # only call self.available once per update cycle
Jul 28 16:14:50 ha hass[2668]: File "~/.homeassistant/custom_components/huawei_solar/sensor.py", line 774, in available
Jul 28 16:14:50 ha hass[2668]: or self.coordinator.data[self.optimizer.id].running_status
Jul 28 16:14:50 ha hass[2668]: AttributeError: 'HuaweiSolarOptimizerSensorEntity' object has no attribute 'optimizer'
The text was updated successfully, but these errors were encountered:
System Health details
System Health
Huawei Solar Setup
Inverter with optimizers
Describe the issue
Looks like untested code has sneaked in. Changing optimizer.id to optimizer_id in line 774 of sensor.py fixes the issue.
Reproduction steps
Relevant debug logs
The text was updated successfully, but these errors were encountered: