Skip to content

Commit

Permalink
Fix modbus_client.close() is not async
Browse files Browse the repository at this point in the history
  • Loading branch information
MadOne committed Oct 25, 2024
1 parent f49919f commit e49542a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/weishaupt_modbus/modbusobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ async def connect(self):
async def close(self):
"""Close modbus connection."""
try:
await self._modbus_client.close()
# await self._modbus_client.close()
self._modbus_client.close()
except ModbusException:
warnings.warn("Closing connection to heatpump failed")
return False
Expand Down

0 comments on commit e49542a

Please sign in to comment.