Hunter Hydrawise Sprinkler System Integration

I’m setting up the Hydrawise Integration now. I do not have the controller yet but have setup a account on Hydrawise with a api. I’m getting errors from the binary sensor in the logs. What could I be missing?

hydrawise:

  access_token: myapi

binary_sensor:

  - platform: hydrawise

sensor:

  - platform: hydrawise

Hy, i’ve the physical device installed and configured and on the hydrawise app i have (for now) 3 zones configured and this configuration in HA

hydrawise:
  access_token: !secret hydra_api

binary_sensor:
  - platform: hydrawise

sensor:
  - platform: hydrawise
    monitored_conditions:
      - watering_time
      - next_cycle

switch:
  - platform: hydrawise
    watering_minutes: 30
    monitored_conditions:
      - auto_watering
      - manual_watering

after updating HA 0.112 the configuration error disappeared (i saw the problem with API was resolved) but i can’t find the sensors or binary or switch…

can anyone help me?

update:
after update to 112.2 the sensors and all the setting start to works great…

I set mine up recently. I came across some posts that said you needed to remove the dashes from the API key. With the updated version, I had to add the dashes.

Just got this controller and wanted to follow up on the post above. Are the controls exposed within HA all or nothing to start/stop watering? Or can you start / stop on a per zone basis? IE if I had a specific zone I wanted to water once a week, or based on a moisture sensor (compost pile) can I control that separately?

Yes you can, it exposes controls,

I have created a card to control the Hydrawise Spriklers, using Node-RED to handle all the logic / runtimes selected. Its a little nicer control vs what we get in the HA integration.

Took me a few hours to create but the love lace card works really nice.

I can share the config if anyone is interested,

4 Likes

I would be interested in seeing your config to see a different approach. Thanks.

Sure, here is the config, I made some updates today to improve it.

All my zones in Hydrawise are called as the following, if you copy this, you can mostly copy what I have and it will work, Node-RED will create all the sensors.

You need Node-RED and the following Palette: node-red-contrib-countdown-2, node-red-contrib-bigtimer (if you want to make automations later) I can share that with you, nice and easy.

You need the following from HACS:

Node-RED: https://github.com/zachowj/hass-node-red
Button Card: https://github.com/custom-cards/button-card
Slider Entity Row: https://github.com/thomasloven/lovelace-slider-entity-row
Multiple Entity Row: https://github.com/benct/lovelace-multiple-entity-row

Here is the code for configuration.yaml

# Irrigation
hydrawise:
  access_token: XXXX-XXXX-XXXX-XXXX

this is for the “Hydrawise Local Connection”

binary_sensor:
# Hydrawise Binary Sensor - Status (local)
  - platform: ping
    host: 192.168.XXX.XXX
    name: Hydrawise Controller
    scan_interval: 10
    count: 2

This is for the “Hydrawise Cloud Connection” & “Is Watering Sensor”

binary_sensor:
# Hydrawise Binary Sensor - Status (Cloud)
  - platform: hydrawise

For the manual watering control

switch:
#Irrigation
  - platform: hydrawise
    watering_minutes: 60
    monitored_conditions: manual_watering

Input Select

input_select:
  irrigation_program:
    name: Irrigation Program
    icon: mdi:launch
    options:
      - Start
      - Stop
    initial: Stop

  irrigation_program_runtime:
    name: Irrigation Program Runtime (Minutes)
    icon: mdi:clock-outline
    options:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      - 9
      - 10
      - 11
      - 12
      - 13
      - 14
      - 15
      - 16
      - 17
      - 18
      - 19
      - 20
      - 21
      - 22
      - 23
      - 24
      - 25
      - 26
      - 27
      - 28
      - 29
      - 30
      - 31
      - 32
      - 33
      - 34
      - 35
      - 36
      - 37
      - 38
      - 39
      - 40
      - 41
      - 42
      - 43
      - 44
      - 45
      - 46
      - 47
      - 48
      - 49
      - 50
      - 51
      - 52
      - 53
      - 54
      - 55
      - 56
      - 57
      - 58
      - 59
      - 60
    initial: 15

Input Boolean

