Fix Flexit mypy error in pymodbus (#97799)
This commit is contained in:
parent
50da5c3fae
commit
f0abea48a6
1 changed files with 2 additions and 4 deletions
|
@ -177,9 +177,7 @@ class Flexit(ClimateEntity):
|
||||||
self, register_type: str, register: int
|
self, register_type: str, register: int
|
||||||
) -> int:
|
) -> int:
|
||||||
"""Read register using the Modbus hub slave."""
|
"""Read register using the Modbus hub slave."""
|
||||||
result = await self._hub.async_pymodbus_call(
|
result = await self._hub.async_pb_call(self._slave, register, 1, register_type)
|
||||||
self._slave, register, 1, register_type
|
|
||||||
)
|
|
||||||
if result is None:
|
if result is None:
|
||||||
_LOGGER.error("Error reading value from Flexit modbus adapter")
|
_LOGGER.error("Error reading value from Flexit modbus adapter")
|
||||||
return -1
|
return -1
|
||||||
|
@ -197,7 +195,7 @@ class Flexit(ClimateEntity):
|
||||||
return result / 10.0
|
return result / 10.0
|
||||||
|
|
||||||
async def _async_write_int16_to_register(self, register: int, value: int) -> bool:
|
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
|
self._slave, register, value, CALL_TYPE_WRITE_REGISTER
|
||||||
)
|
)
|
||||||
if not result:
|
if not result:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue