Skip to content

Automation Examples EN

Kay edited this page Apr 26, 2026 · 1 revision

Automation Examples

Sprache: English · Deutsch

A collection of common YAML automations using this integration. Adapt entity IDs to match your setup.

Water the garden when soil is dry

automation:
  - alias: "Water when soil moisture drops below 30%"
    trigger:
      - platform: numeric_state
        entity_id: sensor.smart_sensor_moisture
        below: 30
    condition:
      - condition: time
        after: "06:00:00"
        before: "09:00:00"
    action:
      - service: gardena_smart_system.start_watering
        target:
          entity_id: valve.garden_valve_1
        data:
          duration: 20

Send a notification when the Automower has an error

automation:
  - alias: "Notify on Automower error"
    trigger:
      - platform: state
        entity_id: binary_sensor.automower_450x_error
        to: "on"
    action:
      - service: notify.mobile_app
        data:
          title: "Automower Error"
          message: >
            The mower reported an error.
            State: {{ states('sensor.automower_450x_state') }}
            Error code: {{ states('sensor.automower_450x_error_code') }}

Park the mower when rain is expected

automation:
  - alias: "Park mower before rain"
    trigger:
      - platform: numeric_state
        entity_id: sensor.openweathermap_forecast_precipitation_probability
        above: 80
    condition:
      - condition: state
        entity_id: lawn_mower.automower_450x_mower
        state: "mowing"
    action:
      - service: lawn_mower.dock
        target:
          entity_id: lawn_mower.automower_450x_mower

Track mower blade usage and notify for replacement

automation:
  - alias: "Notify when blades need replacement"
    trigger:
      - platform: numeric_state
        entity_id: sensor.automower_450x_blade_usage_time
        above: 200
    action:
      - service: notify.mobile_app
        data:
          title: "Blade replacement needed"
          message: "The Automower blades have been running for over 200 hours. Consider replacing them."

Warn when API budget is running low

automation:
  - alias: "Warn when Gardena API budget below 20 %"
    trigger:
      - platform: numeric_state
        entity_id: sensor.gardena_smart_system_hub_api_budget_remaining
        below: 20
    action:
      - service: notify.mobile_app
        data:
          title: "Gardena API budget low"
          message: >
            Only {{ states('sensor.gardena_smart_system_hub_api_budget_remaining') }} %
            of the monthly Husqvarna API budget remains.

Open multiple irrigation zones in sequence

The Smart Irrigation Control allows at most 2 valves open at the same time. Use a sequence with wait_template to chain them safely:

automation:
  - alias: "Sequential watering"
    trigger:
      - platform: time
        at: "06:00:00"
    action:
      - service: gardena_smart_system.start_watering
        target:
          entity_id: valve.zone_1
        data:
          duration: 15
      - delay: "00:15:30"
      - service: gardena_smart_system.start_watering
        target:
          entity_id: valve.zone_2
        data:
          duration: 15

See also: Entities and Services

Clone this wiki locally