Well, no idea how to do this.
;-(
Anyway, I just added some comments to my yaml,
Maybe you want to integrate this somehow to the documentation.
input_datetime: #each program needs a starttime, the relevant input fields are defined here
irrigation_vormittags_start_time:
name: Vormittags Startzeit
has_date: false
has_time: true
irrigation_nachmittags_start_time:
name: Nachmittags Startzeit
has_date: false
has_time: true
irrigation_vorgarten_start_time:
name: Vorgarten Startzeit
has_date: false
has_time: true
sensor:
- platform: time_date
display_options:
- 'time'
- 'date'
# - platform: openweathermaphistory
# name: 'rainfactor'
##api_key: !secret openweatherapi
#api_key:
switch:
- platform: irrigationprogram
switches:
#switches represent the different irrigation schedules/programs
vormittags:
#name of my first schedule, the custom-card irrigation will refer to this name (program:switch.vormittags)
start_time: input_datetime.irrigation_vormittags_start_time
#each schedelue needs a start-time, input_datetime is defined further below,
#at this time the schedule starts to activate the zones, one after the other
irrigation_on: input_boolean.irrigation_vormittags_on
#shows a switch on the card to turn this schedule on/off
run_freq: input_select.irrigation_vormittags_frequency
#will run only on selected run days you can/should have different input_select with different names,
#the lists are defined below in a separate section of the yaml
icon: mdi:fountain
zones: #zones represent the different irrigation areas with separate valves/pumps
#this zone requires to switch on a valve(zone) and a pump
- zone: switch.schaltung_garten_rasensprenger_state
pump: switch.schaltung_garten_pumpe_state
name: Rasensprenger
rain_sensor: binary_sensor.raining
# rain sensor with ignore option when the rain sensor shows rain, this zone will not be activated,
ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor_rasen
# however, there is a switch to ignore the sensor and activate the zone nevertheless
run_freq: input_select.irrigation_frequency
#a select field for the activation days will be shown in the card
# zone will run only on selected run days, ATTENTION: only when the program itself is running,
# means the run_freq of a zone depends on the reun_freq of the program if implemented
water: input_number.irrigation_rasen_vormittags_run
#input for minutes of irrigation
#next two lines (#wait and #repeat) if activated (remove #) will show two additional lines in the card,
#one for how often irrigation repeats and one for waiting time in between
#wait: input_number.irrigation_rasen_vormittags_wait
#repeat: input_number.irrigation_rasen_vormittags_repeat
icon: mdi:flower
disable_zone: input_boolean.rasen_vormittags_disabled
#switch to deactivate this zone temporarily
- zone: switch.schaltung_garten_beetsprenger_state
pump: switch.schaltung_garten_pumpe_state
name: Beete am Rasen
rain_sensor: binary_sensor.raining
ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor_beete
#run_freq: input_select.irrigation_frequency
water: input_number.irrigation_beete_vormittags_run
#wait: input_number.irrigation_beete_vormittags_wait
#repeat: input_number.irrigation_beete_vormittags_repeat
icon: mdi:grass
disable_zone: input_boolean.beete_vormittags_disabled
- zone: switch.schaltung_garten_terrassensprenger_state
pump: switch.schaltung_garten_pumpe_state
name: Terrasse
# rain sensor with ignore option
rain_sensor: binary_sensor.raining
ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor_terrasse
#run_freq: input_select.irrigation_frequency
water: input_number.irrigation_terrasse_vormittags_run
wait: input_number.irrigation_terrasse_vormittags_wait
repeat: input_number.irrigation_terrasse_vormittags_repeat
icon: mdi:carrot
disable_zone: input_boolean.terrasse_vormittags_disabled
nachmittags:
start_time: input_datetime.irrigation_nachmittags_start_time
irrigation_on: input_boolean.irrigation_nachmittags_on
#run_freq: input_select.irrigation_nachmittags_frequency
#as run_freg is disabled from script (#) this program will run every day, as long as the program is not disabled
icon: mdi:fountain
zones:
- zone: switch.schaltung_garten_rasensprenger_state
pump: switch.schaltung_garten_pumpe_state
name: Rasensprenger
# rain sensor with ignore option
rain_sensor: binary_sensor.raining
ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor_rasen
#will run only on selected run days
run_freq: input_select.irrigation_rasen_nachmittags_frequency
water: input_number.irrigation_rasen_nachmittags_run
#wait: input_number.irrigation_rasen_nachmittags_wait
#repeat: input_number.irrigation_rasen_nachmittags_repeat
icon: mdi:flower
disable_zone: input_boolean.rasen_nachmittags_disabled
- zone: switch.schaltung_garten_beetsprenger_state
pump: switch.schaltung_garten_pumpe_state
name: Beete am Rasen
# rain sensor with ignore option
rain_sensor: binary_sensor.raining
ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor_beete
run_freq: input_select.irrigation_frequency
water: input_number.irrigation_beete_nachmittags_run
#wait: input_number.irrigation_beete_nachmittags_wait
#repeat: input_number.irrigation_beete_nachmittags_repeat
icon: mdi:grass
disable_zone: input_boolean.beete_nachmittags_disabled
- zone: switch.schaltung_garten_terrassensprenger_state
pump: switch.schaltung_garten_pumpe_state
name: Terrasse
# rain sensor with ignore option
rain_sensor: binary_sensor.raining
ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor_terrasse
#run_freq: input_select.irrigation_frequency
water: input_number.irrigation_terrasse_nachmittags_run
wait: input_number.irrigation_terrasse_nachmittags_wait
repeat: input_number.irrigation_terrasse_nachmittags_repeat
icon: mdi:carrot
disable_zone: input_boolean.terrasse_nachmittags_disabled
vorgarten:
start_time: input_datetime.irrigation_vorgarten_start_time
irrigation_on: input_boolean.irrigation_vorgarten_on
run_freq: input_select.irrigation_vorgarten_frequency
icon: mdi:fountain
zones:
- zone: switch.keller_pumpe_2
#this zone requires only one switch to turn on
name: Vorgarten
rain_sensor: binary_sensor.raining
ignore_rain_sensor: input_boolean.irrigation_ignore_rain_sensor_vorgarten
#run_freq: input_select.irrigation_frequency
water: input_number.irrigation_vorgarten_run
#wait: input_number.irrigation_vorgarten_wait
#repeat: input_number.irrigation_vorgarten_repeat
icon: mdi:carrot
disable_zone: input_boolean.vorgarten_disabled
#below several input_number fields are defined, which are used in the above schedule/zone definitions.
input_number:
irrigation_adjust_run:
name: water adjustment
min: 0
max: 1
step: 0.2
icon: mdi:water-pump-off
irrigation_rasen_vormittags_run:
name: Bewässerungsdauer in Min.
min: 1
max: 30
step: 1
icon: mdi:water
irrigation_rasen_vormittags_wait:
name: Wartezeit in Min.zwischen Intervallen
min: 0
max: 10
step: 1
icon: mdi:timer-sand
irrigation_rasen_vormittags_repeat:
name: Anzahl Intervalle
min: 1
max: 10
step: 1
icon: mdi:repeat
irrigation_rasen_nachmittags_run:
name: Bewässerungsdauer in Min.
min: 1
max: 30
step: 1
icon: mdi:water
irrigation_rasen_nachmittags_wait:
name: Wartezeit in Min.zwischen Intervallen
min: 0
max: 10
step: 1
icon: mdi:timer-sand
irrigation_rasen_nachmittags_repeat:
name: Anzahl Intervalle
min: 1
max: 10
step: 1
icon: mdi:repeat
irrigation_beete_vormittags_run:
name: Bewässerungsdauer in Min.
min: 1
max: 30
step: 1
icon: mdi:water
irrigation_beete_vormittags_wait:
name: Wartezeit in Min.zwischen Intervallen
min: 0
max: 10
step: 1
icon: mdi:timer-sand
irrigation_beete_vormittags_repeat:
name: Anzahl Intervalle
min: 1
max: 10
step: 1
icon: mdi:repeat
irrigation_beete_nachmittags_run:
name: Bewässerungsdauer in Min.
min: 1
max: 30
step: 1
icon: mdi:water
irrigation_beete_nachmittags_wait:
name: Wartezeit in Min.zwischen Intervallen
min: 0
max: 10
step: 1
icon: mdi:timer-sand
irrigation_beete_nachmittags_repeat:
name: Anzahl Intervalle
min: 1
max: 10
step: 1
icon: mdi:repeat
irrigation_terrasse_vormittags_run:
name: Bewässerungsdauer in Min.
min: 1
max: 30
step: 1
icon: mdi:water
irrigation_terrasse_vormittags_wait:
name: Wartezeit in Min.zwischen Intervallen
min: 0
max: 10
step: 1
icon: mdi:timer-sand
irrigation_terrasse_vormittags_repeat:
name: Anzahl Intervalle
min: 1
max: 10
step: 1
icon: mdi:repeat
irrigation_terrasse_nachmittags_run:
name: Bewässerungsdauer in Min.
min: 1
max: 30
step: 1
icon: mdi:water
irrigation_terrasse_nachmittags_wait:
name: Wartezeit in Min.zwischen Intervallen
min: 0
max: 10
step: 1
icon: mdi:timer-sand
irrigation_terrasse_nachmittags_repeat:
name: Anzahl Intervalle
min: 1
max: 10
step: 1
icon: mdi:repeat
irrigation_vorgarten_run:
name: Bewässerungsdauer in Min.
min: 1
max: 30
step: 1
icon: mdi:water
irrigation_vorgarten_wait:
name: Wartezeit in Min.zwischen Intervallen
min: 0
max: 10
step: 1
icon: mdi:timer-sand
irrigation_vorgarten_repeat:
name: Anzahl Intervalle
min: 1
max: 10
step: 1
icon: mdi:repeat
input_select:
# Use either run days or Frequency they are mutually exclusive
# for each zone/program where different activation days are wanted a separate input_select list with different name is needed
irrigation_run_days:
name: An welchen Tagen
options:
- "['Mon']"
- "['Tue']"
- "['Wed']"
- "['Thu']"
- "['Fri']"
- "['Sat']"
- "['Sun']"
- "['Mon','Tue']"
- "['Mon','Wed']"
- "['Mon','Thu']"
- "['Mon','Fri']"
- "['Tue','Sat']"
- "['Tue','Thu']"
- "['Tue','Thu','Sun']"
- "['Sun','Wed']"
- "['Mon','Thu']"
- "['Tue','Fri']"
- "['Wed','Sat']"
- "['Mon','Wed','Fri']"
- "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"
irrigation_frequency:
name: Alle wieviel Tage
options:
- "1"
- "2"
- "3"
- "4"
- "5"
- "6"
- "7"
irrigation_vormittags_frequency:
name: Alle wieviel Tage oder An welchen Tagen
options:
- "1"
- "2"
- "3"
- "4"
- "5"
- "6"
- "7"
- "['Wed','Sat']"
- "['Sun','Thu']"
- "['Mon','Fri']"
- "['Tue','Sat']"
- "['Sun','Wed']"
- "['Mon','Thu']"
- "['Tue','Fri']"
- "['Mon','Wed','Fri']"
- "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"
irrigation_nachmittags_frequency:
name: Alle wieviel Tage oder An welchen Tagen
options:
- "1"
- "2"
- "3"
- "4"
- "5"
- "6"
- "7"
- "['Wed','Sat']"
- "['Sun','Thu']"
- "['Mon','Fri']"
- "['Tue','Sat']"
- "['Sun','Wed']"
- "['Mon','Thu']"
- "['Tue','Fri']"
- "['Mon','Wed','Fri']"
- "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"
irrigation_vorgarten_frequency:
name: Alle wieviel Tage oder An welchen Tagen
options:
- "1"
- "2"
- "3"
- "4"
- "5"
- "6"
- "7"
- "['Wed','Sat']"
- "['Sun','Thu']"
- "['Mon','Fri']"
- "['Tue','Sat']"
- "['Sun','Wed']"
- "['Mon','Thu']"
- "['Tue','Fri']"
- "['Mon','Wed','Fri']"
- "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"
irrigation_rasen_nachmittags_frequency:
name: Alle wieviel Tage oder An welchen Tagen
options:
- "1"
- "2"
- "3"
- "4"
- "5"
- "6"
- "7"
- "['Wed','Sat']"
- "['Sun','Thu']"
- "['Mon','Fri']"
- "['Tue','Sat']"
- "['Sun','Wed']"
- "['Mon','Thu']"
- "['Tue','Fri']"
- "['Mon','Wed','Fri']"
- "['Mon','Tue','Wed','Thu','Fri','Sat','Sun']"
# definition of input_booleans used in schedule/zone definition
input_boolean:
irrigation_vormittags_on:
name: Bewässerung Vormittags aktiv
irrigation_nachmittags_on:
name: Bewässerung Nachmittags aktiv
irrigation_vorgarten_on:
name: Bewässerung Vorgarten aktiv
vorgarten_disabled:
name: vorrübergehend ausschalten
rasen_vormittags_disabled:
name: Bewässerung Rasen vormittags ausschalten
rasen_nachmittags_disabled:
name: Bewässerung Rasen nachmittags ausschalten
beete_vormittags_disabled:
name: Bewässerung Bette vormittags ausschalten
beete_nachmittags_disabled:
name: Bewässerung Beete nachmittags ausschalten
terrasse_vormittags_disabled:
name: Bewässerung Terrasse vormittags ausschalten
terrasse_nachmittags_disabled:
name: Bewässerung Terrasse nachmittags ausschalten
irrigation_config:
name: Show Configuration
irrigation_ignore_rain_sensor_rasen:
name: Auch bei Regen
irrigation_ignore_rain_sensor_beete:
name: Auch bei Regen
irrigation_ignore_rain_sensor_terrasse:
name: Auch bei Regen
irrigation_ignore_rain_sensor_vorgarten:
name: Auch bei Regen
binary_sensor:
- platform: template
sensors:
raining:
device_class: moisture
value_template: "{{ is_state('input_boolean.dummy_rain_sensor', 'on') }}"
icon_template: >-
{% if is_state("binary_sensor.raining", "on") %}
mdi:weather-pouring
{% else %}
mdi:weather-sunny
{% endif %}
In case you have any comments on my yaml (e.g. what can be done easier, better, more streamlined) those will be more than welcomed by me.
Once more thanks for all your effort, it’s a really great tool.
I believe that should be part of core HA!