wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some AlphaESS, Growatt, Sofar, Solinteg, Solis, SRNE, Swatten)
317 stars 101 forks source link

[Bug]: 2024.02.6 Beta 3, not writing to Inverter #768

Closed wills106 closed 8 months ago

wills106 commented 8 months ago

Describe the bug

Following update to 2024.02.6 Beta 3 reading of entities works as expected. But writing to the Inverter results in: coroutine 'ModbusBaseClient.async_execute' was never awaited

2024-02-22 11:49:36.764 INFO (MainThread) [custom_components.solax_modbus.select] writing SolaX select register 159 value 4
2024-02-22 11:49:36.765 WARNING (MainThread) [py.warnings] /config/custom_components/solax_modbus/select.py:109: RuntimeWarning: coroutine 'ModbusBaseClient.async_execute' was never awaited await self._hub.async_write_register(unit=self._modbus_addr, address=self._register, payload=payload)

Integration Version

2023.02.6b3

Homeassistant core version

2024.2.2

Inverter brand

SolaX Power

Plugin used

plugin_solax.py

Serial prefix

H1E5

Inverter firmware versions

ARM 3.28, DSP 3.32

Connection Method

Gen3 Ethernet

Dongle firmware

N/A

Detailed Error Log

No response

Additional context

No response

wills106 commented 8 months ago

Was missing await on return self._client.write_register(address, payload[0], **kwargs) Needs to be return await self._client.write_register(address, payload[0], **kwargs) https://github.com/wills106/homeassistant-solax-modbus/commit/fb0c1cb5ddae3de93230a3d3105799db170d5a78

Will release a new update shortly.

wills106 commented 8 months ago

Just released 2024.02.6b4 correcting the missing await.

wills106 commented 8 months ago

Just released 2024.02.6 so closing this issue down.