178 lines
6.3 KiB
YAML
178 lines
6.3 KiB
YAML
- id: IU1653340123453
|
|
alias: Irrigation Unlimited Adjustment
|
|
triggers:
|
|
- trigger: time
|
|
at: 02:00
|
|
- trigger: homeassistant
|
|
event: start
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.irrigation_unlimited_rain_weighted_total
|
|
- sensor.irrigation_unlimited_temperature_5_day_moving_average
|
|
- sensor.wupws_preciprate
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- '{{ states(''sensor.irrigation_unlimited_rain_weighted_total'') | float(-1)
|
|
!= -1 }}'
|
|
- '{{ states(''sensor.wupws_preciprate'') | float(-1) != -1 }}'
|
|
- '{{ states(''sensor.irrigation_unlimited_temperature_5_day_moving_average'')
|
|
| float(-273) != -273 }}'
|
|
actions:
|
|
- action: irrigation_unlimited.adjust_time
|
|
data:
|
|
percentage: "{# Threshold variables #} {% set rain_total_threshold = 3.5 %}\
|
|
\ {% set rain_rate_threshold = 1.0 %} {% set temperature_threshold = 20.0\
|
|
\ %}\n{# Sensor data #} {% set rain_total = states('sensor.irrigation_unlimited_rain_weighted_total')\
|
|
\ | float(-1) %} {% set rain_rate = states('sensor.wupws_preciprate') | float(-1)\
|
|
\ %} {% set temperature_average = states('sensor.irrigation_unlimited_temperature_5_day_moving_average')\
|
|
\ | float(-273) %}\n{# Threshold variables #} {% set rain_multiplier = (1\
|
|
\ - (rain_total / rain_total_threshold)) %} {% set temperature_multiplier\
|
|
\ = temperature_average / temperature_threshold %}\n{% set multiplier = 1.0\
|
|
\ %} {% if rain_rate < rain_rate_threshold and rain_multiplier > 0 and rain_total\
|
|
\ < rain_total_threshold %}\n {% set multiplier = multiplier * temperature_multiplier\
|
|
\ %}\n {% set multiplier = multiplier * rain_multiplier %}\n{% else %}\n\
|
|
\ {% set multiplier = 0.0 %} {# It's raining or enough already #}\n{% endif\
|
|
\ %}\n{# Return multiplier as a percentage #} {{ (multiplier * 100) | round(0)\
|
|
\ }}\n"
|
|
- alias: Irrigation Unlimited Load UI Controls
|
|
triggers:
|
|
- trigger: homeassistant
|
|
event: start
|
|
actions:
|
|
- action: irrigation_unlimited.list_config
|
|
data:
|
|
entity_id: input_select.irrigation_unlimited_entities
|
|
section: entities
|
|
first: <none>
|
|
- action: irrigation_unlimited.list_config
|
|
data:
|
|
entity_id: input_select.irrigation_unlimited_sequences
|
|
section: sequences
|
|
first: <none>
|
|
- alias: Irrigation Unlimited Entities Change
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- input_select.irrigation_unlimited_entities
|
|
from: <none>
|
|
actions:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id:
|
|
- input_select.irrigation_unlimited_sequences
|
|
data:
|
|
option: <none>
|
|
- action: input_select.set_options
|
|
target:
|
|
entity_id:
|
|
- input_select.irrigation_unlimited_sequence_zones
|
|
data:
|
|
options:
|
|
- <none>
|
|
- alias: Irrigation Unlimited Sequences Change
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- input_select.irrigation_unlimited_sequences
|
|
from: <none>
|
|
actions:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id:
|
|
- input_select.irrigation_unlimited_entities
|
|
data:
|
|
option: <none>
|
|
- alias: Irrigation Unlimited Sequences Select
|
|
triggers:
|
|
- trigger: template
|
|
value_template: '{{ is_state("input_select.irrigation_unlimited_sequences", "<none>")
|
|
== False }}'
|
|
actions:
|
|
- action: irrigation_unlimited.list_config
|
|
data:
|
|
entity_id: input_select.irrigation_unlimited_sequence_zones
|
|
section: sequence_zones
|
|
first: <none>
|
|
controller_sequence_entity: input_select.irrigation_unlimited_sequences
|
|
- alias: Smart Irrigation adjustment
|
|
id: IU1653097957047
|
|
description: Adjust watering times based on smart irrigation calculations
|
|
mode: single
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.smart_irrigation_[zone_name]
|
|
to: null
|
|
actions:
|
|
- action: irrigation_unlimited.adjust_time
|
|
data:
|
|
actual: '{{ timedelta(seconds=trigger.to_state.state | int(0)) }}'
|
|
entity_id: binary_sensor.irrigation_unlimited_c1_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 }}'
|
|
- '{{ trigger.event.data.entity_id == ''binary_sensor.irrigation_unlimited_c1_s1''
|
|
}}'
|
|
actions:
|
|
- action: smart_irrigation.reset_bucket
|
|
entity_id: sensor.smart_irrigation_[zone_name]
|
|
data: {}
|
|
- id: IU1653340127290
|
|
alias: Irrigation Unlimited Soil Moisture Adjustment
|
|
triggers:
|
|
- trigger: time
|
|
at: 02:00
|
|
- trigger: homeassistant
|
|
event: start
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- '{{ states(''sensor.plaid_systems_ps_sprzms_slp3_humidity'') | float(-1) !=
|
|
-1 }}'
|
|
actions:
|
|
- action: irrigation_unlimited.adjust_time
|
|
data:
|
|
entity_id: binary_sensor.irrigation_unlimited_c1_m
|
|
sequence_id: 0
|
|
percentage: "{# Threshold variable 0-100 percent #} {% set threshold = 80 %}\n\
|
|
{# Sensor data #} {% set humidity = states('sensor.plaid_systems_ps_sprzms_slp3_humidity')\
|
|
\ | float %}\n{% if humidity < threshold %}\n {% set multiplier = 1 - (humidity\
|
|
\ / threshold) %}\n{% else %}\n {% set multiplier = 0.0 %} {# It's too wet,\
|
|
\ turn off #}\n{% endif %}\n{# Return multiplier as a percentage #} {{ (multiplier\
|
|
\ * 100) | round(0) }}\n"
|
|
- id: IU1653849227290
|
|
alias: Irrigation Unlimited Soil Temperature Adjustment
|
|
trigger:
|
|
- platform: time
|
|
at: 02:00
|
|
- platform: homeassistant
|
|
event: start
|
|
condition:
|
|
condition: and
|
|
conditions:
|
|
- '{{ states(''sensor.irrigation_unlimited_average_soil_temperature'') | float(-273)
|
|
!= -273 }}'
|
|
action:
|
|
service: irrigation_unlimited.adjust_time
|
|
data:
|
|
entity_id: binary_sensor.irrigation_unlimited_c1_m
|
|
sequence_id: 0
|
|
percentage: '{# Threshold variables #} {% set temperature_threshold = 20.0 %}
|
|
|
|
{# Sensor data #} {% set temperature_average = states(''sensor.irrigation_unlimited_average_soil_temperature'')
|
|
| float(-273) %}
|
|
|
|
{# Threshold variables #} {% set temperature_multiplier = temperature_average
|
|
/ temperature_threshold %}
|
|
|
|
{# Return multiplier as a percentage #} {{ (temperature_multiplier * 100)
|
|
| round(0) }}
|
|
|
|
'
|