Tutorial: let Cortex decide whether to water the garden
My own setup: a Gardena water control with two valves and a soil moisture sensor. Instead of stacking conditions (moisture below X, no rain coming, not too cold…), I let Cortex make the call and keep the Flow small.
1. Make a brain “Garden”
Devices → + → Cortex AI → Brain. Tick the soil sensor and the water control. In the brain’s settings keep Weather and Sunrise and sunset on, and put your own rules in House rules, for example:
Water when the soil moisture is below 40 %. Skip when rain is expected in the next 12 hours or when it’s colder than 5 °C.
Tip: on the Cortex AI settings page, “What does it see?” shows exactly the text the AI model gets.
2. Build the Flow
- When: every day at 07:00
- And: Cortex answers yes to “Should the garden be watered this morning?”, on the Garden brain. Set otherwise to no: if the model is slow or offline, the garden simply isn’t watered that morning.
- Then: open the valve for 20 minutes. Else: a notification, if you like.
3. See why it decided
Every question, answer and reason is in the Cortex AI settings under Log. The picture above is a real answer from my brain this evening.
Good to know
- It works the same with a local model (Ollama, LM Studio) if you don’t want a cloud key.
- Cortex gets the weather forecast, not the rain that already fell. The soil sensor covers that part.
- A question like this costs a fraction of a cent with the small OpenAI or Gemini models, and you can set a daily budget.

