Fix Flexit mypy error in pymodbus (#97799)

pull/94736/head^2
jan iversen 2023-08-04 21:38:32 +02:00 committed by GitHub
parent 50da5c3fae
commit f0abea48a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -177,9 +177,7 @@ class Flexit(ClimateEntity):
self, register_type: str, register: int
) -> int:
"""Read register using the Modbus hub slave."""
result = await self._hub.async_pymodbus_call(
self._slave, register, 1, register_type
)
result = await self._hub.async_pb_call(self._slave, register, 1, register_type)
if result is None:
_LOGGER.error("Error reading value from Flexit modbus adapter")
return -1
@ -197,7 +195,7 @@ class Flexit(ClimateEntity):
return result / 10.0
async def _async_write_int16_to_register(self, register: int, value: int) -> bool:
result = await self._hub.async_pymodbus_call(
result = await self._hub.async_pb_call(
self._slave, register, value, CALL_TYPE_WRITE_REGISTER
)
if not result: