Skip to content

Commit

Permalink
fixed type hints for write_register and write_registers (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
rauberdaniel authored Sep 7, 2024
1 parent 03542f6 commit f9e05bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymodbus/client/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def write_coil(self, address: int, value: bool, slave: int = 1) -> T:
"""
return self.execute(pdu_bit_write.WriteSingleCoilRequest(address, value, slave=slave))

def write_register(self, address: int, value: int, slave: int = 1) -> T:
def write_register(self, address: int, value: bytes, slave: int = 1) -> T:
"""Write register (code 0x06).
:param address: Address to write to
Expand Down Expand Up @@ -322,7 +322,7 @@ def write_coils(
)

def write_registers(
self, address: int, values: list[int], slave: int = 1, skip_encode: bool = False) -> T:
self, address: int, values: list[bytes], slave: int = 1, skip_encode: bool = False) -> T:
"""Write registers (code 0x10).
:param address: Start address to write to
Expand Down

0 comments on commit f9e05bc

Please sign in to comment.