Irrigation Unlimited Integration

Hi Benedikt,

I think we should move items 1 & 2 back to issue 132 for deeper analysis.

Here is an idea for adding in the rain sensor. This is untested and the assumption is binary_sesnor.rain_bird_my_rain_sensor. Tweak as required.

# Automation to adjust the run times for Irrigation Unlimited.
# It uses the 5 day weighted rain total and the moving 5 day average temperature sensors
# created above to generate a variation.
# Adjust rain_total_threshold, rain_rate_threshold and temperature_threshold variables to suit you needs.
automation:
  - id: 'IU1653340123453'
    alias: Irrigation Unlimited Adjustment
    trigger:
      # -------------------------------------------------------------------
      # Choose how you want to trigger this automation.
      # Comment out/delete/change as required.
      # -------------------------------------------------------------------
      # Run at a fixed time
      - platform: time
        at: "02:00"
      # Run when Home Assistant starts
      - platform: homeassistant
        event: start
      # Run when the sensors update. Don't use this option if any of your
      # schedules use the 'anchor: finish'. It will most likely cause the
      # system to skip. Use a fixed time.
      - platform: state
        entity_id:
          - sensor.irrigation_unlimited_rain_weighted_total
          - sensor.irrigation_unlimited_temperature_5_day_moving_average
          - sensor.wetter_hourly_forecast_precipitation
          - binary_sensor.rain_bird_my_rain_sensor
    condition:
      condition: and
      conditions:
        - "{{ states('sensor.irrigation_unlimited_rain_weighted_total') | float(-1) != -1 }}"
        - "{{ states('sensor.wetter_hourly_forecast_precipitation') | float(-1) != -1 }}"
        - "{{ states('sensor.irrigation_unlimited_temperature_5_day_moving_average') | float(-273) != -273 }}"
        - "{{ states('binary_sensor.rain_bird_my_rain_sensor') | float(-1) != -1 }}"
    action:
      service: irrigation_unlimited.adjust_time
      data:
        # -------------------------------------------------------------------
        # Please see documentation regarding the adjust_time service call.
        # Choose an option below. Comment out/delete/change as needed.
        # *** This will NOT work as is. ***
        # 1. Adjust a single zone. Change the zone as required
        # entity_id: binary_sensor.irrigation_unlimited_c1_z1
        # 2. Adjust a sequence. Change the sequence_id as required
        entity_id: binary_sensor.irrigation_unlimited_c1_m
        # sequence_id: 1
        # -------------------------------------------------------------------
        percentage: >
          {# Threshold variables #}
          {% set rain_total_threshold = 3.5 %}
          {% set rain_rate_threshold = 1.0 %}
          {% set temperature_threshold = 20.0 %}

          {# Sensor data #}
          {% set rain_total = states('sensor.irrigation_unlimited_rain_weighted_total') | float(-1) %}
          {% set rain_rate = states('sensor.wetter_hourly_forecast_precipitation') | float(-1) %}
          {% set temperature_average = states('sensor.irrigation_unlimited_temperature_5_day_moving_average') | float(-273) %}
          {% set rain_sensor = is_state('binary_sensor.rain_bird_my_rain_sensor', 'off')}

          {# Threshold variables #}
          {% set rain_multiplier = (1 - (rain_total / rain_total_threshold)) %}
          {% set temperature_multiplier = temperature_average / temperature_threshold %}

          {% set multiplier = 1.0 %}
          {% if rain_sensor and rain_rate < rain_rate_threshold and rain_multiplier > 0 and rain_total < rain_total_threshold %}
            {% set multiplier = multiplier * temperature_multiplier %}
            {% set multiplier = multiplier * rain_multiplier %}
          {% else %}
            {% set multiplier = 0.0 %} {# It's raining or enough already #}
          {% endif %}

          {# Return multiplier as a percentage #}
          {{ (multiplier * 100) | round(0) }}

Thank you, seems to work perfect!

There was just one little typo:
→ {% set rain_sensor = is_state('binary_sensor.rain_bird_my_rain_sensor', 'off') %}

Now, when it’s possible to fix the issue with adjusting time to 0%, I’m perfectly fine :slight_smile:

I’ve a question regarding this line?
What is it for?

It is to make sure the sensor is available. The float(-1) casts the value but has a default value in case the sensor is not available for whatever reason; off-line, still starting up etc. The -1 value is not a valid sensor value so it must be the default value and therefore the sensor is not available.
Automations will throw an error if you attempt to use sensors that are not available so you need to always check.

Since 2023.04, template features a new function: has_value. Does it serves the same purpose?

I unterstand. But in that case, the outcome is always “false” (regardless the value of the binary sensor on or off) and the automation will never run


As noted this is untested, however the assumption is false will cast to 0 and true to 1 and -1 will come into play if the sensor is unavailable. So if the value is not -1 then the sensor is working.

I think you are correct. A better way to test for sensor availability.

Hi @rgc99, thank you for the help. It’s running great an the meantime!

I noticed something weird, when setting up notifications.

This is my automation to be fired at start and finish of a sequence:

alias: Irrigation Unlimited Benachrichtigung
description: ""
trigger:
  - platform: event
    event_type: irrigation_unlimited_start
    id: start
  - platform: event
    event_type: irrigation_unlimited_finish
    id: finish
  - platform: event
    event_type: mobile_app_notification_action
    event_data:
      action: irrigation_stop
    id: stop
condition: []
action:
  - if:
      - condition: trigger
        id:
          - start
          - finish
    then:
      - service: notify.mobile_app_sm_g990b
        data:
          title: >-
            Die BewÀsserung wurde {{ 'gestartet' if trigger.id =='start' else
            'beendet' }}
          message: >
            Zeit: {{ as_local(trigger.event.time_fired).strftime('%A, %d.%m.%y
            %H:%M') | replace("Monday", "Montag") | replace("Wednesday",
            "Mittwoch") }}

            Programm: {{ trigger.event.data.sequence.name }}

            Auslöser: {% if trigger.event.data.schedule.index is integer %}{{
            trigger.event.data.schedule.name }}{% else %}Manuell{% endif %}

            Dauer: {{ timedelta(seconds=trigger.event.data.run.duration) }}

            Adjustierung: {{ states('sensor.irrigation_adjustment') }}%
          data:
            clickAction: /dashboard-garten/garten
            tag: irrigation
            actions:
              - action: irrigation_stop
                title: BewÀsserung abbrechen
  - if:
      - condition: trigger
        id:
          - stop
    then:
      - service: irrigation_unlimited.cancel
        data:
          entity_id: binary_sensor.irrigation_unlimited_c1_m
mode: single

This works great when starting a sequence:

However, when finishing a sequence, my smartphone doesn’t receive any notification. Interestedly, in the logs everything looks fine and the notification was successfully fired by the automation. In the notification list of my smartphone, nothing is visible except for notifications when starting a sequence and other notifications not related to irrigation. I’m wondering, since starting notifications are received 100%, and finishing notifications 0%.

Has anyone experienced this?
In my case it’s even the same automation and notification



Logs: Seems to be successful





Everything seems to work like it should




but no finishing notifications received.

Any idea?

All the best and thank you for the kind help
Benedikt

I am wondering if part of the trigger.event.data is missing on a finish. Perhaps just hard code a simple “hello world” message to see it works.

But doesn’t it look like everything should have worked properly in my logs? This is what makes me wonder


In the meantime, without any changes, notification at finish event worked the last 2-3 times.

Another observation is, that start and finish events are fired in situations that are not scheduled and I cannot find the reason.

This is my current configuration:

irrigation_unlimited:
  controllers:
    - name: "Rain Bird RC2"
      enabled: true
      zones:
        - name: "Rasen Eingang"
          enabled: true
          entity_id: "switch.rain_bird_z1_rasen_eingang"
          zone_id: "1"
        - name: "Rasen Feige"
          enabled: true
          entity_id: "switch.rain_bird_z2_rasen_feige"
          zone_id: "2"
        - name: "Rasen Magnolie"
          enabled: true
          entity_id: "switch.rain_bird_z3_rasen_magnolie"
          zone_id: "3"
        - name: "Rasen vorne"
          enabled: true
          entity_id: "switch.rain_bird_z4_rasen_vorne"
          zone_id: "4"
        - name: "Rasen hinten"
          enabled: true
          entity_id: "switch.rain_bird_z5_rasen_hinten"
          zone_id: "5"
        - name: "Hecken Treppe"
          enabled: true
          entity_id: "switch.rain_bird_z6_hecken_treppe"
          zone_id: "6"
        - name: "Beet oben"
          enabled: true
          entity_id: "switch.rain_bird_z7_beet_oben"
          zone_id: "7"
        - name: "Beet unten"
          enabled: true
          entity_id: "switch.rain_bird_z8_beet_unten"
          zone_id: "8"
      sequences:
        - name: "Rasen"
          enabled: true
          schedules:
            - time: "06:00"
              weekday: [mon, wed, fri]
              duration: "01:50"
          zones:
            - zone_id: 5
              enabled: true
              duration: "00:25"
            - zone_id: 4
              enabled: true
              duration: "00:25"
            - zone_id: 3
              enabled: true
              duration: "00:20"
            - zone_id: 2
              enabled: true
              duration: "00:20"
            - zone_id: 1
              enabled: true
              duration: "00:20"
        - name: "Beete"
          enabled: true
          schedules:
            - time: "05:00"
              weekday: [tue, thu, sat]
              duration: "02:15"
          zones:
            - zone_id: 6
              enabled: true
              duration: "00:45"
            - zone_id: 7
              enabled: true
              duration: "00:45"
            - zone_id: 8
              enabled: true
              duration: "00:45"

This is my adjustment automation:

template:
  - trigger:
      - platform: time
        at: input_datetime.irrigation_adjustment_1
      - platform: time
        at: input_datetime.irrigation_adjustment_2
      - platform: homeassistant
        event: start
      - platform: state
        entity_id:
          - input_number.pop
          - input_number.prec
          - input_boolean.bypass_rainsensor
          - input_boolean.bypass_suspension
          - input_boolean.bypass_adjustment
    sensor:
      - name: irrigation_adjustment
        state: >
          {% set rain_multiplier = states('sensor.rain_multiplier') | float(-1) %}
          {% set temperature_multiplier = states('sensor.temperature_multiplier') | float(-1) %}
          {% set multiplier = rain_multiplier * temperature_multiplier %}
          {{ (multiplier * 100) | round(0) }}
        unit_of_measurement: "%"
    binary_sensor:
      - name: irrigation_suspend
        state: >
          {% set forecast_pop = states('sensor.wetter_forecast_precipitation_probability') | float(-1) %}
          {% set threshold_pop = states('input_number.pop') | float(-1) %}
          {% set forecast_prec = states('sensor.wetter_forecast_precipitation') | float(-1) %}
          {% set threshold_prec = states('input_number.prec') | float(-1) %}
          {% if forecast_pop < threshold_pop or forecast_prec < threshold_prec %}
            {{ 'off' }}
          {% else %}
            {{ 'on' }}
          {% endif %}

automation:
  - id: 'IU1653340123453'
    alias: Irrigation Unlimited Adjustment
    trigger:
      - platform: homeassistant
        event: start
      - platform: state
        entity_id:
          - sensor.irrigation_adjustment
          - binary_sensor.irrigation_suspend
          - binary_sensor.rainsensor
          - input_boolean.bypass_rainsensor
          - input_boolean.bypass_suspension
          - input_boolean.bypass_adjustment
    condition:
      condition: and
      conditions:
        - "{{ has_value('sensor.irrigation_adjustment') }}"
        - "{{ has_value('binary_sensor.rainsensor') }}"
        - "{{ has_value('binary_sensor.irrigation_suspend') }}"
        - "{{ has_value('input_boolean.bypass_rainsensor') }}"
        - "{{ has_value('input_boolean.bypass_suspension') }}"
        - "{{ has_value('input_boolean.bypass_adjustment') }}"
    action:
      service: irrigation_unlimited.adjust_time
      data:
        entity_id: binary_sensor.irrigation_unlimited_c1_m
        sequence_id: 0
        percentage: >
          {% set adjustment = states('sensor.irrigation_adjustment') | int %}
          {% set suspension = is_state('binary_sensor.irrigation_suspend', 'off') %}
          {% set rain_sensor = is_state('binary_sensor.rainsensor', 'off') %}
          {% set rain_sensor_bypass = is_state('input_boolean.bypass_rainsensor', 'on') %}
          {% set rain_adjustment_bypass = is_state('input_boolean.bypass_adjustment', 'off') %}
          {% set rain_suspension_bypass = is_state('input_boolean.bypass_suspension', 'on') %}

          {% if (rain_sensor or rain_sensor_bypass) and rain_adjustment_bypass and (rain_suspension_bypass or suspension) %}
            {% set percentage = adjustment %}
          {% elif rain_adjustment_bypass is false and (rain_sensor or rain_sensor_bypass) and (rain_suspension_bypass or suspension) %}
            {% set percentage = 100 %}
          {% else %}
            {% set percentage = 0 %}
          {% endif %}

          {{ percentage }}

with input_datetime.irrigation_adjustment_1 set to 02:00 and input_datetime.irrigation_adjustment_2 set to 16:00

The dashboard looks like this:

This is my notification automation:

alias: Irrigation Unlimited Benachrichtigung
description: ""
trigger:
  - platform: event
    event_type: irrigation_unlimited_start
    id: start
  - platform: event
    event_type: irrigation_unlimited_finish
    id: finish
  - platform: event
    event_type: mobile_app_notification_action
    event_data:
      action: irrigation_stop
    id: stop
condition: []
action:
  - if:
      - condition: trigger
        id:
          - start
          - finish
    then:
      - service: notify.mobile_app_sm_g990b
        data:
          title: >-
            Die BewÀsserung wurde {{ 'gestartet' if trigger.id =='start' else
            'beendet' }}
          message: >
            Zeit: {{ as_local(trigger.event.time_fired).strftime('%A, %d.%m.%y
            %H:%M') | replace("Monday", "Montag") | replace("Wednesday",
            "Mittwoch") | replace("Tuesday", "Dienstag") | replace("Thursday",
            "Donnerstag") | replace("Friday", "Freitag") | replace("Saturday",
            "Samstag") | replace("Sunday", "Sonntag") }}

            Programm: {{ trigger.event.data.sequence.name }}

            Auslöser: {% if trigger.event.data.schedule.index is integer %}{{
            trigger.event.data.schedule.name }}{% else %}Manuell{% endif %}

            Dauer: {{ timedelta(seconds=trigger.event.data.run.duration) }} ({{
            states('sensor.irrigation_adjustment') }}%)
          data:
            clickAction: /dashboard-garten/garten
            tag: irrigation
            actions:
              - action: irrigation_stop
                title: BewÀsserung abbrechen
  - if:
      - condition: trigger
        id:
          - stop
    then:
      - service: irrigation_unlimited.cancel
        data:
          entity_id: binary_sensor.irrigation_unlimited_c1_m
mode: single

Today, something weird happened again with a faulty notification, fired at 16:00 according to input_datetime.irrigation_adjustment_2

However, there was no irrigation started finished and nothing scheduled


2023-08-18 16:00:00.496 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_adjustment] Irrigation Unlimited Adjustment: Running automation actions
2023-08-18 16:00:00.497 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_adjustment] Irrigation Unlimited Adjustment: Executing step call service
2023-08-18 16:00:00.500 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-08-18 16:00:00] service: adjust_time, controller: 1, zone: 0, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_m"], "sequence_id": 0, "percentage": 162.0}
2023-08-18 16:00:00.505 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2023-08-18 08:54:18] controller: 1, zone: 0, state: 1
2023-08-18 16:00:00.506 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2023-08-18 08:54:18] controller: 1, zone: 1, state: 1, data: 1.1.1.5.1
2023-08-18 16:00:00.568 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_benachrichtigung_start] Irrigation Unlimited Benachrichtigung: Running automation actions
2023-08-18 16:00:00.593 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_benachrichtigung_start] Irrigation Unlimited Benachrichtigung: If at step 1: Running automation actions
2023-08-18 16:00:00.594 INFO (MainThread) [homeassistant.components.automation.irrigation_unlimited_benachrichtigung_start] Irrigation Unlimited Benachrichtigung: If at step 1: Executing step call service
2023-08-18 16:00:01.505 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2023-08-18 16:00:01] Switch does not match current state: expected: on, switch: switch.rain_bird_z1_rasen_eingang
2023-08-18 16:00:01.521 WARNING (MainThread) [custom_components.irrigation_unlimited] SYNCHRONISATION [2023-08-18 16:00:01] Switch does not match current state: expected: on, switch: switch.rain_bird_z1_rasen_eingang
2023-08-18 16:00:01.527 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2023-08-18 16:00:01] controller: 1, zone: 1, state: 0
2023-08-18 16:00:01.528 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2023-08-18 16:00:01] controller: 1, zone: 0, state: 0
2023-08-18 16:00:01.552 WARNING (MainThread) [homeassistant.components.automation.irrigation_unlimited_benachrichtigung_start] Irrigation Unlimited Benachrichtigung: Already running
2023-08-18 16:00:06.206 INFO (MainThread) [homeassistant.components.mobile_app.notify] mobile_app push notification rate limits for SM-G990B: 8 sent, 500 allowed, 0 errors, resets in 9:59:53

