Good morning,
congratulations, it’s a nice project.
I would like to insert it into my HA, but I don’t know where to paste the various codes and if there is a need to create sensors or something else.
I start with 6 zigbee relays that activate my irrigation valves
Can someone tell me step by step where and how to insert them.
Thanks
Very nice, could you share the card code? I would love to use the one you created here!
tom_l
August 29, 2024, 8:56pm
88
That is a five year old post. I use the Weekly Schedule helper now.
In this case, have you created a new irrigation configuration?
If so, can you share it?
Thanks
tom_l
August 29, 2024, 9:40pm
90
It’s pretty simple. Automation checks to see if weekly schedule helper is on, if so turn on the sprinkler valve.
Can anyone figure out where I’m going wrong?
I’ve made some progress, but I need help
homeassistant:
customize:
binary_sensor:
- platform: template
sensors:
zona_1_giornaliera_attiva:
friendly_name: Irrigazione Giornaliera Attiva
entity_id:
- sensor.date
- input_boolean.zona_1_lun
- input_boolean.zona_1_mar
- input_boolean.zona_1_mer
- input_boolean.zona_1_gio
- input_boolean.zona_1_ven
- input_boolean.zona_1_sab
- input_boolean.zona_1_dom
value_template: >-
{{ ( is_state('input_boolean.zona_1_lun', 'on') and now().weekday() == 0 )
or ( is_state('input_boolean.zona_1_mar', 'on') and now().weekday() == 1 )
or ( is_state('input_boolean.zona_1_mer', 'on') and now().weekday() == 2 )
or ( is_state('input_boolean.zona_1_gio', 'on') and now().weekday() == 3 )
or ( is_state('input_boolean.zona_1_ven', 'on') and now().weekday() == 4 )
or ( is_state('input_boolean.zona_1_sab', 'on') and now().weekday() == 5 )
or ( is_state('input_boolean.zona_1_dom', 'on') and now().weekday() == 6 ) }}
automation:
- id: irrigazione_zona_1_am
alias: Irrigazione Zona 1 AM
trigger:
platform: template
value_template: "{{ states('sensor.time') == states('input_datetime.zona_1_am_orario_partenza').rsplit(':',1)[0] }}"
condition:
- condition: state
entity_id: binary_sensor.zona_1_giornaliera_attiva
state: 'on'
- condition: template
value_template: "{{ states('sensor.bom_hobart_rain_today')|float < states('input_number.rain_limit')|float }}"
- condition: template
value_template: "{{ states('sensor.predict_rain_today')|float < states('input_number.rain_limit')|float }}"
action:
- service: switch.turn_on
entity_id: switch.zona_1
- id: irrigazione_zona_1_pm
alias: Irrigazioneion Zona 1 PM
trigger:
platform: template
value_template: "{{ states('sensor.time') == states('input_datetime.zona_1_pm_orario_partenza').rsplit(':',1)[0] }}"
condition:
- condition: state
entity_id: binary_sensor.zona_1_giornaliera_attiva
state: 'on'
- condition: template
value_template: "{{ states('sensor.bom_hobart_rain_today')|float < states('input_number.rain_limit')|float }}"
- condition: template
value_template: "{{ states('sensor.predict_rain_today')|float < states('input_number.rain_limit')|float }}"
- condition: template
value_template: "{{ states('sensor.predict_rain_tomorrow')|float < states('input_number.rain_limit')|float }}"
action:
- service: switch.turn_on
entity_id: switch.zona_1
- id: irrigazione_zona_1_off
alias: Irrigazioneion Zona 1 Off
initial_state: true
trigger:
- platform: numeric_state
entity_id: sensor.zona_1_tempo_rimanente
below: 1
- platform: state
entity_id: switch.zona_1
to: 'on'
for:
minutes: 45
condition:
- condition: state
entity_id: switch.zona_1
state: 'on'
action:
- service: switch.turn_off
entity_id: switch.zona_1
- platform: template
sensors:
zona_1_tempo_rimanente:
friendly_name: 'Tempo Rimanente'
entity_id:
- input_number.zona_1_tempo_rimanente
- sensor.time
- switch.zona_1
value_template: >
{% if is_state('switch.zona_1', 'on') %}
{{ [ (states('input_number.zona_1_tempo_rimanente')|int - (as_timestamp(now()) - as_timestamp(states.switch.zona_1.last_changed))/60)|round(0) ,0 ] | max }}
{% else %}
0
{% endif %}
unit_of_measurement: "min"
input_datetime:
zona_1_am_orario_partenza:
name: AM Orario Partenza
has_date: false
has_time: true
zona_1_pm_orario_partenza:
name: PM Orario Partenza
has_date: false
has_time: true
input_boolean:
zona_1_lun:
name: Lunedì
icon: mdi:calendar
zona_1_mar:
name: Martedì
icon: mdi:calendar
zona_1_mer:
name: Mercoledì
icon: mdi:calendar
zona_1_gio:
name: Giovedì
icon: mdi:calendar
zona_1_ven:
name: Venerdì
icon: mdi:calendar
zona_1_sab:
name: Sabato
icon: mdi:calendar
zona_1_dom:
name: Domenica
icon: mdi:calendar
input_number:
rain_limit:
name: Rain Limit
min: 0
max: 2
step: 0.1
unit_of_measurement: mm
icon: mdi:weather-pouring
zona_1_tempo_irrigazione:
name: Tempo Irrigazione
min: 5
max: 60
step: 5
unit_of_measurement: min
icon: mdi:clock
Good morning,
with a lot of effort I managed to get everything working.
Now I would like to change the card with the one with the buttons.
I copied your card but it doesn’t work in my HA
Please guide me step by step.
Thanks