Irrigation Unlimited Integration

The enable/disable/toggle shims are not in the pyscript file. These are small pieces of code that convert for example ‘1.1 Zone1’ living in an input_select control into ‘binary_sensor.irrigation_unlimited_c1_z1’ and then call the actual service. They are just helpers sitting between the lovelace card and the integration. There is an updated pyscript/irrigation_unlimited_service_shim.py file in the repository which contain the new shims.

Now you need to call the helpers from your card.

type: entities
title: Enable/Disable Controller
entities:
  - entity: input_select.irrigation_unlimited_entities
    name: Controller/Zone
  - type: divider
  - type: custom:paper-buttons-row
    buttons:
      - name: Enable
        tap_action:
          action: call-service
          service: irrigation_unlimited.shim_enable
          service_data:
            controller_zone_entity: input_select.irrigation_unlimited_entities
      - name: Disable
        tap_action:
          action: call-service
          service: irrigation_unlimited.shim_disable
          service_data:
            controller_zone_entity: input_select.irrigation_unlimited_entities

Nice work.

Hi Robert
That time picker card works great in the manual card.
thanks for posting this.

Irrigation valves
I would like to know what the community is using to control their irrigation valves. This topic has been discussed a bit but more is needed. It’s not a perfect world out there and hardware, software, communication or power failure could leave your valve in a permanent on state. Bottom line is a kill switch is needed at the relay in case a turn on signal is received and that’s the last message received…

I am building a zigbee network and use relays combined with a count down module as a dead man switch. Asterion is working on an ESP8266 based relay designed for irrigation valves here. Would like to hear about other solutions.

Your integration is great. I use the card for enabling and disabling zones but I was wondering if there is a way to disable or enable a sequence in the frontend as well. Thanks, Nathan

Hi Nathan, At the moment you can only enable/disable controllers and zones. What you could do as a work around is to adjust the sequence time to zero. I will put it on the feature list which is probably not that hard to do but like the controllers and zones it should persist across HA restarts which complicates things a tad. Enjoy.

Hi Robert

Im using a Olimex esp32 POE mcu running ESPhome.

  1. When a cycle starts, I have a 2 relay output board switching mains on a 24vac TX and dosing pump
  2. Shortly after that a 5 relay output board switches power to one of the Hunter solenoid valves.
  3. Im using the Always off restore mode just to force the GPIO’s off on bootup.
    Hope that helps.
    I like the idea of a timer as a backup to shut down outputs I might add that too.
switch:
  - platform: gpio
    pin:
      number: 2
      inverted: true
    restore_mode: always_off
    name: "Kerb Side Manual Start"
    icon: "mdi:water-pump"
    id: valve_1
    on_turn_on:
      then:     
        - output.turn_on: power_supply2
    on_turn_off:
      then:
        - output.turn_off: power_supply2
output:
  - platform: gpio
    pin:
      number: 2
      inverted: true
    id: kerb_side_zone
  • RESTORE_DEFAULT_OFF (Default) - Attempt to restore state and default to OFF if not possible to restore.
    • RESTORE_DEFAULT_ON - Attempt to restore state and default to ON.
    • RESTORE_INVERTED_OFF - Attempt to restore state inverted from the previous state and default to OFF.
    • RESTORE_INVERTED_ON - Attempt to restore state inverted from the previous state and default to ON.
      > * ALWAYS_OFF - Always initialize the pin as OFF on bootup.
    • ALWAYS_ON - Always initialize the pin as ON on bootup.Text


Hey there,
Still messing with schedules and still can’t seem to get exactly what I’m after.
I need a sequence as the water pressure will only handle on zone on at a time.
I have 9 zones and would like 3 sequences, Summer, Winter, and the rest.
Inside these, some zones would be on every day, and some 2 or 3 days a week. Checking config, the below won’t work.

I was trying to put just the day under the individual zone and start time, month, etc under the schedule.

      sequences:
        - name: 'Summer'
          schedules:
            month: [dec, jan, feb]
            time: '10:45'
          zones:
            - zone_id: 1
              duration: "00:10"
              schedules:
                - weekday: [mon, wed, sat]

            - zone_id: 2
              duration: "00:10"
              #weekday: [mon, wed, sat]

Hi Paul,

Try something like this:

      sequences:
        - name: 'Annual'
          schedules:
            - name: 'Summer'
              month: [dec, jan, feb]
              weekday: [mon, wed, sat]
              time: '10:45'
            - name: 'Winter'
              month: [jun, jul, aug]
              weekday: [sun]
              time: '10:45'
            - name: 'Spring/autumn'
              month: [mar, apr, may, sep, oct, nov]
              weekday: [tue, thu]
              time: '10:45'
          zones:
            - zone_id: 1
              duration: "00:10"
            - zone_id: 2
              duration: "00:10"

