Here a link to a small example that shows how to enable or disable a thing based on its state.
This is for modbus but you can use it as a starting point.
Here a link to a small example that shows how to enable or disable a thing based on its state.
This is for modbus but you can use it as a starting point.