Logger: homeassistant.helpers.entity
Source: custom_components/solarman/solarman.py:234
Integration: Solarman ([documentation](https://github.com/StephanJoubert/home_assistant_solarman/blob/main/README.md), [issues](https://github.com/StephanJoubert/home_assistant_solarman/issues))
First occurred: 12:27:14 (81 occurrences)
Last logged: 12:31:52
Update for sensor.solarman_pv1_power fails
Update for sensor.solarman_pv2_power fails
Update for sensor.solarman_pv1_voltage fails
Update for sensor.solarman_pv2_voltage fails
Update for sensor.solarman_pv1_current fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 548, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_device_update
raise exc
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/solarman/sensor.py", line 140, in update
self.inverter.update()
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 190, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/solarman/solarman.py", line 175, in update
self.get_statistics()
File "/config/custom_components/solarman/solarman.py", line 234, in get_statistics
sock.close()
UnboundLocalError: local variable 'sock' referenced before assignment
I rolled back to v1.4.1 and entities are available again.
Integration (sofar_lsw3.yaml) worked for a long time, but after last update all entities became unavailable. In logs I see warnings and errors:
I rolled back to v1.4.1 and entities are available again.