Any idea why this was triggered or why finish and start events were fired at 16:00 without any schedule? It seems like adjustment automation resultet in a very short activation of the controller and zone 1 for a second (which shouldn’t happen) resulting in the fired start and finish events triggering my notification automation


Looks like the service call backed over the last schedule and replayed the last part. There is a fix in the repository.
FYI: The log entry where the zone turns on as shown below has some chicken tracks. The data: 1.1.1.5.1 refers to zone.schedule.sequence.sequence_zone. It was sequence 1, the 5th zone within it from the 1st schedule. It can help to find the cause of the problem.

2023-08-18 16:00:00.506 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2023-08-18 08:54:18] controller: 1, zone: 1, state: 1, data: 1.1.1.5.1

Thank you for your very kind and fast help!
No notification today at 16:00 :slight_smile:

I put together a repository to help others to set-up both Irrigation Unlimited and
HAsmartirrigation

Would love to see your configuration for this dashboard, and any other info you can provide. Looks stunning.

I often see that one of the zones is not starting. I see that the time is adjusting but it’s not starting.

I there a misconfiguration perhaps?

See my configuration:

irrigation_unlimited:
  controllers:
    - name: Achtertuin
      entity_id: "switch.0xa4c138e9af5fcecd"
      preamble: '00:01'
      zones:
        - name: "Achtertuin: Gras rechts"
          entity_id: "switch.groep1"
        - name: "Achtertuin: Zone 2"
          entity_id: "switch.groep2"
        - name: "Achtertuin: Zone 3"
          entity_id: "switch.groep3"
        - name: "Achtertuin: Gras links"
          entity_id: "switch.groep4"
      sequences:
        - name: "Summer-Zone1&4"
          delay: "00:01"
          schedules:
            - time:
                sun: "sunrise" 
                before: "01:00"
              #weekday: [tue]
              weekday: [mon, wed, sat]
              month: [jun, jul, aug,sep]
          zones:
            - zone_id: [1,4]
        - name: "Summer-Zone2&3"
          delay: "00:01"
          schedules:
            - time:
                sun: "sunrise"
                before: "00:10"
              #weekday: [tue]
              weekday: [sun, tue, fri]
              month: [jun, jul, aug,sep]
          zones:
            - zone_id: [2,3]
        - name: "Spring & Autumn-Zone1&4"
          delay: "00:01"
          schedules:
            - time:
                sun: "sunrise"
                before: "00:10"
              weekday: [wed]
              month: [ apr, may, oct, nov]
          zones:
            - zone_id: [1,4]
        - name: "Spring & Autumn-Zone2&3"
          delay: "00:01"
          schedules:
            - time:
                sun: "sunrise"
                after: "00:10"
              weekday: [wed]
              month: [apr, may, oct, nov]
          zones:
            - zone_id: [2,3]
    - name: Voortuin
      entity_id: "switch.0xa4c138e9af5fcecd"
      preamble: '00:01'
      zones:
        - name: "Voortuin"
          entity_id: "switch.waterklep_voor"
      sequences:
        - name: "Summer-Voortuin"
          delay: "00:01"
          schedules:
            - time:
                sun: "sunrise" 
                before: "00:10"
              weekday: [tue, fri]
              month: [jun, jul, aug, sep]
          zones:
            - zone_id: [1]
        - name: "Spring & Autumn-Voortuin"
          delay: "00:01"
          schedules:
            - time:
                sun: "sunrise"
                before: "00:10"
              weekday: [thu]
              month: [apr, may, oct, nov]
          zones:
            - zone_id: [1]

