Irrigation Unlimited Integration

Thanks for the info. Yes you were correct in your understanding. Will start setting up and testing. Cheers

Thank you. I am not sure how to send a PM to be honest. Must have missed something.

The entity_id is able to take a list so you may not need to create the group.

Hi,
I am using your integration for last 3 weeks and it is great.
Recently I set up adjust_time automation. Below is my yaml code:

automation:
  - id: 'IU1653340123453'
    alias: Irrigation Unlimited Adjustment
    trigger:
    action:
      service: irrigation_unlimited.adjust_time
      data:
        entity_id: binary_sensor.irrigation_unlimited_c1_m 
        # adjust_irrigation_sensor is calculated as below using
        # https://github.com/petergridge/openweathermaphistory:
        # {{
        #   [(10
        #   - day0rain
        #   - day1rain*0.5
        #   - day2rain*0.25
        #   - forecast0rain*forecast0pop
        #   - forecast1rain*forecast1pop*0.5
        #   - forecast2rain*forecast2pop*0.25)/10
        #   ,0]|max
        # }}

        percentage: >
          {% set adjustpercentage = 100 * states('sensor.adjust_irrigation_sensor') | float | round(1) %}
          {{ adjustpercentage }}

All is working fine as long as my sensot.adjust_irrigation_sensor is not returning value = 0.
In this case (when I got 0 value) adjust_time is not doing any adjustment to the watering time for controler c1_m.
If I do {{ adjustpercentage + 0.1 }} so value is above 0 (0.1) then adjusting is working I am getting watering time adjusted to 1% of its original value.
Any clues how to fix this and what I am doing wrong? Thx.

====EDIT ===
I am confused.
See screenshot of my irrigation.

Irrigation Unlimited Card is showing that watering was not adjusted.
At the same time card collapsed is showing that time was adjusted to 0%.
In 3 minutes I have a scheduled run time so will let you know.
Still information is confusing on Irrigation Unlimited Card.

Ps1. If I disable / enable the controller on collapsed card then on irrigation unlimited the times are removed.

Ps2.
Below the screen shot done 2-3 minutes after schedule started. I am only more confused.


Lawn is not watered, which is good (solenoids are closed). But why card is calculating time to finish watering and controller icon changed yellow suggesting that lawn is irrigating.? Please note that times (for zones 1-4) were 10min and they disappeared and are empty now (that’s correct). Still controller marked with yellow icon.
And another screenshot to confirm:

As described before Zone 1 is not watering (solenoid closed). But why card is showing its watering when it is not?
So actual behaviour is correct but information shown is misleading.

I’m trying to adjust time of a specific zone in a specific sequence without success so far. I call the service from the developers tab and nothing happens (nothing in the logs either). Any help would be much appreciated.
Thank you
I’m running 2023.6.1 and as for the card v2023.6.2
HAOS : 2023.3.0
Here is the service call

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  sequence_id: 3
  zones: 3
  actual:
    hours: 0
    minutes: 50
    seconds: 0

And the configuration

