BenPru / luxtronik

Luxtronik integration for Home Assistant
MIT License
67 stars 23 forks source link

coroutine 'LuxtronikThermostat._async_control_heating' was never awaited self._async_control_heating() #108

Open augi opened 12 months ago

augi commented 12 months ago

This error originated from a custom integration.

Logger: py.warnings Source: custom_components/luxtronik2/climate.py:254 Integration: Luxtronik First occurred: June 30, 2023 at 7:02:03 PM (9 occurrences) Last logged: July 9, 2023 at 9:29:18 PM

/config/custom_components/luxtronik2/climate.py:254: RuntimeWarning: coroutine 'LuxtronikThermostat._async_control_heating' was never awaited self._async_control_heating()

Maybe there should be something like asyncio.get_event_loop().run_in_executor() used. I'm using 2023.04.30.

BenPru commented 10 months ago

See the branch https://github.com/BenPru/luxtronik/tree/core-preview I have redesigned the hole integration in this branch to publish it as core ha integration. But I have no support and atm not enough time to finalize the work on it. See the issue #75.

BenPru commented 8 months ago

Unfortunately there is no new pypi python-luxtronik version yet. In order to get and display the newly calculated values ​​immediately after a write process, a sleep of 1000ms is good. <800ms did not always deliver the new data. However, sleep is prohibited in the HA core. An async would exit the thread and delay or make the GUI update impossible. As a workaround, I'm simply considering closing the socket connection between write and read and re-establishing it. I guess this can make sleep unnecessary and we can still get the new data.