Decide when to water a potted tree from sensors and the forecast

Aviv Oron runs a small Claude-backed agent twice a day that reads Home Assistant sensors and the weather, then decides whether to water a balcony citrus tree, for about $1.50 a month.

Done withCustom agentinHome Assistant· Oct 16, 2026

What they did

Oron keeps a young citrus tree in a pot on a covered balcony in Israel, so every drop of water comes through a drip line on a Galcon Bluetooth tap timer. He reverse-engineered the timer's protocol, wrapped it in a Python bridge that speaks MQTT, and brought it into Home Assistant alongside a plant sensor, a moisture probe and a planned load-cell scale under the pot. The agent itself is a short Python program in Docker on a Raspberry Pi. At 05:30 and 21:30 it pulls valve state, watering history, sensor readings and the forecast from Home Assistant, sends them to Claude through the Anthropic API, and gets back a structured answer: water or not, for how many minutes, and one sentence of reasoning. Its only way to act is one Home Assistant script that accepts 1 to 30 minutes. Each decision goes to a JSONL log and a phone notification. He built most of the code with Claude Code over SSH on the Pi.

How it went

So far the agent runs in dry-run mode: it logs what it would do and Oron compares its reasoning with his own before letting it open the valve. The valve control, guardrails, Home Assistant and the agent are live; the scale is still on the bench. Each check costs about 2.5 cents on Opus 5.5, around $1.50 a month. He can also ask the tree's state from his phone through a Home Assistant MCP connector limited to the watering scripts and sensors. No season of results yet; he plans a follow-up.

Worth knowing

All hard limits live outside the model: the valve carries its own countdown on every open, the bridge caps 30 minutes per run and 60 per day, a saucer leak probe shuts the valve locally, and a dumb backup schedule waters if nothing has run in three to seven days. The agent never sends a bare open command.

Try it

With Custom agent· 7 parts to fill in

Every morning and evening, read the state of [my plant or garden zone] from [Home Assistant or my sensor hub]: soil moisture or pot weight, the last [number] waterings, and the weather forecast for [my location]. Decide whether to water now and for how many minutes, between 1 and [max minutes], and give one sentence of reasoning. Only act by calling [my watering script]; never open a valve directly. Log each decision with its inputs. For the first [number] days run in dry-run: write what you would do, take no action, and send the decision to me for comparison.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related