irrigation_unlimited:
  controllers:
    name: "Controleur 1"
    all_zones_config:
      show:
        timeline: true
      allow_manual: true
      duration: "0:10:00"
    zones:
      - name: Café François
        entity_id: switch.vanne_atelier_gui
      - name: Serre
        entity_id: switch.vanne_maison_journalier_gui
      - name: Pelouse
        entity_id : switch.vanne_jardin_devant_gui
      - name: Deux carrés
        entity_id: switch.vanne_deux_carres_gui
      - name: Un carré
        entity_id: switch.vanne_un_carre_gui
      - name: Petits fruits
        entity_id: switch.vanne_petits_fruits_gui
      - name: Haie - CĂ©anothe - Fleurs
        entity_id: switch.vanne_haie_gui
      - name: Pommiers
        entity_id: switch.vanne_pommiers_gui
      - name: Pare-terre Julie
        entity_id: switch.vanne_buanderie_grande_maison_gui
      - name : Haies pelouses
        entity_id: switch.718
      - name: If Cour carrée
        entity_id: switch.vanne_salle_claudine_gui
      - name: Haie du fond
        entity_id: switch.vanne_haie_fond_gui
      - name: Tilleul
        entity_id: switch.vanne_tilleul_gui
    sequences:
      - name: nuit
        delay: "00:01"
        schedules:
          - time: "22:00"
        zones:
          - zone_id: 1 # Café François
            duration: "00:30"
          - zone_id: 2 # Serre et autres
            duration: "00:20"
          - zone_id: 9 # Pare-terre Julie
            duration: "00:30"
          - zone_id: 4 # Deux carrés
            duration: "00:29"
          - zone_id: 5 # Un carré
            duration: "00:20"
          - zone_id: 6 # Petits fruits
            duration: "00:30"
          - zone_id: 7 # Haie - CĂ©anothe
            duration: "00:40"
          - zone_id: 8 # Pommiers
            duration: "00:20"
          - zone_id: 10 # Haies pelouse
            duration: "00:25"
          - zone_id: 11 # If cour carrée
            duration: "00:10"
          - zone_id: 12 # Haie du fond
            duration: "00:30"            
          - zone_id: 13 # Tilleul - Cerisier
            duration: "00:30"            
      - name: jour
        duration: "00:05"
        delay: "01:55"
        repeat: 3
        schedules:
          - time: "12:00"
        zones:
          - zone_id: 2
      - name: Pelouse seule (nuit)
        schedules:
          - time: 03:30
        zones:
          - zone_id: 3
            duration: "00:30"

The zones: is the ordinal number of the zone within the sequence that you want to adjust - not the actual reference. Try this:

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  sequence_id: 3
  zones: 1
  actual:
    hours: 0
    minutes: 50
    seconds: 0

Thanks for the hint, despite having read the doc several times I may have overlooked something.
After the call the card displays a comma before the equal sign. Is it expected?


Moreover, I can’t reset the value. Erasing the value and then click on the right button does not produce anything. I can’t even use the adjust time with an actual value anymore. I logged an issue for that to describe the conditions that makes this happen

There are cheap hardware controller with wifi on Amazon that has the Power supply Relais and clamps for 6 valves and a pump and rain sensor at 55€ but unfortunately it seems it cannot be connected to HASs

Hi all. First of all: great piece of software! I finally managed to have all the flexibility I needed.

I have been reading and googling everywhere but I can’t find how to change the start time of a controller through the “Load schedule” Service. More specifically I can’t figure out where to find " schedule_id -
Id of the schedule". Have tried many combinations but no way to make the controller start time change.

Here below the yaml of my Garden:

irrigation_unlimited:
  controllers:
   - name: "Est"
     all_zones_config:
      show:
        timeline: true
     zones:
      - name: "Valvola1"
        entity_id: "light.irrigazione_1_4_light"
      - name: "Valvola2"
        entity_id: "light.irrigazione_1_4_light_2"
      - name: "Valvola3"
        entity_id: "light.irrigazione_1_4_light_3"
     sequences:
      - name: "Est"
        delay: "00:00:05"
        schedules:
          - time: "14:45"
        zones:
          - zone_id: 1
            duration: "00:01"
          - zone_id: 2
            duration: "00:02"
          - zone_id: 3
            duration: "00:01"
   - name: "Nord"
     zones:
      - name: "Valvola4"
        entity_id: "light.irrigazione_1_4_light_4"
      - name: "Valvola6"
        entity_id: "light.irrigazione_5_8_light_2"
     sequences:
      - schedules:
          - time: "14:50"
        delay: "00:00:05"
        zones:
          - zone_id: 1
            duration: "00:01"
          - zone_id: 2
            duration: "00:02"
   - name: "Sud"
     zones:
      - name: "Valvola7"
        entity_id: "light.irrigazione_5_8_light_3"
      - name: "Valvola8"
        entity_id: "light.irrigazione_5_8_light_4"
      - name: "Valvola5"
        entity_id: "light.irrigazione_5_8_light"
     sequences:
      - schedules:
          - time: "15:00"
        delay: "00:00:05"
        zones:
          - zone_id: 1
            duration: "00:01"
          - zone_id: 2
            duration: "00:02"
          - zone_id: 3
            duration: "00:02"

