mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 19:25:12 +02:00
Fix Flexit mypy error in pymodbus (#97799)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user