This commit is contained in:
2019-07-08 15:28:13 +01:00
parent e1750e5387
commit 6229989dd6
3 changed files with 3 additions and 2 deletions

View File

@ -145,7 +145,8 @@ class DiscreteInputDatapoint(AbstractModbusDatapoint):
unit=self.unit)
if type(result) in [ExceptionResponse, ModbusIOException]:
raise DatapointException(result)
if not self.updateOnly or (result.registers != self.lastValue):
if not self.updateOnly or (result.bits != self.lastValue):
self.lastValue = result.bits
# print("{0}: {1!s}".format(self.label, result.bits))
pubQueue.put(MqttProcessor.PublishItem(self.publishTopic, str(result.bits)))