So “Est” controller is starting at 14:45, what if I would like to change the start time?

I did my best to find this piece of info and I really hope I am not wasting anyone time :frowning:

My own configuration features one controller and 2 schedules. So in developers/services I tried:

service: irrigation_unlimited.load_schedule
data:
  schedule_id: "2"
  time: "13:00:00"

No success, may be @rgc99 could give us some guidance?

just out of curiosity why are you using light domain instead of switch for the valves?

Thanks for your feedback.

I integrated MHCOZY board through ZHA (ZigBee) integration and this is how I guess they have implemented it.

Yeah, I can do pretty everything with available services a part from modifying start time (which honestly is something I can live with).

Same with me :wink:. As a matter of fact tested this service based on your post. I found as well that I could not use load_schedule enable/disable. It all relates I guess to what should be used as a sequence_id.

Add a schedule_id: to your schedule. It must be in snake_case like morning, night, before_sunrise, after_dark etc. It must be unique within all schedules (across controllers, zones, and sequences). Checks are done on startup and a warning message will be produced.

irrigation_unlimited:
  ...
    sequences:
      - name: "Est"
        delay: "00:00:05"
        schedules:
          - time: "14:45"
            schedule_id: "some_identifier"
  ...
    sequences:
      - schedules:
          - time: "15:00"
            schedule_id: "some_other_identifier"

Now you can use:

service: irrigation_unlimited.load_schedule
data:
  schedule_id: "some_identifier"
  time: "13:00:00"

I have a number of Zigbee devices some are power points which present as switch yet others present in the light domain. It think divirg is correct, it is just the way it has been implemented.

1 Like

I guess you mean schedule_id. I just checked it works. Thank you
Maybe I overlooked it, but I do not see any reference to schelude_id in the documentation.

1 Like

So I need to buy you a coffee at least :slight_smile: .

It works great beside the typo as suggested by @kolia

Can I have some hints also about the check_back object? Can I just put it under the “all_zones_config:”?
(Edit: tried and works great)

This is also a great feature, nice job!

Yes I did mean schedule_id, example fixed. Have updated the documentation.

2 Likes

Heads-up to all. Install Irrigation Unlimited version 2023.8.0 before updating Home Assistant to 2023.8.0 or above. A change was made to HA core that will prevent the integration from starting.

1 Like

Good evening @rgc99 and colleagues,

thank you, a lot, for this great work an this nice integration.
I’m trying to use it with my RC2 controller by Rain Bird and to set up home assistant to do the irrigation in a smart way.

This is my configuration:

irrigation_unlimited:
  controllers:
    - name: "Rain Bird RC2"
      enabled: true
      zones:
        - name: "Rasen Eingang"
          enabled: true
          entity_id: "switch.rain_bird_z1_rasen_eingang"
        - name: "Rasen Feige"
          enabled: true
          entity_id: "switch.rain_bird_z2_rasen_feige"
        - name: "Rasen Magnolie"
          enabled: true
          entity_id: "switch.rain_bird_z3_rasen_magnolie"
        - name: "Rasen vorne"
          enabled: true
          entity_id: "switch.rain_bird_z4_rasen_vorne"
        - name: "Rasen hinten"
          enabled: true
          entity_id: "switch.rain_bird_z5_rasen_hinten"
        - name: "Hecken Treppe"
          enabled: true
          entity_id: "switch.rain_bird_z6_hecken_treppe"
        - name: "Beet oben"
          enabled: true
          entity_id: "switch.rain_bird_z7_beet_oben"
        - name: "Beet unten"
          enabled: true
          entity_id: "switch.rain_bird_z8_beet_unten"
      sequences:
        - name: "Rasen"
          enabled: true
          schedules:
            - time: "06:00"
              duration: "00:50"
          zones:
            - zone_id: 1
              enabled: true
              duration: "00:10"
            - zone_id: 2
              enabled: true
              duration: "00:10"
            - zone_id: 3
              enabled: true
              duration: "00:10"
            - zone_id: 4
              enabled: true
              duration: "00:10"
            - zone_id: 5
              enabled: true
              duration: "00:10"
        - name: "Beete"
          enabled: true
          schedules:
            - time: "05:00"
              duration: "01:00"
          zones:
            - zone_id: 6
              enabled: true
              duration: "00:20"
            - zone_id: 7
              enabled: true
              duration: "00:20"
            - zone_id: 8
              enabled: true
              duration: "00:20"