input_boolean:
  irrigation_zone1:
    name: Irrigation Zone 1

  irrigation_zone2:
    name: Irrigation Zone 2

  irrigation_zone3:
    name: Irrigation Zone 3

  irrigation_zone4:
    name: Irrigation Zone 4

  irrigation_zone5:
    name: Irrigation Zone 5

  irrigation_zone6:
    name: Irrigation Zone 6

  irrigation_program_zone1:
    name: Zone 1 (Friendly Name)
    initial: off

  irrigation_program_zone2:
    name: Zone 2 (Friendly Name)
    initial: off
    
  irrigation_program_zone3:
    name: Zone 3 (Friendly Name)
    initial: off
    
  irrigation_program_zone4:
    name: Zone 4 (Friendly Name)
    initial: off
    
  irrigation_program_zone5:
    name: Zone 5 (Friendly Name)
    initial: off

  irrigation_program_zone6:
    name: Zone 6 (Friendly Name)
    initial: off

Timers, this will show the switch as on while it waits for the cloud to issue the commands to the zone, this can take over 2mins initially.

timer:
  irrigation_timer_zone1:
    duration: '00:03:00'
  irrigation_timer_zone2:
    duration: '00:03:00'
  irrigation_timer_zone3:
    duration: '00:03:00'
  irrigation_timer_zone4:
    duration: '00:03:00'
  irrigation_timer_zone5:
    duration: '00:03:00'
  irrigation_timer_zone6:
    duration: '00:03:00'

Switches

switch:
# IRRIGATION TIMER ZONE 1
  - platform: template
    switches:
      irrigation_zone1:
        friendly_name: Irrigation Zone 1
        value_template: >-
          {% if is_state('timer.irrigation_timer_zone1', 'idle') %}
          {{ states("switch.zone_1_manual_watering") }}
          {% else %}
          {{ states("input_boolean.irrigation_zone1") }}
          {% endif %}
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.irrigation_zone1
          - service: timer.start
            entity_id: timer.irrigation_timer_zone1
          - service: switch.turn_on
            entity_id: switch.zone_1_manual_watering
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.irrigation_zone1
          - service: timer.start
            entity_id: timer.irrigation_timer_zone1
          - service: switch.turn_off
            entity_id: switch.zone_1_manual_watering

# IRRIGATION TIMER ZONE 2
  - platform: template
    switches:
      irrigation_zone2:
        friendly_name: Irrigation Zone 2
        value_template: >-
          {% if is_state('timer.irrigation_timer_zone2', 'idle') %}
          {{ states("switch.zone_2_manual_watering") }}
          {% else %}
          {{ states("input_boolean.irrigation_zone2") }}
          {% endif %}
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.irrigation_zone2
          - service: timer.start
            entity_id: timer.irrigation_timer_zone2
          - service: switch.turn_on
            entity_id: switch.zone_2_manual_watering
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.irrigation_zone2
          - service: timer.start
            entity_id: timer.irrigation_timer_zone2
          - service: switch.turn_off
            entity_id: switch.zone_2_manual_watering

# IRRIGATION TIMER ZONE 3
  - platform: template
    switches:
      irrigation_zone3:
        friendly_name: Irrigation Zone 3
        value_template: >-
          {% if is_state('timer.irrigation_timer_zone3', 'idle') %}
          {{ states("switch.zone_3_manual_watering") }}
          {% else %}
          {{ states("input_boolean.irrigation_zone3") }}
          {% endif %}
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.irrigation_zone3
          - service: timer.start
            entity_id: timer.irrigation_timer_zone3
          - service: switch.turn_on
            entity_id: switch.zone_3_manual_watering
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.irrigation_zone3
          - service: timer.start
            entity_id: timer.irrigation_timer_zone3
          - service: switch.turn_off
            entity_id: switch.zone_3_manual_watering

# IRRIGATION TIMER ZONE 4
  - platform: template
    switches:
      irrigation_zone4:
        friendly_name: Irrigation Zone 4
        value_template: >-
          {% if is_state('timer.irrigation_timer_zone4', 'idle') %}
          {{ states("switch.zone_4_manual_watering") }}
          {% else %}
          {{ states("input_boolean.irrigation_zone4") }}
          {% endif %}
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.irrigation_zone4
          - service: timer.start
            entity_id: timer.irrigation_timer_zone4
          - service: switch.turn_on
            entity_id: switch.zone_4_manual_watering
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.irrigation_zone4
          - service: timer.start
            entity_id: timer.irrigation_timer_zone4
          - service: switch.turn_off
            entity_id: switch.zone_4_manual_watering

