Irrigation unlimited + HASmartIrrigation with multiple Zones in a controller
We have 10 zones under 4 controllers. Each of the controllers is a BHyve 1x or 4x valve. Each of the Zones is configured in HASmartIrrigation
I’m green to HA, so I probably made this harder than it needs to be
When creating the HASmartIrrigation automation the example asks to trigger on the smart irrigation zone, and then to adjust time on the sequence entity ID. The sequence entity ID contains multiple Zones
Should I be placing each zone into the integration unlimited as a separate controller?
configuration:
Each zone is in HASmartIrrigation
Controller BHyve Valve 1
- Zone K
Controller BHyve Valve 2
- Zone A
Controller BHyve Valve 3
- Zone B / C / E / H
Controller BHyve Valve 4
- Zone D / F / G / unused
irrigation_unlimited configuration:
controllers:
- name: "Controller BHyve Valve 1"
all_zones_config:
show:
timeline: true
duration: 0:00
preamble: "00:01"
postamble: "00:01"
zones:
name: "zone_k"
entity_id: "switch.zone_k_zone"
sequences:
- name: "Sequence BHyve Valve 1 Zone K"
zones:
- zone_id: 1
- name: "Controller BHyve Valve 2"
all_zones_config:
show:
timeline: true
duration: 0:00
preamble: "00:01"
postamble: "00:01"
zones:
name: "zone_a"
entity_id: "switch.zone_a_zone"
sequences:
- name: "Sequence BHyve Valve 2 Zone A"
zones:
- zone_id: 1
- name: "Controller BHyve Valve 3"
all_zones_config:
show:
timeline: true
duration: 0:00
preamble: "00:01"
postamble: "00:01"
zones:
- name: "zone_b"
entity_id: "switch.zone_b_zone"
- name: "zone_c"
entity_id: "switch.zone_c_zone"
- name: "zone_e"
entity_id: "switch.zone_e_zone"
- name: "zone_h"
entity_id: "switch.zone_h_zone"
sequences:
- name: "Sequence BHyve Valve 3 Zone BCEH"
zones:
- zone_id: 1
- zone_id: 2
- zone_id: 3
- zone_id: 4
- name: "Controller BHyve Valve 4"
all_zones_config:
show:
timeline: true
duration: 0:00
preamble: "00:01"
postamble: "00:01"
zones:
- name: "zone_d"
entity_id: "switch.zone_d_zone"
- name: "zone_f"
entity_id: "switch.zone_f_zone"
- name: "zone_g"
entity_id: "switch.zone_g_zone"
sequences:
- name: "Sequence BHyve Valve 4 Zone DFG"
zones:
- zone_id: 1
- zone_id: 2
- zone_id: 3
Automation
# Filename: irrigation_unlimited_smart_irrigation.yaml
#
# Verion: 1.0.4
#
# Description: Example automation for HAsmartirrigation integration
# (smart_irrigation)[https://github.com/jeroenterheerdt/HAsmartirrigation]
#
# This automation tracks a Smart Irrigation sensor and transfers the
# the calculation to a Irrigation Unlimited sequence. When the sequence
# completes the Smart Irrigation bucket is reset.
#
# Change the relevant Smart Irrigation and Irrigation Unlimited entities.
# DO NOT simply copy this file as it will NOT WORK, it must be configured
# to suit your setup as indicated below.
#
# This file is a package and should be located in the config/packages
# folder. If you do not have a packages folder then create it and add
# the following to configuration.yaml
#
# homeassistant:
# packages: !include_dir_named packages
#
# More information on packages can be found at https://www.home-assistant.io/docs/configuration/packages
#
automation:
- alias: Smart Irrigation adjustment
id: "IU1653097957047"
description: Adjust watering times based on smart irrigation calculations
mode: single
triggers:
- trigger: state
# Change the Smart Irrigation entity_id as required
entity_id: sensor.smart_irrigation_irrigation_d
to: null
actions:
- action: irrigation_unlimited.adjust_time
data:
actual: "{{ timedelta(seconds=trigger.to_state.state | int(0)) }}"
# Change the Irrigation Unlimited sequence entity_id as required
# +++++++++++ Sequence contains Zones DFG +++++++++++
entity_id: binary_sensor.irrigation_unlimited_c4_s1
- alias: Smart Irrigation reset bucket
id: "IU1653098247170"
description: Resets the Smart Irrigation bucket after watering
mode: single
triggers:
- trigger: event
event_type: irrigation_unlimited_finish
condition:
- "{{ trigger.event.data.schedule.index is not none }}" # Not a manual run
# Match the following to the Irrigation Unlimited entity_id as above
# +++++++++++ Sequence contains Zones DFG +++++++++++
- "{{ trigger.event.data.entity_id == 'binary_sensor.irrigation_unlimited_c4_s1' }}"
actions:
- action: smart_irrigation.reset_bucket
# Match the following to the Smart Irrigation entity_id as above
entity_id: sensor.smart_irrigation_irrigation_d
data: {}