Furthermore, I want to use/adopt the automation provided here: https://github.com/rgc99/irrigation_unlimited/blob/7b579a2e8c3807f9dd61702933b218ae1a2f8d79/packages/irrigation_unlimited_adjustment.yaml

Since I do not have a PWS, I replaced the corresponding sensors with sensors provided for my coordinates by OpenWeatherMap integration (OpenWeatherMap - Home Assistant).

  • sensor.wupws_preciptotal → sensor.wetter_forecast_precipitation
    (forecast precipitation for the day)

  • sensor.wupws_temp → sensor.wetter_temperature
    (forecast current temperature)

  • sensor.wupws_preciprate → sensor.wetter_hourly_forecast_precipitation
    (forecast precipitation for the present hour)

This results in:

sensor:
  - platform: average
    name: irrigation_unlimited_rain_0
    entities:
      - sensor.wetter_forecast_precipitation
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) }}"
    end: "{{ now() }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_rain_1
    entities:
      - sensor.wetter_forecast_precipitation
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=1) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=1) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_rain_2
    entities:
      - sensor.wetter_forecast_precipitation
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=2) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=2) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_rain_3
    entities:
      - sensor.wetter_forecast_precipitation
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=3) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=3) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_rain_4
    entities:
      - sensor.wetter_forecast_precipitation
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=4) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=4) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_temperature_0
    entities:
      - sensor.wetter_temperature
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) }}"
    end: "{{ now() }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_temperature_1
    entities:
      - sensor.wetter_temperature
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=1) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=1) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_temperature_2
    entities:
      - sensor.wetter_temperature
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=2) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=2) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_temperature_3
    entities:
      - sensor.wetter_temperature
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=3) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=3) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_temperature_4
    entities:
      - sensor.wetter_temperature
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=4) }}"
    end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=4) }}"
    scan_interval: 600

  - platform: average
    name: irrigation_unlimited_temperature_5_day_moving_average
    entities:
      - sensor.wetter_temperature
    precision: 1
    start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=4) }}"
    end: "{{ now() }}"
    scan_interval: 600

  # Five day weighted rain total sensor.
  # Adjust the weight values (0.7, 0.3, 0.15, 0.05) to suit your needs (0.0 = ignore that day).
  - platform: template
    sensors:
      irrigation_unlimited_rain_weighted_total:
        friendly_name: "Irrigation Unlimited Rain Weighted Total"
        unit_of_measurement: "mm"
        icon_template: "mdi:umbrella"
        value_template: >
          {% set r0 = state_attr('sensor.irrigation_unlimited_rain_0','max_value') | float(-1) %}
          {% set r1 = state_attr('sensor.irrigation_unlimited_rain_1','max_value') | float(-1) %}
          {% set r2 = state_attr('sensor.irrigation_unlimited_rain_2','max_value') | float(-1) %}
          {% set r3 = state_attr('sensor.irrigation_unlimited_rain_3','max_value') | float(-1) %}
          {% set r4 = state_attr('sensor.irrigation_unlimited_rain_4','max_value') | float(-1) %}
          {% if r0 != -1 and r1 != -1 and r2 != -1 and r3 != - 1 and r4 != -1 %}
            {% set rain_total = r0 %}
            {% set rain_total = rain_total + r1 * 0.7 %}
            {% set rain_total = rain_total + r2 * 0.3 %}
            {% set rain_total = rain_total + r3 * 0.15 %}
            {% set rain_total = rain_total + r4 * 0.05 %}
            {{ rain_total | round(1) }}
          {% else %}
            {{ -1 }}
          {% endif %}
    scan_interval: 600

# 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
    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 }}"
    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) %}

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

          {% set multiplier = 1.0 %}
          {% if 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) }}

