Irrigation Custom Component with Custom Card

Hi, Can you send me a screen shot of the configuration.

I think you have set up for watering by volume. Once you have a flow sensor defined the watering time is converted to watering volume.

Consommation d’eau should be litres per minute as this is a flow sensor not volume.

Hello Peter,

Correct! I would like to have the volume used from my water meter on the card.
So I remove it from configuration and it works now as you mentioned.
I will add volume used information in another way.
Great

Hi @petergridge,

I am having some issues lately with the integration: the programs are started and stopped after 1 second. This happens in a random way and with different switches (I have 3).

Here an example from yesterday…

The first 2 started and stopped properly (after the planned 10 minutes), but the last one has been switched off after 1 second.

Here another example…

In this case the first and the third switches worked properly (10 min and 20 min), but the second one stopped after 1 second.

I cannot find any error or specific message in the logs.
Any idea of what the issue can be?
Thanks.

Hi Vic,

Can you share the version you are using and you configuration

Pete

Hi Pete,

sorry for the delay, was out for the weekend… :slight_smile:

I am using the version V5.4.16-Alpha.

Here is my config:

##
## Irrigation
##
input_datetime:
  irrigation_morning_start_time:
    name: Morning start time
    has_date: false
    has_time: true
  irrigation_evening_start_time:
    name: Evening start time
    has_date: false
    has_time: true
    
input_boolean:
  irrigation_morning_on:
    name: Enable morning irrigation
  irrigation_morning_config:
    name: Show morning configuration
  irrigation_morning_ignore_rain_sensor:
    name: Ignore morning rain flag
  irrigation_evening_on:
    name: Enable evening irrigation
  irrigation_evening_config:
    name: Show evening configuration
  irrigation_evening_ignore_rain_sensor:
    name: Ignore evening rain sensor
  rain_sensor:
    name: Rain flag
    
input_select:
  irrigation_mornirng_run_days:
    name: Run days morning
    options:
      - "['Wed','Sat']"
      - "['Sun','Thu']"
      - "['Mon','Fri']"
      - "['Tue','Sat']"
      - "['Sun','Wed']"
      - "['Mon','Thu']"
      - "['Tue','Fri']"
      - "['Mon','Wed','Fri']"
      - "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"
      - "1"
      - "2"
      - "3"
      - "4"
      - "5"
      - "6"
      - "7"
  irrigation_evening_run_days:
    name: Run days evening
    options:
      - "['Wed','Sat']"
      - "['Sun','Thu']"
      - "['Mon','Fri']"
      - "['Tue','Sat']"
      - "['Sun','Wed']"
      - "['Mon','Thu']"
      - "['Tue','Fri']"
      - "['Mon','Wed','Fri']"
      - "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"
      - "1"
      - "2"
      - "3"
      - "4"
      - "5"
      - "6"
      - "7"

input_number:
  irrigation_balcony_adjust_run:
    name: Water balcony adjustment
    min: 0
    max: 1
    step: 0.2
    icon: mdi:water-pump-off
  irrigation_balcony_run:
    name: Water balcony
    min: 1
    max: 30
    step: 1
    icon: mdi:water
  irrigation_terrace_1_adjust_run:
    name: Water terrace 1 adjustment
    min: 0
    max: 1
    step: 0.2
    icon: mdi:water-pump-off
  irrigation_terrace_1_run:
    name: Water terrace 1
    min: 1
    max: 30
    step: 1
    icon: mdi:water
  irrigation_terrace_2_adjust_run:
    name: Water terrace 2 adjustment
    min: 0
    max: 1
    step: 0.2
    icon: mdi:water-pump-off
  irrigation_terrace_2_run:
    name: Water terrace 2
    min: 1
    max: 30
    step: 1
    icon: mdi:water
  irrigation_inter_zone_delay:
    name: Inter zone delay (sec)
    min: 0
    max: 3600
    step: 60
    icon: mdi:timer-sand

Here the parameters values…


Sorry for taking so long to get back to you. It has been a very busy period for me.

Can you try removing the interzone delay,

Hi Pete,

I tried without the interzone delay, but I got the same issue (see below).

The balcony started at 20:00 and stopped also at 20:00 (NOK).
The terrace 1 started at 20:00 and stopped at 20:10 (OK).
The terrace 2 started at 20:10 and stopped at 20:30 OK).

Besides that I am getting double entries in the log card. Do not know why.

It’s like you have the program defined twice. Can you check you only have one instance.

There is a List Configuration service that should help

I checked the original log file and there the items appears only once.
Just in the log chart in the irrigation tab I see them double… very strange.

I run the List Configuration service. Here is the log output…

Logger: custom_components.irrigationprogram
Source: custom_components/irrigationprogram/__init__.py:143
integration: Irrigation controller (documentation, issues)
First occurred: 12:03:56 (1 occurrences)
Last logged: 12:03:56

Program 1 name:irrigationProgram
start_time:input_datetime.irrigation_evening_start_time
Zone 1 zone:switch.irrigation_control_balcony_switch
water:input_number.irrigation_balcony_run
water_adjustment:input_number.irrigation_balcony_adjust_run
rain_sensor:binary_sensor.rain_sensor
ignore_rain_sensor:input_boolean.irrigation_evening_ignore_rain_sensor
Zone 2 zone:switch.irrigation_control_terrace_1_switch
water:input_number.irrigation_terrace_1_run
water_adjustment:input_number.irrigation_terrace_1_adjust_run
rain_sensor:binary_sensor.rain_sensor
ignore_rain_sensor:input_boolean.irrigation_evening_ignore_rain_sensor
Zone 3 zone:switch.irrigation_control_terrace_2_switch
water:input_number.irrigation_terrace_2_run
water_adjustment:input_number.irrigation_terrace_2_adjust_run
rain_sensor:binary_sensor.rain_sensor
ignore_rain_sensor:input_boolean.irrigation_evening_ignore_rain_sensor
run_freq:input_select.irrigation_evening_run_days
irrigation_on:input_boolean.irrigation_evening_on
show_config:input_boolean.irrigation_evening_config interlock:False
inter_zone_delay:input_number.irrigation_inter_zone_delay

