Irrigation Custom Component with Custom Card

Just a short feedback, the enable feature works perfectly and looks much better.
Also: I just used your tool to control my lawn mower. Actually, the tool is perfect for every kind of scheduled Switches.
So, if you ever plan to upgrade this to a (core) integration (or in hasc) you should probably consider to make the code more generic not only worded for irrigation.
I really love this integration/custom card

hi,
i noticed a strange behaviour.
i have a program with 2 zone.
when i click on RUN PROGRAM, only the first zone start.
is it a normal behaviour, or a setting that i missed ?

ezgif-5-273b7399cf

thanks for your help

here is my package code


    input_datetime:
      irrigation_afternoon_start_time:
        name: Afternoon Start Time
        has_date: false
        has_time: true
      irrigation_night_start_time:
        name: Night Start Time
        has_date: false
        has_time: true

    sensor:
      - platform: time_date
        display_options:
          - 'time'
          - 'date'
       
    switch:
      - platform: irrigationprogram
        switches:
          afternoon:
            irrigation_on: input_boolean.irrigation1_on
            start_time: input_datetime.irrigation_afternoon_start_time
            run_freq: input_select.irrigation_freq1
            allow_multiple: true
            zones:
              - zone: switch.shelly1_vanne_datura
                name: "Bougainvillier"
                water: input_number.irrigation_datura
                water_adjustment: sensor.rain_factor_meteofrance
                icon: mdi:sprout               
              - zone: switch.tz3000_bananier
                name: "Bananiers"
                water: input_number.irrigation_bananiers
                water_adjustment: sensor.rain_factor_meteofrance
                icon: mdi:sprout-outline       
              - zone: switch.shelly1_vanne_bambous
                name: "Bambous "
                water: input_number.irrigation_bambous
                water_adjustment: sensor.rain_factor_meteofrance
                icon: mdi:palm-tree
 
          night:
            irrigation_on: input_boolean.irrigation2_on
            start_time: input_datetime.irrigation_night_start_time
            run_freq: input_select.irrigation_freq2
            allow_multiple: true
            zones:
              - zone: switch.shelly1_vanne_bambous
                name: "Bambous "
                water: input_number.irrigation_bambous
                water_adjustment: sensor.rain_factor_meteofrance
                icon: mdi:palm-tree
              - zone: switch.shelly1_40f5200545be
                name: "Gazon sud "
                water: input_number.irrigation_gazon_sud
                water_adjustment: sensor.rain_factor_meteofrance
                icon: mdi:sprinkler

    input_number:
      irrigation_bambous:
        name: water 
        min: 0
        max: 80
        step: 1
        icon: mdi:water
      irrigation_datura:
        name: water
        min: 0
        max: 60
        step: 1
        icon: mdi:water
      irrigation_bananiers:
        name: water
        min: 0
        max: 60
        step: 1
        icon: mdi:water
      irrigation_gazon_sud:
        name: water gazon_sud
        min: 0
        max: 60
        step: 1
        icon: mdi:water

    input_select:
      irrigation_freq1:
        name: Frequence afternoon
        options:
          - "1"
          - "2"
          - "3"
          - "4"
          - "5"
          - "6"
          - "7"

      irrigation_freq2:
        name: Frequence night
        options:
          - "1"
          - "2"
          - "3"
          - "4"
          - "5"
          - "6"
          - "7"

    input_boolean:
      irrigation1_on:
        name: Enable Irrigation     
      irrigation2_on:
        name: Enable Irrigation

Hi,
If you run the default program behaviour will run the zones sequentially so the second zone will start once the first zone has completed.

From the shots you provided (I like the animation) it looks like it is behaving as expected.

If you want both to run simultaneously use the
allow_multiple: true
setting on the program and all zones will turn on at once.

Cheers
Pete

1 Like

Hi, is there a way to select which zones (if at all) should run simultaneously?
The number of zones my Pump can manage simultaneously depends on the time of the year/level of ground water. So sometimes I would like to run two of the zones together sometimes all 4 zones need to run separately.
Well, if that is to complicate to implement I will try a workaround, by switching the second zone on with the first by separate automation. That should work too, just not to ‚nice‘.
Beside that, once again, thanks for your work, it’s really good, should become a core integration (no idea how to do this :wink: )

Hi, I think I can implement a solution for this. I was thinking that an option to set the maximum simultaneous running zones and then run the zones in the order they are defined until the max has been reached then continue to add another zone as a zone completes. I will probably not get another release out until November, but will try to get an update earlier if possible