Also see logging this morning:

2023-09-05 23:30:00.166 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-09-05 23:30:00] service: adjust_time, controller: 1, zone: 2, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z2"], "actual": "0:16:58"}
2023-09-05 23:30:00.219 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_watering_times_voortuin] SMART IRRIGATION: Adjustment watering times - Voortuin: Running automation actions
2023-09-05 23:30:00.247 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_watering_times_voortuin] SMART IRRIGATION: Adjustment watering times - Voortuin: Executing step call service
2023-09-05 23:30:00.250 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-09-05 23:30:00] service: adjust_time, controller: 2, zone: 1, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c2_z1"], "actual": "0:11:58"}
2023-09-05 23:30:00.360 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_zone_1] SMART IRRIGATION: Adjustment watering times - Zone 1: Running automation actions
2023-09-05 23:30:00.360 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_zone_1] SMART IRRIGATION: Adjustment watering times - Zone 1: Executing step call service
2023-09-05 23:30:00.362 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-09-05 23:30:00] service: adjust_time, controller: 1, zone: 1, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z1"], "actual": "0:19:53"}
2023-09-05 23:30:00.400 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_zone_4] SMART IRRIGATION: Adjustment watering times - Zone 4: Running automation actions
2023-09-05 23:30:00.401 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_zone_4] SMART IRRIGATION: Adjustment watering times - Zone 4: Executing step call service
2023-09-05 23:30:00.402 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-09-05 23:30:00] service: adjust_time, controller: 1, zone: 4, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z4"], "actual": "0:15:06"}
2023-09-05 23:30:00.408 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_zone_3] SMART IRRIGATION: Adjustment watering times - Zone 3: Running automation actions
2023-09-05 23:30:00.408 INFO (MainThread) [homeassistant.components.automation.smart_irrigation_adjustment_zone_3] SMART IRRIGATION: Adjustment watering times - Zone 3: Executing step call service
2023-09-05 23:30:00.410 INFO (MainThread) [custom_components.irrigation_unlimited] CALL [2023-09-05 23:30:00] service: adjust_time, controller: 1, zone: 3, data: {"entity_id": ["binary_sensor.irrigation_unlimited_c1_z3"], "actual": "0:38:06"}
2023-09-06 05:50:34.001 INFO (MainThread) [custom_components.irrigation_unlimited] EVENT [2023-09-06 05:50:34] controller: 1, zone: 0, state: 1

