Fix modbus typing (#66872)

This commit is contained in:
Marc Mueller 2022-02-19 15:48:05 +01:00 committed by GitHub
parent 3770f4da5c
commit c46728c2b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -358,7 +358,7 @@ class ModbusHub:
return True return True
def _pymodbus_call( def _pymodbus_call(
self, unit: int, address: int, value: int | list[int], use_call: str self, unit: int | None, address: int, value: int | list[int], use_call: str
) -> ModbusResponse: ) -> ModbusResponse:
"""Call sync. pymodbus.""" """Call sync. pymodbus."""
kwargs = {"unit": unit} if unit else {} kwargs = {"unit": unit} if unit else {}