Sounds interesting, no need to rush, as I said, if needed I can do a workaround. However, instead of just having a max of combined zones, I would prefer to have it more flexible/individual. Maybe a switch per zone whether to be run individually or combined with other zones.

Hi, V4.0.12 has been released with the functionality you requested. I have updated the documentation but ping me if it is unclear. Please run a few tests to ensure that is is behaving as expected and Let me know the outcome, I will post a better announcement then.

Thanks (is it November yet :wink: )
I am currently on the road and will install / try after weekend only.

Hi, thanks for your work.
I’ve problem with the integration, latest version of hassio, when i put the irrigationtest.yaml into package dir, i found this error:

Invalid config for [switch.irrigationprogram]: [icon] is an invalid option for [switch.irrigationprogram]. Check: switch.irrigationprogram->switches->morning->icon. (See ?, line ?).

Hi Thomas,

What version of the app are you using? V4 or V5 (V5 is really still a BETA). Based on the message I suggest you remove the icon from the YAML as this was deprecated in one of the later versions. It was not used in the custom card.
I am currently working on v5.1 that will use the config flow process instead of YAML, no more rebooting after a change!
Out of interest where are you in the world?
Cheers
Pete

Hi Peter, I installed V5 but got stuck so am now on V4.12 but I cannot for the life of me work out how to show the timer for a zone. As below my card and the code.
Are you able to point me in the right direction please.
Irrigation

switch:
  - platform: irrigationprogram
    switches: 
      afternoon:
        irrigation_on: input_boolean.irrigation_on
        start_time: input_datetime.irrigation_afternoon_start_time
        #will run only on selected run days
        run_freq: input_select.irrigation_run_days
        inter_zone_delay: input_number.inter_zone_delay
        zones:
          - zone: switch.back_lawn_1 #Actual Relay to turn on/off
            name: Zone 1 - Back Lawn 1
            water: input_number.zone_1_run
            repeat: input_number.zone_1_repeat
          - zone: switch.back_lawn_2
            # rain sensor with ignore option
            name: Zone 2 - Back Lawn 2
            water: input_number.zone_2_run
            #rain_sensor: binary_sensor.raining
            #wait: input_number.irrigation_pot_plants_wait
            #repeat: input_number.irrigation_pot_plants_repeat
            #ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor
            #water_adjustment: input_number.irrigation_adjust_run                
          - zone: switch.front_lawn
            # rain sensor with ignore option
            name: Zone 3 - Front Lawn
            water: input_number.zone_3_run
            #rain_sensor: binary_sensor.raining
            #wait: input_number.irrigation_pot_plants_wait
            #repeat: input_number.irrigation_pot_plants_repeat
            #ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor
            #water_adjustment: input_number.irrigation_adjust_run      

Got it working… started again

  • Installed Ver 4.0.11 and the related card
  • Found I had irrigation.yaml in another folder so deleted that
  • Updated the version for irrigation-card.js
  • Restarted … still the same
  • Refreshed the browser cache … and it all came right as below
    Very happy now and thankyou for your programming efforts

Hi all,

I just wanted to thank the author @petergridge for the custom card and the irrigation integration.
It is exactly what I needed. It took me just a couple of hours to set it up properly.
I am using 3x R7060 from WOOX. I am very satisfied with it :slight_smile:
Here is the outcome…

Release V5.1.15

V5.1 introduces setup via config flow, it has taken a little while to get stable but I think it is a great improvement for usability. No more restarting HA after every change to the configuration.
image
image

The component also support translations and thanks to @mituns for the German translation. I would welcome any other translations.

Your legacy YAML will be converted to config flow and can edited from the Integrations tab.

Please upgrade the irrigation card at the same time.

I can’t find the component or the card on hacs, is there a trick?

I’ve submitted the app to HACS, but it needs to be reviewed and deployed.

You may be able to help. Can you try to review the HACS pull at Adds new integration [petergridge/irrigation-V5] by petergridge · Pull Request #1595 · hacs/default · GitHub. I then need to find people to review and it should become available.

Looking for contributors to provide translations for the Irrigation Program Config Flow.

Please contact me if you can assist. No super technical knowledge required.

Sorry, I don’t think I am the right person for a code review, any other way to speed it up?

Thanks for trying, we’ll have to wait until HACS approves it.

Great News!

The Custom Component and Card are now available on HACS.