Hi there! Used the integration for the whole summer, it worked great, plus linked it to some automation with rain sensors and soli moisture: simply great!

One question as fall is approaching, I see the every_n_days option, which I guess I could add here:

     sequences:
      - schedules:
          - time: "21:00"
            schedule_id: "nord_time"
            every_n_days: 2 <<<<<
        name: "Nord"
        delay: "00:00:05"
        zones:
          - zone_id: 1
            duration: "00:06:30"
          - zone_id: 2
            duration: "00:01"

Question is: can this option be managed with service? I use service to adjust percentage of duration to tune the quantity of water using the soil humidity, in this case I would need to use the service to tell “schedule every two days”.

This sounds like a bug that was fixed in the latest release (2023.9.0). Please update and recheck.

The every_n_days: also has a companion setting start_n_days: which sets the base date to count from. If you want a set and forget approach perhaps use the month: filter for seasonal watering patterns. There are some more examples in the documentation.

sequences:
      - schedules:
          - time: "21:00"
            schedule_id: "nord_time_summer"
            month: [mar, apr, may, jun, jul, aug]
          - time: "21:00"
            schedule_id: "nord_time_winter"
            month: [sep, oct, nov, dec, jan, feb]
            every_n_days: 2
            start_n_days: 2023-03-01
        name: "Nord"
        delay: "00:00:05"
        zones:
          - zone_id: 1
            duration: "00:06:30"
          - zone_id: 2
            duration: "00:01"```