Hi @petergridge,
Thanks a lot for you component.

I have a moisture sensor which gives me the soil moisture in percentage. Can I somehow include this? Would be cool, if there is no irrigation in case the the soil moisture > X %

Thanks!

Hi, you have a couple of options,

  1. Create a template binary sensor and use this in the rain sensor config
  2. use the moisture sensor to modify calculate the adjustment. So based on moisture you can reduce the watering to 0 depending on the sensor.
1 Like

Hi Vic, you may need to delete the config and component, restart and reinstall. I can’t guarantee that will fix it though. Your config is not complex and i can’t reproduce the issue.

Thank you Pete.
I am traveling a lot in this period, therefore I have no time to make more tests.
For the time being I have created some automation to start and stop the irrigation directly from HA.
I will start again after the holidays period and will revert if I find something.

Great integration.

I.
Have a question if it’s possible to use the internal duration time for ESP home component sprinkler with this integration.
If it’s possible to set up directly the duration in ESP home sprinkler with this integration.
Thank you.

Hi, I haven’t considered this as an option, I will look into it when I have some time.

If you are interested in an alternative esphome configuration you can have a look at mine:

Simplistic approach that has been operational for a few years now. It has four solenoids but you can configure for more, has a max runtime config option so if you want to water for more than 30 minutes just update that.

@petergridge
I’m using your integration now for over 2 years and it was working great.
I had to add a sixth zone recently and swapped the relays to a more professional solution (Waveshare ESP32 6 Chan). I have updated the existing zones to use the new relays and added the sixth zone.
The program is working again, except it does not honor the settings for frequency. It starts every day instead of every second day as configured.
What can i do to correct it?

Hi @juergenjw,

Can you let me know what version of the component you are using. The following information will also help me determine what the problem may be,

Please run this action:

Then download the log file to get something like this this information:


Program 1
name: test
start_time: input_datetime.test_irrigation_run_time: 21:27:00
device_type: generic
Zone 1
zone: switch.dummy_1: off
water: input_number.zone_1_water: 1.0
water_adjustment: input_number.irrigation_adjust_water: 0.2
run_freq: input_select.irrigation_freq: Mon, Wed, Fri
interlock: True

Cheers
Pete

Hi Peter, i’m using the latest version of your integration V2024.09.xx and Home Assistant is on 2024.9.0

This error originated from a custom integration.

Logger: custom_components.irrigationprogram
Source: custom_components/irrigationprogram/__init__.py:134
integration: Irrigation controller (documentation, issues)
First occurred: 13:59:08 (1 occurrences)
Last logged: 13:59:08

Program 1
  name: Bewässerung
  start_time: input_datetime.startzeit_bewasserung: 07:00:00
  Zone 1
    zone: switch.esp32_s3_relay_6ch_relay_1: off
    water: input_number.dauer_zone_hinten_unten: 2.0
    wait: input_number.dauer_pause_zone_hinten_unten: 1.0
    repeat: input_number.anzahl_zyklen_zone_hinten_unten: 1.0
    run_freq: input_select.frequenz_zone_hinten_unten: 2
    rain_sensor: input_boolean.regen_stop: off
    enable_zone: input_boolean.schalter_zone1: on
  Zone 2
    zone: switch.esp32_s3_relay_6ch_relay_2: off
    water: input_number.dauer_zone_hinten_oben: 2.0
    run_freq: input_select.frequenz_zone_hinten_oben: 2
    rain_sensor: input_boolean.regen_stop: off
    enable_zone: input_boolean.schalter_zone2: on
  Zone 3
    zone: switch.esp32_s3_relay_6ch_relay_3: off
    water: input_number.dauer_zone_hinten_vorne: 2.0
    run_freq: input_select.frequenz_zone_hinten_vorne: 2
    rain_sensor: input_boolean.regen_stop: off
    enable_zone: input_boolean.schalter_zone3: on
  Zone 4
    zone: switch.esp32_s3_relay_6ch_relay_4: off
    water: input_number.dauer_zone_vorne_oben: 2.0
    run_freq: input_select.frequenz_zone_vorne_oben: 2
    rain_sensor: input_boolean.regen_stop: off
    enable_zone: input_boolean.schalter_zone4: on
  Zone 5
    zone: switch.esp32_s3_relay_6ch_relay_5: off
    water: input_number.dauer_zone_vorne_unten: 2.0
    run_freq: input_select.frequenz_zone_vorne_unten: 2
    rain_sensor: input_boolean.regen_stop: off
    enable_zone: input_boolean.schalter_zone5: on
  Zone 6
    zone: switch.esp32_s3_relay_6ch_relay_6: off
    water: input_number.dauer_zone_terrasse: 2.0
    run_freq: input_select.frequenz_zone_terrasse: 1
    enable_zone: input_boolean.schalter_zone6: off
  interlock: False
  irrigation_on: input_boolean.schalter_bewasserung: on
  inter_zone_delay: input_number.dauer_zone_pause: 10.0

Hi @petergridge,
i just had to restart Home Assistant because i made an update to another HACS integration.
After the restart the irrigation program reports the next run as “In 2 days”, which is correct.
May be after running once the program forgets the frequency?

Hi,

Can you upgrade to V2025.10.01. We will both be working of the same source level then. It’s currently Beta but it is stable