A rain-aware, per-zone mowing scheduler for Mammotion robot mowers (Luba / Luba 2 / Luba 3 and similar), built entirely in Home Assistant.
- Schedule each lawn/zone independently (once or twice a week)
- Automatically delays mowing when it is raining or rain is forecast
- Optional night block so the mower never goes out after dusk
- Retries automatically when conditions clear
- Simple dashboard using only built-in cards (no custom card required)
- Live GPS map of the mower, no extra hardware needed
Full write-up and background: Luba Mower Home Assistant Scheduler, the 2026 update
This project was rebuilt in June 2026 around the current Mammotion-HA integration (0.6.x). The important change:
- Old approach: scripts called
mammotion.start_mowwithareas: [switch.<mower>_area_*]and explicit angle/speed parameters. - New approach: scripts press the mower's saved-task button for each zone (
button.<mower>_<task>).
Why the change: on Mammotion-HA 0.6.x, mowing zones are exposed as buttons (one per saved task/map area in the Mammotion app), and the old switch.<mower>_area_* entities no longer reliably exist, especially on the Luba 3. Pressing the saved-task button runs that task using the settings you saved in the Mammotion app (including the cutting angle, which you can see on the app's map). This is more robust across integration updates and easier to tune.
Everything is now generic (lawn_mower.mower, zones lawn_1 / lawn_2 / lawn_3) so you can drop it in and rename to suit. The blade-maintenance and scene helpers from the old version were removed to keep the project focused on scheduling.
| Component | Required? | Where |
|---|---|---|
| Mammotion Home Assistant integration | Yes | HACS (custom repository) |
| A weather integration providing rainfall + probability | Optional (for rain delay) | e.g. core OpenWeatherMap |
The example dashboard uses built-in Lovelace cards only, so no Mushroom / map-card / camera-agora-card is needed. (You can of course swap in custom cards if you prefer.)
This scheduler triggers tasks you have already saved in the Mammotion app. For each lawn/zone:
- In the Mammotion app, create and save a mowing task for that area (set the cutting angle, speed, blade height, edge mode, etc.).
- After the integration syncs, that task appears in Home Assistant as a button, e.g.
button.mower_back_lawn. Find it in Developer Tools > States (searchbutton.).
If a button does not exist for a zone, the scheduler cannot mow it, create the task in the app first.
These files use Home Assistant's split-configuration includes. If you already split your config, merge the keys; otherwise add the include lines below.
-
Copy the YAML files into your Home Assistant
config/folder (next toconfiguration.yaml). -
Add the includes to
configuration.yaml(skip any you already have, and merge instead of duplicating the top-level key):input_boolean: !include input_boolean.yaml input_select: !include input_select.yaml input_datetime: !include input_datetime.yaml input_text: !include input_text.yaml template: !include template.yaml script: !include scripts.yaml automation: !include automations.yaml
If you already have, say,
automation: !include automations.yaml, merge the contents of this file into yours rather than adding a second key. -
Restart Home Assistant (or reload each domain from Developer Tools > YAML).
-
Rename the placeholder entities to match your setup. Search-and-replace across
scripts.yaml,automations.yamlanddashboard.yaml:lawn_mower.mower-> your mower entity (Developer Tools > States, searchlawn_mower.)button.mower_lawn_1/_lawn_2/_lawn_3-> your saved-task buttons- rename the
lawn_1/lawn_2/lawn_3helpers if you want friendlier names
-
Add the dashboard. Open
dashboard.yaml, then paste it into a new dashboard view (Settings > Dashboards > Edit > raw configuration editor, underviews:), and replace the placeholder entities. -
Set it running: turn on Mowing Automation Enabled, choose a frequency per zone, and set each zone's Next Mow to a future date/time. The scheduler fires at that time and then reschedules itself.
- Each zone has a Next Mow time (
input_datetime.lawn_X_next_time) and a Frequency (input_select.lawn_X_schedule). - A per-zone Scheduler automation fires at the Next Mow time. If the scheduler is enabled, the zone is not set to
never,do_not_mowis off, and the mower is idle, it runsscript.mow_lawn_X, which presses the saved-task button and reschedules the next run (+7 days for once a week, +3 days for twice a week). - If anything blocks the mow (rain, night, mower busy), the Next Mow time is pushed forward an hour (jumping past dusk overnight), so the zone retries automatically.
- Rain delay (optional):
do_not_mowturns on whensensor.rain_todayis above 3 mm orsensor.rain_probabilityis above 50%, and clears when it is dry. Seetemplate.yamlto wire these to your weather integration. With no rain sensors, rain delay simply never triggers. - Night block (optional): with Block Night Mowing on,
do_not_mowturns on an hour before sunset and clears an hour after sunrise.
How do I get the mower's GPS / map? Do I need a tracker or tag?
No extra hardware. The Mammotion integration already provides a device_tracker.<mower> entity from the mower's own GPS. The built-in map card in dashboard.yaml shows it and auto-centres, no coordinates to configure.
Where do I get the camera card?
You don't need a custom card any more. The dashboard uses the built-in picture-entity card pointed at your camera.<mower> entity (Luba models with a camera). Remove that card if your model has no camera.
Where exactly do the files go / how do I do the first install?
See Installation above. The files sit next to configuration.yaml, and you reference them with the !include lines shown. Restart, then rename the placeholder entities to match yours.
Can it drive two mowers?
Yes, as an advanced setup: duplicate the helpers/scripts/automations per mower (or add an input_select per zone to choose the mower), and have each zone's scheduler check its assigned mower's state. This project ships single-mower to keep it simple.
Built on top of the excellent Mammotion Home Assistant integration by Michael Arthur. Thanks to everyone who has opened issues and helped improve this.