How to pause an automatisation

Hello

i’m looking to program a pause on an automatisation.
exemple : i want to pause my watering system when i open an outside light and start the automatisation when th elight is close (the light is activated by a switch manually)

thank you

Post the automation you currently have that controls your watering system.

The most common way to achieve what you describe is to use an “input_boolean” helper as way to enable/disable the execution of an automation.
Just use it as a condition.

The other way is to just enable/disable the automation, but it’s not recommended (although I can’t remember why).

thank you i will try it

if the thing you want to do is pause the watering system, i don’t think “pausing” the automation will do much, since typically the home assistant automation kicks off the irrigation, then the irrigation runs. the ha automation isn’t actually powering the sprinklers. depending on the automation, maybe you have it turning on one zone after another zone? if so, pausing it will cause the next zone not to start, but it won’t stop the irrigation immediately on the current zone.

if your goal is to pause the irrigation when the light is on, you should probably create an automation that triggers on the light turning on, and have that automation actually call the irrigation to stop. the complicated part might be to cause it to resume where it left off…

but as @123 says, you should post your automation that you’ve got. because the way to do this would really vary depending on how you’ve got your current setup…

Hello
this is the automation, i check if the lights are open but no program at this time if i open a lignt.

Sprinkler #1 automation

alias: "Sprinkler #1 Soir"
description: "Départ sprinkler #1 soir"
trigger:
  - platform: sun
    event: sunset
    offset: "+00:30:00"
condition:
  - condition: and
    conditions:
      - condition: and
        conditions:
          - condition: device
            type: is_off
            device_id: e808b7085e62fd5388523f2458ede11d
            entity_id: 21f3d2816dce450bc61dda223e31b518
            domain: light
          - condition: device
            type: is_off
            device_id: 030eee495c19b665a73857ebd21202b0
            entity_id: 1fe5e1b2633b1c10b5cab02f3c2fc27a
            domain: switch
          - condition: device
            type: is_off
            device_id: 626b91e1f021052c76a756d8098f5595
            entity_id: 5a4ecc0b5cd38af9e561e95e94a94944
            domain: switch
          - condition: device
            type: is_off
            device_id: a28fc19cf495efc5a236ac72328a9ca2
            entity_id: 4f2b9705b186b68504f27b0699a970f7
            domain: light
          - condition: not
            conditions:
              - type: is_precipitation_intensity
                condition: device
                device_id: 7a09ee08f4eff48aaa2db8def39d49e8
                entity_id: e74e82c98334ad98942a1edd1cbdc74c
                domain: sensor
                above: 1
                below: 100
              - type: is_value
                condition: device
                device_id: 7a09ee08f4eff48aaa2db8def39d49e8
                entity_id: 4ac002cf52993bbaee9fc3f664a1c661
                domain: sensor
                above: 50
                below: 100
          - condition: time
            after: "16:00:00"
            before: "22:00:00"
            weekday:
              - mon
              - tue
              - fri
              - sat
              - thu
action:
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      device_id: ca9fe4c0d41016bb77c943c967fbd9a1
mode: single

when i open a ligne for the dog at night automation

alias: 01-Allumer lumières cours arrière
description: Allumer les lumières cours arrière
trigger:
  - platform: device
    type: turned_on
    device_id: 626b91e1f021052c76a756d8098f5595
    entity_id: 5a4ecc0b5cd38af9e561e95e94a94944
    domain: switch
condition:
  - condition: time
    weekday:
      - sun
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
    after: sensor.sun_next_setting
    before: sensor.sun_next_rising
  - condition: sun
    before: sunrise
    before_offset: "0"
    after: sunset
    after_offset: "5"
action:
  - type: turn_on
    device_id: e808b7085e62fd5388523f2458ede11d
    entity_id: 21f3d2816dce450bc61dda223e31b518
    domain: light
    brightness_pct: 100
  - type: turn_on
    device_id: 030eee495c19b665a73857ebd21202b0
    entity_id: 1fe5e1b2633b1c10b5cab02f3c2fc27a
    domain: switch
  - type: turn_on
    device_id: 8458b37a793aad85b057146ac3034609
    entity_id: 40e5a81366d0f255778b2227d272872f
    domain: switch
mode: single

ah, yup. your sprinkler automation runs for a split second. just enough to kick off your irrigation. you would need to issue a command to your irrigation to pause and resume… not sure if your system has that ability or not.

a couple unrelated points, but spurred by looking at your automation.

  1. you should avoid using device id’s in your automation. here’s more info:
    Why and how to avoid device_ids in automations and scripts

  2. conditions in the condition block are “and” already. so you don’t need to wrap them in an “and” clause like you have on your sprinkler automation. in fact, it looks like you have 2 “and” clauses wrapping each other. both are unnecessary.

thank you for your advise, i’m a beginner in domotics so any advise are welcome.
i change the way i program them.