Hello,
please help once again. Home assistant show no errors, automation starting at given time, but ātime remainingā always become āunavailableā then spinkler is ON and it cause that sprinkler wonāt stop
Configuration.yaml
sensor:
- platform: template
sensors:
zone_1_time_remaining:
friendly_name: 'Time remaining'
#Check if the zone switch is on or off before providing the number
value_template: >
{% if is_state("switch.laistymo_sistema", "off") %} 0
{% else %}
{% set countdown_timer = [ (states('input_number.zone_1_run_time') | int - (as_timestamp(now()) - as_timestamp(states.switch.laistymo_sistema_zone_1.last_changed)) / 60) | round(0) ,0 ] | max %} {{ countdown_timer }}
{% endif %}
unit_of_measurement: "sec"
binary_sensor:
- platform: template
sensors:
zone_1_day_active:
friendly_name: Irrigation Day Active
unique_id: IDA1
value_template: >-
{{ (is_state('automation.irrigation_zone_1_am_2', 'on')
or is_state('automation.irrigation_zone_1_pm_2', 'on'))
and (( is_state('input_boolean.zone_1_mon', 'on') and now().weekday() == 0 )
or ( is_state('input_boolean.zone_1_tue', 'on') and now().weekday() == 1 )
or ( is_state('input_boolean.zone_1_wed', 'on') and now().weekday() == 2 )
or ( is_state('input_boolean.zone_1_thu', 'on') and now().weekday() == 3 )
or ( is_state('input_boolean.zone_1_fri', 'on') and now().weekday() == 4 )
or ( is_state('input_boolean.zone_1_sat', 'on') and now().weekday() == 5 )
or ( is_state('input_boolean.zone_1_sun', 'on') and now().weekday() == 6 )) }}
Thanks. Yes, it mean runtime. I removed the / 60 from the time remaining template sensors. But I do not understand how to increase the size of the input booleans? My need is that the pump works for less than 60s. Can you guide me in more detail?
ESPHome now has a specific sprinkler controller component that makes most of the programming very simple (after i spent a week writing esphome code to do the same). I just converted over to that integration and it is working great. Hereās a shot of what iāve come up with for my dashboard:
Hi @tom_l , your config and lovelace ui is perfect. Im banging my head for one week now until i stumble upon this thread, i was trying to do all the automations from espHome directly to work without homeassitant (in case the server is down) but i gave up.
Can you please share all the files for your irrigation system, i see on page 8 separate sections for automations binary sensors etcā¦ are they all in homeassistant as separate .yaml files or are they programed in espHome device?
I want to be able to add hours to wait, let say 48hours and run for x minutes.
Not using MQTT but esphome sprinkler controlerā¦
as itās garden bed Iām not using days settingsā¦ they need to water every day
Iāll add the moisture sensors later this week.