-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMSHAN Stopped Working after update to Home Assistant 2023.6.0 #62
Comments
Same here |
python was updated to 3.11 in this HA release. https://docs.python.org/3/library/asyncio-task.html#asyncio.wait |
https://github.com/toreamun/amshan/blob/master/han/meter_connection.py#L353-L356 I guess the fix would be to create Tasks of these with |
I'm no python developer, so I didn't get it to work when testing. |
Ok, so here is what I did. I'm not a python programmer and I do not really know what I'm doing. But, it seems like it fixed the problem. in meter_connection.py
to
change the connect_loop method to:
Use at your own risk and do keep a copy of the original file. Hope it helps someone. 😃 |
It seems that @toreamun might have abandoned this project, no activity for a long time and no response to this critical issue. There is also (at least) another custom component for reading AMS data through MBus available so this might be a good time to switch over if you are using this component for that purpose. I am just writing this so people coming to this issue realizes that there are alternatives, not to be disrespectful to anyone :-) |
I can confirm that your solution is working. Thank you!:-)
|
Do we need to change the manifest.json to reflect the new version of the AMSHAN ?
|
Sorry for long delay. |
Credits for the fix goes to @m0bygit |
AMSHAN Stopped Working after update to Home Assistant 2023.6.0
2023-06-08 14:17:46.806 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/han/meter_connection.py", line 353, in connect_loop
await wait(
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 415, in wait
raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.
2023-06-08 14:17:46.817 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/asyncio/base_events.py:1907: RuntimeWarning: coroutine 'Event.wait' was never awaited
handle = self._ready.popleft()
2023-06-08 14:17:46.829 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/asyncio/base_events.py:1907: RuntimeWarning: coroutine 'ConnectionManager._try_connect' was never awaited
handle = self._ready.popleft()
The text was updated successfully, but these errors were encountered: