Home Assistant Git Exporter
This commit is contained in:
0
config/packages/.vscode/settings.json
vendored
Normal file
0
config/packages/.vscode/settings.json
vendored
Normal file
215
config/packages/irrigation_unlimited_adjustment.yaml.old
Normal file
215
config/packages/irrigation_unlimited_adjustment.yaml.old
Normal file
@@ -0,0 +1,215 @@
|
||||
# Filename: irrigation_unlimited_adjustment.yaml
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# Set up some observation sensors.
|
||||
# This uses the Home-Assistant-wundergroundpws https://github.com/cytech/Home-Assistant-wundergroundpws integration.
|
||||
# Rain information (wupws_preciptotal) is a daily accumulation total. So we want to grab the
|
||||
# data just before midnight to get the daily total. We shouldn't be too eager to look after midnight
|
||||
# because the reset from WU may take a few minutes to come through, currently 10 min. Increase this
|
||||
# if data is unreliable.
|
||||
# Note: Requires the ha-average integration to be installed https://github.com/Limych/ha-average
|
||||
|
||||
sensor:
|
||||
- platform: average
|
||||
name: irrigation_unlimited_rain_0
|
||||
entities:
|
||||
- sensor.wupws_preciptotal
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) }}"
|
||||
end: "{{ now() }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_rain_1
|
||||
entities:
|
||||
- sensor.wupws_preciptotal
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=1) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=1) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_rain_2
|
||||
entities:
|
||||
- sensor.wupws_preciptotal
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=2) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=2) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_rain_3
|
||||
entities:
|
||||
- sensor.wupws_preciptotal
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=3) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=3) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_rain_4
|
||||
entities:
|
||||
- sensor.wupws_preciptotal
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=4) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=4) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_temperature_0
|
||||
entities:
|
||||
- sensor.wupws_temp
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) }}"
|
||||
end: "{{ now() }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_temperature_1
|
||||
entities:
|
||||
- sensor.wupws_temp
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=1) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=1) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_temperature_2
|
||||
entities:
|
||||
- sensor.wupws_temp
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=2) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=2) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_temperature_3
|
||||
entities:
|
||||
- sensor.wupws_temp
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=3) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=3) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_temperature_4
|
||||
entities:
|
||||
- sensor.wupws_temp
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=4) }}"
|
||||
end: "{{ now().replace(hour=23).replace(minute=59).replace(second=0) - timedelta(days=4) }}"
|
||||
scan_interval: 600
|
||||
|
||||
- platform: average
|
||||
name: irrigation_unlimited_temperature_5_day_moving_average
|
||||
entities:
|
||||
- sensor.wupws_temp
|
||||
precision: 1
|
||||
start: "{{ now().replace(hour=0).replace(minute=30).replace(second=0) - timedelta(days=4) }}"
|
||||
end: "{{ now() }}"
|
||||
scan_interval: 600
|
||||
|
||||
# Five day weighted rain total sensor.
|
||||
# Adjust the weight values (0.7, 0.3, 0.15, 0.05) to suit your needs (0.0 = ignore that day).
|
||||
- platform: template
|
||||
sensors:
|
||||
irrigation_unlimited_rain_weighted_total:
|
||||
friendly_name: "Irrigation Unlimited Rain Weighted Total"
|
||||
unit_of_measurement: "mm"
|
||||
icon_template: "mdi:umbrella"
|
||||
value_template: >
|
||||
{% set r0 = state_attr('sensor.irrigation_unlimited_rain_0','max_value') | float(-1) %}
|
||||
{% set r1 = state_attr('sensor.irrigation_unlimited_rain_1','max_value') | float(-1) %}
|
||||
{% set r2 = state_attr('sensor.irrigation_unlimited_rain_2','max_value') | float(-1) %}
|
||||
{% set r3 = state_attr('sensor.irrigation_unlimited_rain_3','max_value') | float(-1) %}
|
||||
{% set r4 = state_attr('sensor.irrigation_unlimited_rain_4','max_value') | float(-1) %}
|
||||
{% if r0 != -1 and r1 != -1 and r2 != -1 and r3 != - 1 and r4 != -1 %}
|
||||
{% set rain_total = r0 %}
|
||||
{% set rain_total = rain_total + r1 * 0.7 %}
|
||||
{% set rain_total = rain_total + r2 * 0.3 %}
|
||||
{% set rain_total = rain_total + r3 * 0.15 %}
|
||||
{% set rain_total = rain_total + r4 * 0.05 %}
|
||||
{{ rain_total | round(1) }}
|
||||
{% else %}
|
||||
{{ -1 }}
|
||||
{% endif %}
|
||||
scan_interval: 600
|
||||
|
||||
# Automation to adjust the run times for Irrigation Unlimited.
|
||||
# It uses the 5 day weighted rain total and the moving 5 day average temperature sensors
|
||||
# created above to generate a variation.
|
||||
# Adjust rain_total_threshold, rain_rate_threshold and temperature_threshold variables to suit you needs.
|
||||
automation:
|
||||
- id: 'IU1653340123453'
|
||||
alias: Irrigation Unlimited Adjustment
|
||||
trigger:
|
||||
# -------------------------------------------------------------------
|
||||
# Choose how you want to trigger this automation.
|
||||
# Comment out/delete/change as required.
|
||||
# -------------------------------------------------------------------
|
||||
# Run at a fixed time
|
||||
- platform: time
|
||||
at: "02:00"
|
||||
# Run when Home Assistant starts
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
# Run when the sensors update. Don't use this option if any of your
|
||||
# schedules use the 'anchor: finish'. It will most likely cause the
|
||||
# system to skip. Use a fixed time.
|
||||
- platform: 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 }}"
|
||||
action:
|
||||
service: irrigation_unlimited.adjust_time
|
||||
data:
|
||||
# -------------------------------------------------------------------
|
||||
# Please see documentation regarding the adjust_time service call.
|
||||
# Choose an option below. Comment out/delete/change as needed.
|
||||
# *** This will NOT work as is. ***
|
||||
# 1. Adjust a single zone. Change the zone as required
|
||||
# entity_id: binary_sensor.irrigation_unlimited_c1_z1
|
||||
# 2. Adjust a sequence. Change the sequence_id as required
|
||||
# entity_id: binary_sensor.irrigation_unlimited_c1_m
|
||||
# sequence_id: 1
|
||||
# -------------------------------------------------------------------
|
||||
percentage: >
|
||||
{# Threshold variables #}
|
||||
{% set rain_total_threshold = 3.5 %}
|
||||
{% set rain_rate_threshold = 1.0 %}
|
||||
{% set temperature_threshold = 20.0 %}
|
||||
|
||||
{# 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) %}
|
||||
|
||||
{# Threshold variables #}
|
||||
{% set rain_multiplier = (1 - (rain_total / rain_total_threshold)) %}
|
||||
{% set temperature_multiplier = temperature_average / temperature_threshold %}
|
||||
|
||||
{% set multiplier = 1.0 %}
|
||||
{% if rain_rate < rain_rate_threshold and rain_multiplier > 0 and rain_total < rain_total_threshold %}
|
||||
{% set multiplier = multiplier * temperature_multiplier %}
|
||||
{% set multiplier = multiplier * rain_multiplier %}
|
||||
{% else %}
|
||||
{% set multiplier = 0.0 %} {# It's raining or enough already #}
|
||||
{% endif %}
|
||||
|
||||
{# Return multiplier as a percentage #}
|
||||
{{ (multiplier * 100) | round(0) }}
|
||||
46
config/packages/irrigation_unlimited_controls.yaml
Normal file
46
config/packages/irrigation_unlimited_controls.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
# Irrigation Unlimited support file.
|
||||
#
|
||||
# Filename: irrigation_unlimited_controls.yaml
|
||||
#
|
||||
# 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
|
||||
#
|
||||
input_select:
|
||||
irrigation_unlimited_entities:
|
||||
name: Irrigation Unlimited Entities
|
||||
options:
|
||||
- <none>
|
||||
|
||||
irrigation_unlimited_sequences:
|
||||
name: Irrigation Unlimited Sequences
|
||||
options:
|
||||
- <none>
|
||||
|
||||
input_datetime:
|
||||
irrigation_unlimited_run_time:
|
||||
name: Run Time
|
||||
has_date: false
|
||||
has_time: true
|
||||
|
||||
automation:
|
||||
- alias: Irrigation Unlimited Load UI Controls
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: irrigation_unlimited.list_config
|
||||
data:
|
||||
entity_id: input_select.irrigation_unlimited_entities
|
||||
section: entities
|
||||
first: <none>
|
||||
- service: irrigation_unlimited.list_config
|
||||
data:
|
||||
entity_id: input_select.irrigation_unlimited_sequences
|
||||
section: sequences
|
||||
first: <none>
|
||||
8
config/packages/irrigation_unlimited_lts.yaml
Normal file
8
config/packages/irrigation_unlimited_lts.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
template:
|
||||
- sensor:
|
||||
- name: Today Total C1 Z1
|
||||
state_class: total_increasing
|
||||
icon: mdi:sprinkler
|
||||
unit_of_measurement: m
|
||||
state: >
|
||||
{{ state_attr('binary_sensor.irrigation_unlimited_c1_z1', 'today_total') | float(0) }}
|
||||
42
config/packages/irrigation_unlimited_overnight
Normal file
42
config/packages/irrigation_unlimited_overnight
Normal file
@@ -0,0 +1,42 @@
|
||||
# Filename: irrigation_unlimited_overnight.yaml
|
||||
#
|
||||
# Verion: 1.0.0
|
||||
#
|
||||
# Description: Example automation for running from sunset to sunrise
|
||||
#
|
||||
# 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:
|
||||
- id: 'IU1655789912900'
|
||||
alias: IU Overnight
|
||||
description: Run irrigation from sunset to sunrise
|
||||
trigger:
|
||||
- platform: sun
|
||||
event: sunset
|
||||
offset: -00:60:00
|
||||
condition: []
|
||||
action:
|
||||
service: irrigation_unlimited.adjust_time
|
||||
data:
|
||||
# -------------------------------------------------------------------
|
||||
# Please see documentation regarding the adjust_time service call.
|
||||
# Choose an option below. Comment out/delete/change as needed.
|
||||
# *** This will NOT work as is. ***
|
||||
# 1. Adjust a single zone. Change the zone as required
|
||||
# entity_id: binary_sensor.irrigation_unlimited_c1_z1
|
||||
# 2. Adjust a sequence. Change the sequence_id as required
|
||||
# entity_id: binary_sensor.irrigation_unlimited_c1_m
|
||||
# sequence_id: 1
|
||||
# -------------------------------------------------------------------
|
||||
actual: >
|
||||
{% set t1 = as_datetime(state_attr("sun.sun", "next_setting")).replace(microsecond=0) %}
|
||||
{% set t2 = as_datetime(state_attr("sun.sun", "next_rising")).replace(microsecond=0) %}
|
||||
{{ t2 - t1 }}
|
||||
mode: single
|
||||
62
config/packages/irrigation_unlimited_smart_irrigation.yaml
Normal file
62
config/packages/irrigation_unlimited_smart_irrigation.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
# Filename: irrigation_unlimited_smart_irrigation.yaml
|
||||
#
|
||||
# Verion: 1.0.3
|
||||
#
|
||||
# Description: Example automation for HAsmartirrigation integration
|
||||
# (smart_irrigation)[https://github.com/jeroenterheerdt/HAsmartirrigation]
|
||||
#
|
||||
# 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:
|
||||
# - id: "IU1653097957047"
|
||||
# alias: Smart Irrigation adjustment
|
||||
# description: Adjust watering times based on smart irrigation calculations
|
||||
# trigger:
|
||||
# - platform: time
|
||||
# at: "23:30"
|
||||
# condition:
|
||||
# condition: and
|
||||
# conditions:
|
||||
# - "{{ states('sensor.smart_irrigation_daily_adjusted_run_time') | float(-1) >= 0 }}"
|
||||
# action:
|
||||
# - service: irrigation_unlimited.adjust_time
|
||||
# data:
|
||||
# actual: "{{ timedelta(seconds=states('sensor.smart_irrigation_daily_adjusted_run_time') | int(0)) }}"
|
||||
# # -------------------------------------------------------------------
|
||||
# # Please see documentation regarding the adjust_time service call.
|
||||
# # Choose an option below. Comment out/delete as needed. This will NOT work as is.
|
||||
# # 1. Adjust a single zone. Change the zone as required
|
||||
# # entity_id: binary_sensor.irrigation_unlimited_c1_z1
|
||||
# # 2. Adjust a sequence. Change the sequence_id as required
|
||||
# # entity_id: binary_sensor.irrigation_unlimited_c1_m
|
||||
# # sequence_id: 1
|
||||
# # -------------------------------------------------------------------
|
||||
# mode: single
|
||||
|
||||
# - id: "IU1653098247170"
|
||||
# alias: Smart Irrigation reset bucket
|
||||
# description: Resets the Smart Irrigation bucket after watering
|
||||
# trigger:
|
||||
# - platform: state
|
||||
# entity_id:
|
||||
# # Add Irrigation Unlimited sensors here
|
||||
# - binary_sensor.irrigation_unlimited_c1_m
|
||||
# from: "on"
|
||||
# to: "off"
|
||||
# condition:
|
||||
# - condition: numeric_state
|
||||
# above: "0"
|
||||
# entity_id: sensor.smart_irrigation_daily_adjusted_run_time
|
||||
# action:
|
||||
# - delay:
|
||||
# hours: 0
|
||||
# minutes: 0
|
||||
|
||||
# #- service: smart_irrigation.smart_irrigation_reset_bucket
|
||||
66
config/packages/irrigation_unlimited_soil_moisture.yaml
Normal file
66
config/packages/irrigation_unlimited_soil_moisture.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
# Filename: irrigation_unlimited_soil_moisture.yaml
|
||||
#
|
||||
# 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 to adjust the run times for Irrigation Unlimited based on a soil moisture reading. This
|
||||
# is based on the Spruce Moisture Sensor from Plaid Systems.
|
||||
# Adjust the 'threshold' variable to suit you needs.
|
||||
# automation:
|
||||
# - id: "IU1653340127290"
|
||||
# alias: Irrigation Unlimited Soil Moisture Adjustment
|
||||
# trigger:
|
||||
# # -------------------------------------------------------------------
|
||||
# # Choose how you want to trigger this automation.
|
||||
# # Comment out/delete/change as required.
|
||||
# # -------------------------------------------------------------------
|
||||
# # Run at a fixed time
|
||||
# - platform: time
|
||||
# at: "02:00"
|
||||
# # Run when Home Assistant starts
|
||||
# - platform: homeassistant
|
||||
# event: start
|
||||
# # Run when the sensors update. Don't use this option if your schedules
|
||||
# # use the 'anchor: finish'. It will most likely cause your system to
|
||||
# # skip. Use a fixed time.
|
||||
# # - platform: state
|
||||
# # entity_id:
|
||||
# # - sensor.plaid_systems_ps_sprzms_slp3_humidity
|
||||
# condition:
|
||||
# condition: and
|
||||
# conditions:
|
||||
# - "{{ states('sensor.plaid_systems_ps_sprzms_slp3_humidity') | float(-1) != -1 }}"
|
||||
# action:
|
||||
# service: irrigation_unlimited.adjust_time
|
||||
# data:
|
||||
# # -------------------------------------------------------------------
|
||||
# # Please see documentation regarding the adjust_time service call.
|
||||
# # Choose an option below. Comment out/delete/change as needed.
|
||||
# # *** This will NOT work as is. ***
|
||||
# # 1. Adjust a single zone. Change the zone as required
|
||||
# # entity_id: binary_sensor.irrigation_unlimited_c1_z1
|
||||
# # 2. Adjust a sequence. Change the sequence_id as required
|
||||
# entity_id: binary_sensor.irrigation_unlimited_c1_m
|
||||
# sequence_id: 0
|
||||
# # -------------------------------------------------------------------
|
||||
# percentage: >
|
||||
# {# Threshold variable 0-100 percent #}
|
||||
# {% set threshold = 80 %}
|
||||
|
||||
# {# Sensor data #}
|
||||
# {% set humidity = states('sensor.plaid_systems_ps_sprzms_slp3_humidity') | float %}
|
||||
|
||||
# {% if humidity < threshold %}
|
||||
# {% set multiplier = 1 - (humidity / threshold) %}
|
||||
# {% else %}
|
||||
# {% set multiplier = 0.0 %} {# It's too wet, turn off #}
|
||||
# {% endif %}
|
||||
|
||||
# {# Return multiplier as a percentage #}
|
||||
# {{ (multiplier * 100) | round(0) }}
|
||||
@@ -0,0 +1,76 @@
|
||||
# Filename: irrigation_unlimited_soil_temperature.yaml
|
||||
#
|
||||
# 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
|
||||
|
||||
# Create a sensor for the temperature average of the last day.
|
||||
sensor:
|
||||
- platform: average
|
||||
name: "Irrigation Unlimited Average Soil Temperature"
|
||||
unique_id: "irrigation_unlimited_average_soil_temperature"
|
||||
end: "{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}"
|
||||
duration:
|
||||
hours: 24
|
||||
entities:
|
||||
- sensor.plaid_systems_ps_sprzms_slp3_temperature
|
||||
precision: 1
|
||||
scan_interval: 600
|
||||
|
||||
# Automation to adjust the run times for Irrigation Unlimited based on a soil temperature readings. This
|
||||
# is based on the Spruce Moisture Sensor from Plaid Systems.
|
||||
# Adjust the 'threshold' variable to suit you needs.
|
||||
automation:
|
||||
- id: "IU1653849227290"
|
||||
alias: Irrigation Unlimited Soil Temperature Adjustment
|
||||
trigger:
|
||||
# -------------------------------------------------------------------
|
||||
# Choose how you want to trigger this automation.
|
||||
# Comment out/delete/change as required.
|
||||
# -------------------------------------------------------------------
|
||||
# Run at a fixed time
|
||||
- platform: time
|
||||
at: "02:00"
|
||||
# Run when Home Assistant starts
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
# Run when the sensors update. Don't use this option if your schedules
|
||||
# use the 'anchor: finish'. It will most likely cause your system to
|
||||
# skip. Use a fixed time.
|
||||
# - platform: state
|
||||
# entity_id:
|
||||
# - sensor.plaid_systems_ps_sprzms_slp3_humidity
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- "{{ states('sensor.irrigation_unlimited_average_soil_temperature') | float(-273) != -273 }}"
|
||||
action:
|
||||
service: irrigation_unlimited.adjust_time
|
||||
data:
|
||||
# -------------------------------------------------------------------
|
||||
# Please see documentation regarding the adjust_time service call.
|
||||
# Choose an option below. Comment out/delete/change as needed.
|
||||
# *** This will NOT work as is. ***
|
||||
# 1. Adjust a single zone. Change the zone as required
|
||||
# entity_id: binary_sensor.irrigation_unlimited_c1_z1
|
||||
# 2. Adjust a sequence. Change the sequence_id as required
|
||||
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) }}
|
||||
Reference in New Issue
Block a user