So I'm building an irrigation system which turns on when the value received from a Miflora is <20
So far I have:
Pi connected to a relay and a Node-red flow that opens or closes the relays
Miflora readings coming in from https://flows.nodered.org/node/node-red-contrib-xiaomi-ble
I've set up a dashboard and have gauges showing {{payload.moisture}}
What I want to do next is turn on the relay when {{payload.moisture}} <20 I guess I need a 'function'? How would you do this?