I’m not on v111 yet. Maybe there is something in there. I read all the changes and didn’t notice anything that would affect this. I’ll see when I upgrade (I usually wait for at least version X.1
For anyone who cares…
I just spent today installing my new hardware and have swapped completely over to Version 2 now.
I did my first successful manual run and all went well.
So I’m happy
Except that we are having a fair bit of rain here this week!
I agree… i usually wait my self but this time hearing the good things about this new 0.111.0 version, and thinking if it went wrong i could roll back to my working version, but there is no way to roll back the operating system ? not sure why and it must be a bug or thats the direction HA is going, who knows and i hope not.
Plus glad your all set up yourself…
When I install lovelace_gen on hassio it starts in safe mode. What is the problem ?
@andie_will5
I just read something about pop-ups not working in 111.
Have you upgraded your browser_mod
?
Apparently that was the problem.
Ahhh that make’s sense, that and lovelace gen i forgot to update but it was getting late last night, i will try in a bit and see how i get on and report back.
Update:
Thats what it was, i went into Hacs and it was waiting there for me to update Phew, all back to normal now, but i will also keep the layout-card for now as it works.
Hi @klogg, I’ve only set 7 zones instead 8 and in the console log registry I see this error:
Unable to find referenced entities switch.zone8
Also I upload your new files and I get:
Forced update failed. Entity sensor.irrigation_external_sensor_controller_wifi not found
I lost some pre requisites maybe?
Can you confirm that despite theses errors/warnings everything works ok?
I had never seen the Forced update
warning before but I checked and I also have it. I think it is a timing issue when HA restarts which I will try to track down.
I can’t reproduce the console log error but that might be because I have eight switches defined and possibly somewhere in the Lovelace I haven’t checked if eight exist before referencing it.
I might need some help tracking that one down… I’ll PM you if I come up with anything.
Ok, so the startup warning is caused by me having left some code in that should have been removed. It is just a warning so can be ignored but to remove it permanently the file garden_controller.yaml
should have the ‘Sensors’ section removed (there is only one sensor)
and also remove the automation ‘Irrigation Initialise Controller WiFi Signal Sensors’ from the same file.
I will update GitHub shortly.
EDIT:
For the other error, I misunderstood, I thought you meant the error was in the browser console but I think now you meant the normal HA Log?
If so, then this might fix it:
Also in the file garden_controller.yaml
The automation Irrigation Synchronise Sensor Zone Switches needs to have the action
changed like this:
action:
- service: homeassistant.update_entity
data_template:
entity_id: >
{% if 'zone1' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone1_switch
{% elif 'zone2' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone2_switch
{% elif 'zone3' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone3_switch
{% elif 'zone4' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone4_switch
{% elif 'zone5' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone5_switch
{% elif 'zone6' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone6_switch
{% elif 'zone7' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone7_switch
{% elif 'zone8' in trigger.event.data.entity_id %}
sensor.irrigation_sensor_zone8_switch
{% else %}
none
{% endif %}
Let me know if that fixes it and I will update GitHub.
(It is impossible for me to test this easily as I have 8 switches)
@klogg ut I still have this error
i’ve already cleared cache and tried another browser:
ButtonCardJSTemplateError: TypeError: Cannot read property 'state' of undefined in 'return entity.state == 'unavailable' ? 'unavailable' : entity.state;'
tap_action:
action: call-service
service: browser_mod.popup
service_data:
title: Irrigation Controller
card:
type: vertical-stack
cards:
- type: markdown
content: >-
Enter the name of the sensor for your irrigation controller WiFi
signal strength.
Leave blank to reset to default.
style: |
ha-card {
box-shadow: none;
padding: 0em 0em 0em 1em;
background: var(--paper-dialog-background-color);
margin: 0em;
} p {
font-size: 18px;
}
- type: entities
entities:
- entity: input_text.irrigation_external_sensor_controller_wifi
name: Sensor Name
- type: section
style: |
ha-card {
box-shadow: none;
border-radius: 0em 0em 1em 1em;
background: var(--paper-dialog-background-color);
}
- type: markdown
content: You can disable the switches to prevent irrigation while testing.
style: |
ha-card {
box-shadow: none;
padding: 0em 0em 0em 1em;
background: var(--paper-dialog-background-color);
margin: 0em;
} p {
font-size: 18px;
}
- type: entities
entities:
- entity: input_boolean.irrigation_disable_switches
style: |
ha-card {
box-shadow: none;
border-radius: 0em 0em 1em 1em;
background: var(--paper-dialog-background-color);
}
deviceID:
- this
style:
font-family: |
[[[
return states['input_text.irrigation_ui_font_family'].state
]]]
box-shadow: 0em 0em 0.5em
border-radius: 1em
opacity: 0.9
hold_action:
action: none
double_tap_action:
action: none
layout: vertical
size: 30%
color_type: icon
show_name: true
show_state: true
show_icon: true
show_units: true
show_label: false
show_entity_picture: false
show_live_stream: false
type: 'custom:button-card'
entity: sensor.esphome_irrigation_controller_wifi_signal
name: Irrigation Controller WiFi Signal Strength
icon: '[[[ return entity.state == ''unavailable'' ? ''mdi:wifi-off'' : ''mdi:wifi''; ]]]'
state_display: '[[[ return entity.state == ''unavailable'' ? ''unavailable'' : entity.state; ]]]'
styles:
grid:
- grid-template-areas: '"i n s"'
- grid-template-columns: 15% auto 20%
- grid-template-rows: min-content
card:
- font-family: '[[[ return states[''input_text.irrigation_ui_font_family''].state ]]]'
- font-size: 15px
- padding: 0em 0em 0.5em 0em
- background: none
- box-shadow: none
name:
- justify-self: start
state:
- value: unavailable
styles:
icon:
- color: var(--accent-color)
- animation: blink 2s ease infinite
state:
- color: var(--accent-color)
- animation: blink 2s ease infinite
lock:
enabled: false
duration: 5
unlock: tap
default_color: var(--primary-text-color)
color_off: var(--paper-item-icon-color)
color_on: var(--paper-item-icon-active-color)
Oh, ok, so it was a Lovelace error?
Leave it with me, I’ll look at it later…
In item_settings_controller_wifi_signal.yaml
change:
state_display: "[[[ return entity.state == 'unavailable' ? 'unavailable' : entity.state; ]]]"
to this:
state_display: >
[[[
var statestr = (entity === undefined || entity.state === undefined) ? 'undefined' : entity.state;
var unit_om = entity.attributes.unit_of_measurement ? entity.attributes.unit_of_measurement : '';
return statestr + ' ' + unit_om;
]]]
Hi Klogg,
i realized in my system at “the changing zones” only the interlock turns off the zone when new zone starts. Its very annoying, because i’m using a relay board which communicates over serial, so the interlock is slower. So for half second two relays are open at same time when changing zones.
If i change the code in garden_irrigation_start.yaml to this, the problem disappears, but i’m not sure, if it causes any problem or not.
#=== Stop Watering after delay
- service: switch.turn_off
data_template:
entity_id: >
{{ states('input_text.irrigation_' ~ zone ~ '_switch_entity_id') }}
# {% if is_state('switch.garden_irrigation_relay_' ~ zone, 'unavailable') %}
# none
# {% else %}
# switch.garden_irrigation_relay_{{ zone }}
# {% endif %}
Hi, I don’t think that will cause any problems…
You could also try looking here and simply changing the pause
to (say) 5
#==============================================
#=== LOOP OR DO THE END PROCESSING IF ALL DONE
#==============================================
#=== When the loop counter reaches the number of zones
#=== then go to Cycle End Processing
#=== If less than the number of zones
#=== then increment the loop counter and start again
- service_template: >
{% if zone[-1] | int == states('input_number.irrigation_number_of_zones') | int %}
script.irrigation_cycle_end
{% else %}
script.irrigation_irrigate_a_zone
{% endif %}
data_template:
cycle: >
{{ cycle }}
zone: >
{% set next_zone = (zone[-1] | int) + 1 %}
zone{{ next_zone | string }}
pause: >
3
I wonder if this is going to be a problem for others? It would be easy to make the length of pause user configurable.
One question regarding rainfall and temperature multipliers.
If I choose both, how will be calculated the real irrigation time ?
For example if rainfall is 0.7 and temperature is 0.86 and the irrigation time is 10mins what will be the real one?
Thanks
It multiplies by both so for 10 mins it would be
10 * 0.7 * 0.86 = 6.02
Remember, there is no real science in this, it is just something that I came up with that seemed to give sensible figures for me.
I’m open to suggestions. Or you can easily amend the calculations.
I’ve made that change.
User can now choose how long to pause between zones (minimum is 3 seconds)
No need for anyone to update unless you feel the need.
EDIT: But if you do you will also need the two new files:
item_settings_ui_font.yaml and
item_settings_weather_sensors.yaml
because I have slightly restructured the Lovelace files for simplicity.
(No other changes)
Hi @klogg
I’m still having issue with History Totals, I don’t see any value.
Where and what should I check ?
I will try today your new version for the pause between zones that is a new nice feature.