There is also a seasonal watering example in the documentation which shows how to change the total irrigation time as well depending on the season.

Further to the previous post. Just in case this does not go far enough then create three sequences with one schedule each. This will allow complete control over all aspects of the sequence including which zones to run, order, durations, delays, repeats etc. Still want more then create a sequence for each month of the year. This example reverses the order in Spring/Autumn for no good reason and exludes a zone in Winter.

irrigation_unlimited:
  controllers:
    zones:
      - entity_id: 'switch.my_switch_1'
      - entity_id: 'switch.my_switch_2'
      - entity_id: 'switch.my_switch_3'
    sequences:
      - name: 'Summer'
        duration: '00:15'
        delay: '00:01'
        schedules:
          - time: '05:30'
            weekday: [mon, wed, fri]
            month: [dec, jan, feb]
        zones:
          - zone_id: 1
          - zone_id: 2
          - zone_id: 3
      - name: 'Winter'
        duration: '00:10'
        delay: '00:01'
        schedules:
          - time: '07:30'
            weekday: [sun]
            month: [jun, jul, aug]
        zones:
          - zone_id: 1
          - zone_id: 3
      - name: 'Spring and Autumn'
        duration: '00:12'
        delay: '00:01'
        schedules:
          - time: '06:30'
            weekday: [mon, thu]
            month: [mar, apr, may, sep, oct, nov]
        zones:
          - zone_id: 3
          - zone_id: 2
          - zone_id: 1

I will include this example in the documentation for reference.

Here is an updated compact card using the timeline feature in the latest release. Similar requirements to the original without logbook-card and card-mod but requires hiu-element
card_expanded_v2

Here are the card details

type: entities
title: Status
entities:
  - type: custom:fold-entity-row
    head:
      type: custom:multiple-entity-row
      entity: binary_sensor.irrigation_unlimited_c1_m
      attribute: percent_complete
      unit: '%'
      state_header: Complete
      state_color: true
      entities:
        - attribute: current_duration
          name: Duration
          hide_unavailable: true
      secondary_info:
        attribute: current_name
        hide_unavailable: true
    padding: 10
    entities:
      - type: custom:multiple-entity-row
        entity: binary_sensor.irrigation_unlimited_c1_m
        name: Next
        icon: mdi:clock-start
        show_state: false
        secondary_info:
          attribute: next_name
          hide_unavailable: true
        entities:
          - attribute: next_start
            name: Start
            hide_unavailable: true
            format: datetime
          - attribute: next_duration
            name: Duration
            hide_unavailable: true
  - type: divider
  - type: custom:fold-entity-row
    head:
      type: custom:multiple-entity-row
      entity: binary_sensor.irrigation_unlimited_c1_z1
      attribute: percent_complete
      unit: '%'
      state_header: Complete
      state_color: true
      entities:
        - attribute: current_duration
          name: Duration
          hide_unavailable: true
    padding: -50
    entities:
      - type: custom:hui-markdown-card
        entity: binary_sensor.irrigation_unlimited_c1_z1
        content: >
          {% set entity = 'binary_sensor.irrigation_unlimited_c1_z1' %} | Status
                | Start time | Duration | Schedule |
          Adjustment |

          |:--- | ---:| :--- | --- | --- |

          {% for item in state_attr(entity,'timeline') -%}
            {% set st = as_timestamp(item.start) -%}
            {% set et = as_timestamp(item.end) -%}
            | {{ item.status -}}
            | {{ st | timestamp_custom('%a %H:%M') -}}
            | {{ timedelta(seconds= et - st) -}}
            | {{ item.schedule_name -}}
            | {{ item.adjustment -}}
            |
          {% endfor %}
  - type: divider
  - type: custom:fold-entity-row
    head:
      type: custom:multiple-entity-row
      entity: binary_sensor.irrigation_unlimited_c1_z2
      attribute: percent_complete
      unit: '%'
      state_header: Complete
      state_color: true
      entities:
        - attribute: current_duration
          name: Duration
          hide_unavailable: true
      secondary_info:
        attribute: current_name
        hide_unavailable: true
      double_tap_action:
        action: call-service
        service: irrigation_unlimited.toggle
        service_data:
          entity_id: binary_sensor.irrigation_unlimited_c1_z2
    padding: -50
    entities:
      - type: custom:hui-markdown-card
        entity: binary_sensor.irrigation_unlimited_c1_z2
        content: >
          {% set entity = 'binary_sensor.irrigation_unlimited_c1_z2' %} | Status
                | Start time | Duration | Schedule |
          Adjustment |

          |:--- | ---:| :--- | --- | --- |

          {% for item in state_attr(entity,'timeline') -%}
            {% set st = as_timestamp(item.start) -%}
            {% set et = as_timestamp(item.end) -%}
            | {{ item.status -}}
            | {{ st | timestamp_custom('%a %H:%M') -}}
            | {{ timedelta(seconds= et - st) -}}
            | {{ item.schedule_name -}}
            | {{ item.adjustment -}}
            |
          {% endfor %}
