Irrigation Custom Component with Custom Card

HI Peter

Thank you vary match, the issue resolved.

Thanks

I used the default Rainbird integration in HA, and was not happy with it so I switched over to this irrigation integration. I have followed the instructions to the T and everything seems to be there, communicating and working but… When the program starts, it starts with zone 1, 5 seconds later switches off zone 2 the moves to zone 2, and so it continues. Am I missing something?

Hi @vanwykac,

Can you send me a screenshot of the config for one of the zones, also can you check if there are any errors in the log when the program starts.

I don’t have a rainbird controller to test with so i will need your help.

Can run a single zone for me from the card and let me know the behaviour.

Thanks
Pete

Hello,

I have installed the latest 5.4.5 (restarted HA) but I don’t have the card available.

Any hints on this matter please?

Hi @Diomet ,
I have updated the HACS card install for irrigation component, It appears the method I am using to deploy the card with the program no longer works in the latest release of HA. The repository
is here GitHub - petergridge/Irrigation-Card: Companion card for Irrigation-V5. Please let me know if the resolves you problem.
Cheers
Pete

I receive the error:

Repository ‘petergridge/irrigation-card’ exists in the store.

and it is not, I can’t find “irrigation-card”

Hello Peter
Thanks for this practical irrigation scheduler

I have succeded to add my 8 zones under a program following the steps provided. see screenshot below

The problem I have is that I cannot trigger the irrigation script that run each active zone , and when the program starts actually nothing happens .

I have a Hunter controller that I was able to command following this MQTT project

Could help me to understand what I need to do to trigger this script so my irrigation it starts based on your scheduler ?

I copied here the services used for ON and OFF

Irrigation On

alias: Irrigation On
mode: single
icon: mdi:water-pump
sequence:
  - service: mqtt.publish
    data_template:
      topic_template: hunter/X-CORE/zone/{{ states('sensor.irrigate_map_zone') }}
      payload_template: >
        { "action": "start", "time": {{ states('input_number.irrigate_timer_' ~
        states('sensor.irrigate_map_zone')) | int }} }
    enabled: true

Irrigation Off

alias: Irrigation Off
mode: single
icon: mdi:water-pump-off
sequence:
  - service: mqtt.publish
    data_template:
      topic_template: hunter/X-CORE/zone/{{ states('input_text.irrigation_active_zone') }}
      payload_template: |
        { "action": "stop" }
    enabled: true

Each zone needs to be exposed as a switch, and the state of the switch needs to accurately match the physical state i.e. on/off. If there is a significant delay in identifying the state of the switch after it is turned on/off this can cause issues as the component monitors the switches to operate.

You could set up a template switch to call the services, I am not sure about updating the state but worth a try

Hello Peter ,

Any ideea why this messsage pops up ?
This happens - at this step

select Add Integration, start typing ‘irrigation’ and then select irrigation controller

And now also I have errors that programs are not loading.I deleted the entries in my dashboard , and now I cannot create new ones

Thanks

Hi,
A couple of questions to help me:

  • What version of the component are you using?
  • what hardware/OS are you using
  • when you say deleted from the dashboard was that just the irrigation card or did you delete some sensors etc?

Hi Peter , here my answers - any news ?

  • What version of the component are you using?
    version used is Irrigation-V5
  • what hardware/OS are you using
    raspberry pi 5 / Home Assistant
  • when you say deleted from the dashboard was that just the irrigation card or did you delete some sensors etc?
    I have deleted the helpers for Program 1 start time and freq , because I did not use … and I remember that after this it did not work .

And it looks no program inside when I want to add an irrigation Card

Hi

It looks like you have deleted a control that you configured into the system that is preventing it from loading.

I suggest that you delete the current configuration and create a new one.

1 Like

Hello again Peter ,

Can you help me yo define properly the switch for each zone.
I tried but simply it did not work .
Here the code that works with a zone selector

##################################
# Irrigate zone selectbox       #
##################################
input_select:
  irrigate_zone:
    name: Irrigate zone
    options:
      - zone1
      - zone2
      - zone3
      - zone4