# IRRIGATION TIMER ZONE 5
  - platform: template
    switches:
      irrigation_zone5:
        friendly_name: Irrigation Zone 5
        value_template: >-
          {% if is_state('timer.irrigation_timer_zone5', 'idle') %}
          {{ states("switch.zone_5_manual_watering") }}
          {% else %}
          {{ states("input_boolean.irrigation_zone5") }}
          {% endif %}
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.irrigation_zone5
          - service: timer.start
            entity_id: timer.irrigation_timer_zone5
          - service: switch.turn_on
            entity_id: switch.zone_5_manual_watering
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.irrigation_zone5
          - service: timer.start
            entity_id: timer.irrigation_timer_zone5
          - service: switch.turn_off
            entity_id: switch.zone_5_manual_watering

# IRRIGATION TIMER ZONE 6
  - platform: template
    switches:
      irrigation_zone6:
        friendly_name: Irrigation Zone 6
        value_template: >-
          {% if is_state('timer.irrigation_timer_zone6', 'idle') %}
          {{ states("switch.zone_6_manual_watering") }}
          {% else %}
          {{ states("input_boolean.irrigation_zone6") }}
          {% endif %}
        turn_on:
          - service: input_boolean.turn_on
            entity_id: input_boolean.irrigation_zone6
          - service: timer.start
            entity_id: timer.irrigation_timer_zone6
          - service: switch.turn_on
            entity_id: switch.zone_6_manual_watering
        turn_off:
          - service: input_boolean.turn_off
            entity_id: input_boolean.irrigation_zone6
          - service: timer.start
            entity_id: timer.irrigation_timer_zone6
          - service: switch.turn_off
            entity_id: switch.zone_6_manual_watering

I’ll separately link the Node-RED flow

3 Likes

here is the flow,

1 Like

Here is the automation

Here is the lovelace card

type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: binary_sensor.my_controller_status
        name: Hydrawise Cloud Connection
        icon: 'mdi:cloud-check'
      - entity: binary_sensor.hydrawise_controller
        name: Hydrawise Local Connection
        icon: 'mdi:water-check'
    state_color: true
    show_header_toggle: false
  - type: entities
    entities:
      - entity: sensor.node_red_irrigation_program
        name: 'Program:'
      - entity: sensor.node_red_irrigation_zone_running
        name: 'Zone Running:'
      - entity: input_select.irrigation_program_runtime
        type: 'custom:slider-entity-row'
        name: Runtime (min)
        min: 1
        max: 60
        step: 1
      - type: divider
      - entity: input_boolean.irrigation_program_zone1
        type: 'custom:multiple-entity-row'
        icon: 'mdi:engine'
        toggle: true
        state_color: true
        secondary_info:
          entity: sensor.node_red_irrigation_zone_1_run_time
          name: 'Runtime (min):'
        entities:
          - entity: binary_sensor.node_red_irrigation_zone_1_state
            icon: true
            name: false
            state_color: true
          - entity: binary_sensor.zone_1_watering
            icon: true
            name: false
            state_color: true
      - entity: input_boolean.irrigation_program_zone2
        type: 'custom:multiple-entity-row'
        icon: 'mdi:engine'
        toggle: true
        state_color: true
        secondary_info:
          entity: sensor.node_red_irrigation_zone_2_run_time
          name: 'Runtime (min):'
        entities:
          - entity: binary_sensor.node_red_irrigation_zone_2_state
            icon: true
            name: false
            state_color: true
          - entity: binary_sensor.zone_2_watering
            icon: true
            name: false
            state_color: true
      - entity: input_boolean.irrigation_program_zone3
        type: 'custom:multiple-entity-row'
        icon: 'mdi:engine'
        toggle: true
        state_color: true
        secondary_info:
          entity: sensor.node_red_irrigation_zone_3_run_time
          name: 'Runtime (min):'
        entities:
          - entity: binary_sensor.node_red_irrigation_zone_3_state
            icon: true
            name: false
            state_color: true
          - entity: binary_sensor.zone_3_watering
            icon: true
            name: false
            state_color: true
      - entity: input_boolean.irrigation_program_zone4
        type: 'custom:multiple-entity-row'
        icon: 'mdi:engine'
        toggle: true
        state_color: true
        secondary_info:
          entity: sensor.node_red_irrigation_zone_4_run_time
          name: 'Runtime (min):'
        entities:
          - entity: binary_sensor.node_red_irrigation_zone_4_state
            icon: true
            name: false
            state_color: true
          - entity: binary_sensor.zone_4_watering
            icon: true
            name: false
            state_color: true
      - entity: input_boolean.irrigation_program_zone5
        type: 'custom:multiple-entity-row'
        icon: 'mdi:engine'
        toggle: true
        state_color: true
        secondary_info:
          entity: sensor.node_red_irrigation_zone_5_run_time
          name: 'Runtime (min):'
        entities:
          - entity: binary_sensor.node_red_irrigation_zone_5_state
            icon: true
            name: false
            state_color: true
          - entity: binary_sensor.zone_5_watering
            icon: true
            name: false
            state_color: true
      - entity: input_boolean.irrigation_program_zone6
        type: 'custom:multiple-entity-row'
        icon: 'mdi:engine'
        toggle: true
        state_color: true
        secondary_info:
          entity: sensor.node_red_irrigation_zone_6_run_time
          name: 'Runtime (min):'
        entities:
          - entity: binary_sensor.node_red_irrigation_zone_6_state
            icon: true
            name: false
            state_color: true
          - entity: binary_sensor.zone_6_watering
            icon: true
            name: false
            state_color: true
    state_color: true
    show_header_toggle: false
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        name: Stop
        tap_action:
          action: call-service
          haptic: medium
          service: input_select.select_option
          service_data:
            entity_id: input_select.irrigation_program
            option: Stop
        show_icon: false
        hold_action:
          action: none
        styles:
          card:
            - '--mdc-ripple-color': darkblue
            - '--mdc-ripple-press-opacity': 0.5
      - type: 'custom:button-card'
        name: Start
        tap_action:
          action: call-service
          haptic: medium
          service: input_select.select_option
          service_data:
            entity_id: input_select.irrigation_program
            option: Start
        show_icon: false
        hold_action:
          action: none
        styles:
          card:
            - '--mdc-ripple-color': darkblue
            - '--mdc-ripple-press-opacity': 0.5