2 Likes

Has any one tried the new “Paper Buttons Row” HACS frontend add-on the latest update is 1.0.0 with quite a lot of breaking changes.

Hi
Is this the markdown card in Home Assistant.

1 Like

The markdown card is a standard part of Home Assistant. Markdown Card - Home Assistant

Has anyone else had wundergroundpws entities stop working? After the last update 2022.3

I think the integration is broken in the new HA environment.

Logger: homeassistant.components.sensor
Source: custom_components/wundergroundpws/sensor.py:551 
Integration: Sensor (documentation, issues) 
First occurred: 8:19:32 AM (1 occurrences) 
Last logged: 8:19:32 AM

Error while setting up wundergroundpws platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/wundergroundpws/sensor.py", line 390, in async_setup_platform
    await rest.async_update()
  File "/config/custom_components/wundergroundpws/sensor.py", line 551, in async_update
    with async_timeout.timeout(10, loop=self._hass.loop):
TypeError: timeout() got an unexpected keyword argument 'loop'

My bad I should reply back here earlier.
I just needed to update to the latest Wundergroundpws custom component v0.8.1
Works great now

after a long rime i just wanted to thank you for all that improvments. i have your component setup and it is now possible to get everything controlled by manual runs - thank you!!

Thank you for the feedback and good to hear it is working well for you. If you haven’t already, try out the new html status card from the current release 2022.3.0. One that note I am looking for someone to help convert it to a ha-card. I am nearing the limits of the HTML-Jinja2 and want to take it further.

The idea is to make the card ‘active’ where you can click on the items (controller/zone/sequence) to perform actions on them. For example, add buttons at the relevant locations on the card or even make the icons active to toggle the enabled status. When you click the item icon it would toggle the enable status by making the appropriate service call. Same concept for the manual run, click on a zone or sequence to start it up.

A few more ideas in store but would speed things up greatly by someone with ha-card/JS/HTML experience. Please let me know if someone reading this can knock one up.

1 Like

I think about replacing my manufacturer control box with some switches and your integration and read you github-page and this thread. But either I didn’t see the answers to the questions below or didn’t understand till now. Would be great, if you can blow away the fog in my mind.

  1. In my old control box I had e.g. a program/schedule which runs the zones a,b and c each after another. But there, I was able to start this program/schedule manually, so zones a,b and c runs outside the schedule. Possible here somehow?

  2. Setup same as above. Run started for a,b,c each after another, either per schedule or manually as in first topic. Assume a is currently running. Then I was able to press a next button, a was stopped/rest ot time skipped and b started. Same is b is running and then c is starting or c is ended if c is running befire. Possible here somehow?

  3. As I look for such manuel states, I found this in this part here. But the used services shim_manual_run and shim_cancel are not in the documentation, aren’t they?

  4. As the times ar defined in yaml. Where are they stored, if I adjust via adjust_time. And how long last this adjustments? Until reboot?

  5. In zone objects, you have the parameter zone_id, required later as reference in sequence zone objects. But you are not using this attribute in any of the examples and only the “list-order”. Why? Currently, I’m struggling with the objects, as I can only partly see in the docs (and only try to understand via examples), which are optional and which are mandatory parameters.

I was struggling with something and I think I have figured it out, but maybe I am wrong. I was looking to show the timeline for all my 20 zones… When I looked at the sample below, it shows me that I would enter the ‘all_zones_config:’ under ZONES: but when I put the three lines in my YAML, it errors.

When I read the documentation, I think it was supposed to go under the CONTROLLERS: no? I was just looking at the example under the Timelines section of documentation.

Thanks in advance.

I have to tell you, for the longest time, I was a bit envious of this add on, but I did not connect the dots that I could control my HydraWise Controller using this add-on sending in manual switches to my controller. Once I made the connection, I spend the morning getting this all integrated. I have to admit that I am still trying to figure out the sequences vs. schedules and how they will all nest, but I think I am close. I may have another question for you on my strategy on building my sequences, but let me first play with it. LOVE IT - awesome job. If I get this working, I will be thanking you more appropriately for building this.

irrigation_unlimited:
controllers:
zones:
all_zones_config: # <= Add these three lines <─┐
show: # <= to the configuration <─┤
timeline: true # <= for all zones <─┘
entity_id: “switch.my_switch”
show: # <= Add these two lines to the <─┐
timeline: true # <= configuration for individual zones <─┘
schedules:
- time: “06:00”
duration: “00:20”