Skip to content

Commit

Permalink
feat: Support register write via rpc topic
Browse files Browse the repository at this point in the history
  • Loading branch information
mazocode committed Sep 11, 2024
1 parent 4696cd4 commit b714fa3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions modbus2mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ def set_value(self, src, params):
# Can't set unknown state
return False

wordcount = 1
bo = Endian.BIG
if self.littleendian:
bo = Endian.LITTLE
Expand All @@ -333,7 +332,6 @@ def set_value(self, src, params):
if self.format == "float":
builder.add_32bit_float(float(value))
payload = builder.to_registers()
wordcount = 2
else:
payload = int(value)

Expand Down

0 comments on commit b714fa3

Please sign in to comment.