1 Like

Hello, is it possible to create a Lovelace Card that shows an animated short sequence of a video I have recorded when I turn on the irrigation? What’s the best way to do that? Thanks

Hi. Can you help me with no node-red automation? i have 9 zones and i create everything according to your example except automations

I installed everything correctly but when I added the lovelace card it just says entity not available. Any help?

Any help with this intergration? I have an error in my logs: 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 “/usr/local/lib/python3.9/concurrent/futures/thread.py”, line 52, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/hydrawise/binary_sensor.py”, line 31, in setup_platform
HydrawiseBinarySensor(hydrawise.current_controller, sensor_type)
File “/usr/src/homeassistant/homeassistant/components/hydrawise/init.py”, line 125, in init
self._name = f"{self.data[‘name’]} {DEVICE_MAP[self._sensor_type][DEVICE_MAP_INDEX.index(‘KEY_INDEX’)]}"
TypeError: list indices must be integers or slices, not str

with my binary sensor.
Also, I had to remove the dashes(-) from the generated api key, otherwise I get more errors. is this correct? anyway, I cannot find the sensros no where…

Hi,

A quick one is it possible to support multiple controllers?

Hi!

It would be great, when the automatic_watering suspend time can be configurable at the switch parameters. I would like to suspend only for the current day, but now it’s not possible. Now the automatic_watering switch suspends watering for one year and when toggled the code sending the suspend to 0 period ihe code below:

self.hass.data[DATA_HYDRAWISE].data.suspend_zone(0, relay_data)

In the Hydrawise log appears:
Suspending scheduled watering for Hydrawise Zone1 Frontyard till Thursday, 1st of January 1970, 01:00AM

But the zone still suspended for the previously set one year.

Thanks

1 Like

Where is available local Hunter Hydrawies integration ?

I have exactly the same problem. Did you made a request for this feature on github yet ?

Hi all
Is available local integration for Hunter Hydrawise no by cloud ?
And if we integrate by cloud we can change time irrigation by Home Assistant or only see what time remaining ?

If i have connected also to hunter sensor rain click it will be also show in Home Assistant ?

Is there a way to rename “sensor” and “binary sensor” in HA Overview page?