This commit is contained in:
@@ -24,7 +24,7 @@ class ToDevices(AbstractMqttPublisher):
|
|||||||
continue
|
continue
|
||||||
if device.register_type != 'coil':
|
if device.register_type != 'coil':
|
||||||
raise Exception(f"Unsupported register type {device.register_type} for input device {device.name}")
|
raise Exception(f"Unsupported register type {device.register_type} for input device {device.name}")
|
||||||
value = payload == b'On'
|
value = payload == b'on'
|
||||||
self.modbusHandler.writeCoil(device.slave_id, device.address, value)
|
self.modbusHandler.writeCoil(device.slave_id, device.address, value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Caught exception in onMessage: {str(e)}")
|
logger.error(f"Caught exception in onMessage: {str(e)}")
|
||||||
|
|||||||
Reference in New Issue
Block a user