template:
  - sensor:
      - name: irrigate_map_zone
        state: >
          {% set mapper =
            { 'zone1':'1',
              'zone2':'2',
              'zone3':'3',
              'zone4':'4'} %}
          {% set state = states('input_select.irrigate_zone') %}
          {% set id = mapper[state] if state in mapper %}
          {{ id }}

input_text:
  irrigation_active_zone:
    initial: inactive
  zone_action_result:
    name: "Zone Action Result"

##################################
# Irrigation zone time selection   #
##################################
input_number:
  irrigate_timer_1:
    name: Timer zone1
    initial: 30
    min: 1
    max: 60
    step: 1
    unit_of_measurement: min
    icon: mdi:timer-cog

  irrigate_timer_2:
    name: Timer zone2
    initial: 30
    min: 1
    max: 60
    step: 1
    unit_of_measurement: min
    icon: mdi:timer-cog

  irrigate_timer_3:
    name: Timer zone3
    initial: 30
    min: 1
    max: 60
    step: 1
    unit_of_measurement: min
    icon: mdi:timer-cog

  irrigate_timer_4:
    name: Timer zone4
    initial: 30
    min: 1
    max: 60
    step: 1
    unit_of_measurement: min
    icon: mdi:timer-cog

################################################
# Selected Sprinkler switch script & timer #
################################################
timer:
  irrigation_time_remaining:
    name: Remaining Time
    duration: "00:00:00"

switch:
  - platform: template
    switches:
      irrigate_lawn:
        friendly_name: "Sprinkler On/Off"
        turn_on:
          - service: script.turn_on
            data:
              entity_id: script.irrigation_on
          - service: timer.start
            target:
              entity_id: timer.irrigation_time_remaining
            data:
              duration: "{{ states('input_number.irrigate_timer_' ~ states('sensor.irrigate_map_zone')) | int  * 60 }}"
          - service: input_text.set_value
            target:
              entity_id: input_text.irrigation_active_zone
            data:
              value: "{{ states('sensor.irrigate_map_zone') }}"
        turn_off:
          - service: script.turn_on
            data:
              entity_id: script.irrigation_off
          - service: timer.finish
            target:
              entity_id: timer.irrigation_time_remaining
          - service: input_text.set_value
            target:
              entity_id: input_text.irrigation_active_zone
            data:
              value: inactive
        icon_template: >-
          mdi:water-pump```

Hi,

You will find all the definitions you need in this file Irrigation-V5/testhelpers.yaml at 54f8bb112a5c0a328122e522e19680bdbc30f3d1 ¡ petergridge/Irrigation-V5 ¡ GitHub to create a working sample complete with dummy switches.

You can also look at this tutorial on setting up a basic instance. Irrigation-V5/help/help.md at 54f8bb112a5c0a328122e522e19680bdbc30f3d1 ¡ petergridge/Irrigation-V5 ¡ GitHub

A template switch definition like below should work. I don’t know what the script is doing but assume it is working now so should be ok.

switch:
  - platform: template
    switches:
      irrigate_lawn:
        friendly_name: "Sprinkler On/Off"
        turn_on:
          - service: script.turn_on
            data:
              entity_id: script.irrigation_on
        turn_off:
          - service: script.turn_on
            data:
              entity_id: script.irrigation_off
        icon_template: >-
          mdi:water-pump

Hello Peter,
I have successfuly installed your nice integration, thank you for the good job. It works exactly as expected.
But I have noticed something strange on the irrigation card, the string “remaining_label” is not showing the name selected properly in the card. Here a snapshot.

Is it something I need to investigate on my configuration? A mistake during the configuration or perhaps something you are already aware of?
Thanks for your help

Hi,

The remaining time label is the text that appears once a zone starts running. The zone run time will pick up the name from the object, so if update the name for Zone 1 runtime to French it work as you expect, the same will apply for the start time and any other helpers that you create.

Cheers
Pete

@Druss67

Thanks for the French translation file, I will incorporate it into the next release.

okay, clear.
Thank you Peter

Hello Peter,

I followed your quick howto to set my first program and I don’t understand why my runtime is on seconds and not in minutes as expected.
I did a check setting runtime at 13min and in fact the duration of irrigation is 13 seconds.
Runtime


I did several redo, and this is always the same, any subjections please?
Thanks