Now I’m experiencing issues and/or have questions:

  1. The automation above does not work. The template at the end results in percentage 0, which is fine since we had several very rainy days (and when manually setting the sensors, the outcome changes correctly to values >0). However, the service irrigation_unlimited.adjust_time does not work with 0 % in my case. Anything above 0 is fine (e.g. 1-200%). Same behavior when starting the service from the developer tooles my manually entering 0 %. With 0 as a value for percentage, simply nothing happens.

  2. In the documentation it says, for the adjust_time service sequence_id is not necessarily required. I thought, when not entering this ID, all sequences of the selected controller will be affected (in my case 2 sequences; see above the configuration). However, only sequence 1 is affected. How can I apply this to both of my 2 sequences with a single call of the adjust_time service?

  3. A local rain sensor (binary sensor: on=rain, off=no rain) is connected to my Rain Bird controller. It’s kind of a humidity sensor containing a sponge (therefore status on remains much longer than the rain itself). I would like to integrate this sensor in the automation above as an local addition to the forecast based algorithm. If the sensor is on, no irrigation should start. When it is off, irrigation and adjustment should work as scheduled.

This is my frontend after manually setting sequence 2 to 55% adjustment (by calling service using developer tools):

Manually setting sequence 2 back to 0% adjustment doesn’t change anything.

Interestingly, output of the controller binary_sensor.irrigation_unlimited_c1_m doens’t exactly match the frontend:

index: 0
enabled: true
status: 'off'
zone_count: 8
zones: ''
sequence_status:
  - index: 0
    name: Rasen
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: null
    duration: 0
    adjustment: '%0.0'
    schedule:
      index: null
      name: null
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '1'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '2'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '3'
      - index: 3
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '4'
      - index: 4
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '5'
  - index: 1
    name: Beete
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: '2023-08-08T05:00:00+02:00'
    duration: 1980
    adjustment: '%55.0'
    schedule:
      index: 0
      name: Schedule 1
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 660
        adjustment: ''
        zone_ids:
          - '6'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 660
        adjustment: ''
        zone_ids:
          - '7'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 660
        adjustment: ''
        zone_ids:
          - '8'
current_schedule: deprecated (use current_zone)
current_zone: not running
percent_complete: 0
next_zone: 6
next_name: Hecken Treppe
next_start: '2023-08-08T05:00:00+02:00'
next_duration: '0:11:00'
icon: mdi:water-off
friendly_name: Rain Bird RC2

E.g. adjustment of zones 1-5 is 55% when looking at their single sensors, but the controller status (see above) says 0%.

Hope I made it to communicate my ideas in a comprehensible way :slight_smile:

All the best and kind regards
Benedikt

  1. Zero percent of anything is 0. Setting the duration to zero I would expect nothing to turn on. This is another way of disabling irrigation.
  2. Please be aware there are three adjustment points in the system.
    a. The first is on a zone entity which is better used when sequences are not required. Here you do not specify a sequence_id. If the entity_id is the controller then it loops through all the zones and applies the same adjustment.
    b. The second is on an entire sequence. Now you specify a sequence_id and the entity_id must be the controller. The sequence_id can be 0 which is a wild card. Each sequence zone within the sequence will be proportioned accordingly.
    c. The third is on a zone within a sequence. Once again specify the sequence_id as above but also a list of zones you would like to adjust. Zones from one sequence do not effect zones from another. This adjustment will combine with (b) above so if the sequence is 200% and the sequence zone is 50% you will in effect get 100%.
  3. See item 1. Change the script to set the adjustment to 0% if the rain sensor is on.

I would reset the various adjustments and start with a clean slate.

Hi @rgc99 , thank you for the fast answers!

This is what I expected (and would like) to happen. But, however, running the service adjust_time with the value 0 results in no change. When setting precentage to any other value, it works fine. When trying to reset to 0, like the current wheather-based automation does, nothing changes and (in both the custom frintend card and the status of the controller) the former value (e.g. 55% adjustment) remains active.

→ This is currently my major issue

After restarting HA, this is how the frontend looks like:

Shouldn’t the frontend show “0%” (due to adjustment automation running at startup with weather-based outcome 0%)?

