I have just discovered mycodo (amazing!) and would like to use it as a I/O interface to connect sensors and peristatic pumps to home assitant via MQTT. Effectively make and MQTT version of the raspipool pool management system.
I have managed to make some headway but need to simulate a flow meter using a simple switch. ie when a GPIO pin is high, I want to send a flow value of 4500 over MQTT, and zero when its low. I can set the GPIO pin as an input and send the bolean value to MqTT, but how do I send any other value?