Help! codification simple script (YAML) for Rachio irrigation

Hello, I am not an expert in YAML. Here is the situation:

  • I have defined a “HELPERS” containing the number of minutes for the irrigation of a zone in my RACHIO controlled irrigation system;
  • I wrote a SCRIPT and I can’t find the syntax (after several tries) to assign the HELPERS variable to “duration”.

Here is a screenshot of the “HELPERS” and the SCRIPT.



alias: Test arrosage
  - service: rachio.start_multiple_zone_schedule
        - switch.coin_terrasse_arriere
        duration: "{{ states('input_number.duree_cycle_arrosage') | int(0) }}"
mode: single
icon: mdi:sprinkler

Thank you. It works very well.

You’re welcome!

Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.