The events irrigation_unlimited_valve_on and irrigation_unlimited_valve_off are fired whenever a valve changes state. These are useful for monitoring real-time flow and detecting issues like blockages (too little water) or burst pipes (too much water).
To implement volume monitoring:
- Ensure you have set up volume monitoring as described in the Volume Object documentation.
- Use the
irrigation_unlimited_valve_off event to trigger a check against your expected volume thresholds. - Use the
trigger.event.data.volume field to compare the actual volume against your min and max limits.
alias: Irrigation volume checker
description: Irrigation Unlimited Volume Checker
triggers:
- trigger: event
event_type:
- irrigation_unlimited_valve_off
conditions:
- condition: template
value_template: >-
{{ id in volumes and (vol < volumes[id]['min'] or vol >
volumes[id]['max']) }}
actions:
- action: notify.NOTIFIER_NAME # Make sure this matches the "NOTIFIER_NAME" in the smtp setup
data:
title: Irrigation Volume Error
message: >
Time: {{ as_local(trigger.event.time_fired).strftime('%c') }}
Controller: {{ trigger.event.data.controller.index + 1 }} {{ trigger.event.data.controller.name }}
Zone: {{ trigger.event.data.zone.index + 1 }} {{ trigger.event.data.zone.name }}
Volume: {{ vol }}
mode: queued
variables:
id: "{{ trigger.event.data.iu_id }}"
vol: "{{ trigger.event.data.volume | float(0) }}"
# Fill in this table of zones and their minimum and maximum volumes
volumes: |
{{ dict([
('c1_z1', {'min': 5, 'max': 25}),
('c1_z3', {'min': 10, 'max': 80}),
('c1_z4', {'min': 10, 'max': 100}),
]) }}