This is the status of the controller binary_sensor.irrigation_unlimited_c1_m:

index: 0
enabled: true
status: 'off'
zone_count: 8
zones: ''
sequence_status:
  - index: 0
    name: Rasen
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: null
    duration: 0
    adjustment: '%0.0'
    schedule:
      index: null
      name: null
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '1'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '2'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '3'
      - index: 3
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '4'
      - index: 4
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '5'
  - index: 1
    name: Beete
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: null
    duration: 0
    adjustment: '%0.0'
    schedule:
      index: null
      name: null
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '6'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '7'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 0
        adjustment: ''
        zone_ids:
          - '8'
current_schedule: deprecated (use current_zone)
current_zone: not running
percent_complete: 0
next_schedule: deprecated (use next_zone)
next_zone: none
icon: mdi:water-off
friendly_name: Rain Bird RC2

When running

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  sequence_id: 0
  percentage: 15

it looks like:

and

index: 0
enabled: true
status: 'off'
zone_count: 8
zones: ''
sequence_status:
  - index: 0
    name: Rasen
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: '2023-08-09T06:00:00+02:00'
    duration: 450
    adjustment: '%15.0'
    schedule:
      index: 0
      name: Schedule 1
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '1'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '2'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '3'
      - index: 3
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '4'
      - index: 4
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '5'
  - index: 1
    name: Beete
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: '2023-08-09T05:00:00+02:00'
    duration: 540
    adjustment: '%15.0'
    schedule:
      index: 0
      name: Schedule 1
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 180
        adjustment: ''
        zone_ids:
          - '6'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 180
        adjustment: ''
        zone_ids:
          - '7'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 180
        adjustment: ''
        zone_ids:
          - '8'
current_schedule: deprecated (use current_zone)
current_zone: not running
percent_complete: 0
next_zone: 6
icon: mdi:water-off
friendly_name: Rain Bird RC2
next_name: Hecken Treppe
next_start: '2023-08-09T05:00:00+02:00'
next_duration: '0:03:00'

Which seems to be perfectly fine.

When running back to zero percent

service: irrigation_unlimited.adjust_time
data:
  entity_id: binary_sensor.irrigation_unlimited_c1_m
  sequence_id: 0
  percentage: 0

this results in no changes at all:

index: 0
enabled: true
status: 'off'
zone_count: 8
zones: ''
sequence_status:
  - index: 0
    name: Rasen
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: '2023-08-09T06:00:00+02:00'
    duration: 450
    adjustment: '%15.0'
    schedule:
      index: 0
      name: Schedule 1
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '1'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '2'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '3'
      - index: 3
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '4'
      - index: 4
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 90
        adjustment: ''
        zone_ids:
          - '5'
  - index: 1
    name: Beete
    enabled: true
    status: 'off'
    icon: mdi:stop-circle-outline
    start: '2023-08-09T05:00:00+02:00'
    duration: 540
    adjustment: '%15.0'
    schedule:
      index: 0
      name: Schedule 1
    zones:
      - index: 0
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 180
        adjustment: ''
        zone_ids:
          - '6'
      - index: 1
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 180
        adjustment: ''
        zone_ids:
          - '7'
      - index: 2
        enabled: true
        status: 'off'
        icon: mdi:stop-circle-outline
        duration: 180
        adjustment: ''
        zone_ids:
          - '8'
current_schedule: deprecated (use current_zone)
current_zone: not running
percent_complete: 0
next_zone: 6
icon: mdi:water-off
friendly_name: Rain Bird RC2
next_name: Hecken Treppe
next_start: '2023-08-09T05:00:00+02:00'
next_duration: '0:03:00'

Why does this happen and how can I visually differenciate between adjustment to 0% (if it would work) and no schedule at all (like it looks like after startup as shown above)?

When I do not specify a sequence_id and I’m using my controller as entity_id, changes apply to sequence 1, not to sequence 2 or the zones included in sequence 2 (at least in the frontend). However, setting sequence_id to 0 solved the problem for me.

Could you please help me including this in the automation?

Thank you, a lot, for helping me!

Kind regards
Benedikt