My Garden Irrigation

Ook! Thanks
Btw i’ve seen another “glitch”…if I try to enter inside the dashboard and I’m in morning or evening cycle at first startup…then if I try to switch to manual cycle i don’t see times:

then if I try to change slider for a zone, time appear for this zone…

Yeah, I get that too. It is something to do with Lovelace or one of the custom cards. There isn’t anything I can do about it I’m afraid. I was going to ask on the forum but the config uses so many components that I don’t think anyone will be able to say what is actually causing this to happen let alone fix it.

But it is on my list of things to investigate. Maybe I’ll be able to reproduce it with a simpler config…

Hi Klogg,
thank you for your great work!

I would ask you about binary_sensor.above_horizon finded in item_settings_temperature_graph.yaml, is it a your template binary_sensor ?

I have not founded the code in your package, can you share it ?

Thank you in advance!

Hi,

Good question.
It is created by the sun2 custom component which can be installed from HACS although you could easily create your own binary_sensor using the core Sun component. The state of sun.sun is either above_horizon or below_horizon.

I will update the docs.

Thanks!

Just to let you know, I have made some really tiny changes to a couple of the Lovelace files. They are purely cosmetic.

I have also made a slightly more significant change to the file garden_weather_rainfall.yaml because the rainfall history was not cycling correctly. it was only one line of code that changed and I don’t know how that error slipped through :wink: . It doesn’t affect the running in any way, only the rainfall weather adjustments, but you will get an annoying error in the log every night if you don’t make the update.


I will probably only report significant changes here in future but I think if you follow (or maybe star?) the repo then GitHub will notify you of changes?

Hi @klogg

I have one question regarding Next Cycle

I’ve set morning cycle at 10.10, but only on monday and what I see (before 10.10 today, sunday) is that Next cycle is set to 10.10 .
My afternoon cycle is set today at 22.45, so it should be correct to see next real cycle.
I’ve also set, in Node Red, a trigger that check when input_boolean.irrigation_cycleX_running state changes and I see that when it’s the correct time, but not the planned date, the boolean changes from off to on and immediately to off again.

Is there a way to avoid that in Next Run is showed a cycle that is not going to be run and that the boolean does not change its state if not scheduled that day?

Let me know if I can do some testing…

Thanks

I think you mean this when a cycle has it’s schedule on but no zone will run on certain days, yes?
image
That is a very good point…
Let me look into that.

As for stopping the cycle running boolean turning on then off again, that might be harder to change as I think it might impact some other things but I will take a look at that too.

Yes, right.

Probably, solving the Next Run stuff will solve also the off-on-off of the input_boolean.irrigation_cycleX_running state.

In which yaml file is managed the Next Run?

‘Next Run’ is purely a text field which is created using some Javascript in section_status_header.yaml.

Maybe, there should be a check with the field
input_boolean.irrigation_cycle{{ cycle }}_zone{{ zone }}_{{ dow }}
(I’ve added {{ dow }} standing for day of the week) and checking if for next {{ cycle }} for all the {{ zones }} and for the actual {{ dow }} all are set to off, do not consider next cycle.

Easy to write, probably more difficult to code

Yes, exactly.
But there will be 56 zones to check for each cycle (8 zones x 7 days) plus the ‘every day’ indicator.

Maybe I can set a boolean in the back-end…
I will look at it, maybe later today.

1 Like

That’s why I wrote it like this…
I also think that setting an input_boolean is the best thing.

1 Like

I’m still trying to install this irrigation version 2 but unknown error, home assistant api websocket error what i can get.

what i’ve done:
in configuration.yaml:

homeassistant: 
  packages: !include_dir_named HA-Irrigation-Version2/package

This config seems ok.

lovelace: 
  mode: yaml
  resources:
  - type: module
    url: /custom_components/browser_mod/browser_mod.js
  - type: module
    url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
  - type: module
    url: /hacsfiles/lovelace-card-mod/card-mod.js
  - type: module
    url: /hacsfiles/button-card/button-card.js
  - type: module
    url: /hacsfiles/lovelace-multiple-entity-row/multiple-entity-row.js
  - type: module
    url: /hacsfiles/config-template-card/config-template-card.js
  - type: module
    url: /hacsfiles/lovelace-layout-card/layout-card.js
  - type: module
    url: /hacsfiles/lovelace-state-switch/state-switch.js
  - type: module
    url: /hacsfiles/lovelace-hui-element/hui-element.js
  - type: module
    url: /hacsfiles/lovelace-time-picker-card/time-picker-card.js
  - type: css
    url: 'https://fonts.googleapis.com/css?family=Oswald'
    

i’ve already tried the /www/community path instead of /hacsfiles, because its the real path of these modules. If UI generates lovelace yaml it puts /www/community path, in UI in resources list /hacsfiles can be found.
To make sure, i created a symlink so both paths must be ok.

In ui-lovelace.yaml which was generated by HA, i removed the resources list (of course i have already tried with and without resources list in ui-lovelace.yaml, and put

- !include lovelace/view_garden_version2.yaml' 

at the end.

I cant imagine where went wrong…

It’s not necessary this

  - type: module
    url: /custom_components/browser_mod/browser_mod.js

Unless you want to use browser_mod with Home Assistant Cast (see here)

You need only

browser_mod:

in the configuration.yaml

Can you show the error and the ui-lovelace.yaml related to the irrigation system?

here is my whole ui-lovelace.yaml
its a chaos because started to use home assistant few days ago so i’m still learning it, so i just put a simple include at the end.
If i paste the code from view_garden_version2.yaml into this, the problem still the same.

title: Home
views:
  - badges:
      - entity: binary_sensor.updater
      - entity: person.ant
      - entity: sensor.growatt_total_total_money_today_2
      - entity: sensor.growatt_total_money_lifetime_2
      - entity: sensor.growatt_total_energy_today_2
      - entity: sensor.growatt_total_output_power_2
      - entity: sensor.growatt_total_lifetime_energy_output_2
      - entity: sensor.growatt_total_maximum_power_2
      - entity: sensor.bw25170033_energy_today
      - entity: sensor.bw25170033_lifetime_energy_output
      - entity: sensor.bw25170033_input_1_voltage
      - entity: sensor.bw25170033_input_1_amperage
      - entity: sensor.bw25170033_input_1_wattage
      - entity: sensor.bw25170033_internal_wattage
      - entity: sensor.bw25170033_reactive_voltage
      - entity: sensor.bw25170033_reactive_amperage
      - entity: sensor.bw25170033_ac_frequency
      - entity: sensor.bw25170033_output_power
      - entity: sensor.bw25170033_reactive_wattage
      - entity: sensor.pocophone_f1_battery_level
      - entity: sensor.pocophone_f1_battery_state
      - entity: sensor.pocophone_f1_geocoded_location
      - entity: sensor.pocophone_f1_wifi_connection

      - entity: sun.sun
    cards:
      - entities:
          - sensor.hewlett_packard_hp_laserjet_professional_m1212nf_mfp
        title: Anyu
        type: entities
      - entities:
          - entity: binary_sensor.front_door_ding
            name: Ding
          - entity: binary_sensor.front_door_motion
            name: Motion
          - entity: sensor.front_door_last_activity
            name: Last Activity
          - entity: sensor.front_door_last_ding
            name: Last Ding
          - entity: sensor.front_door_last_motion
            name: Last Motion
          - entity: sensor.front_door_volume
            name: Volume
        title: Front Door
        type: entities
      - entity: camera.front_door
        type: picture-entity
      - entity: media_player.plex_plex_web_firefox
        type: media-control
      - entities:
          - sensor.plex_plex
        title: Living Room
        type: entities
      - entities:
          - sensor.hacs
        title: NONE
        type: entities
      - entities:
          - switch.a1on
          - switch.a1off
          - switch.a2on
          - switch.a2off
          - switch.a3on
          - switch.a3off
          - switch.a4on
          - switch.a4off
          - switch.4switch_a_restart
        title: garden
        type: entities
      - entity: climate.ir_server_aircon
        type: thermostat
      - entity: media_player.bedroom_parents_speaker
        type: media-control
      - entity: media_player.family_room_speaker
        type: media-control
      - entity: media_player.plex_gyerekek_plex_for_lg_lg_oled65c9pla
        type: media-control
      - entity: media_player.plex_gyerekek_plex_for_kodi_kodi_add_on_localhost
        type: media-control
      - entities:
          - scene.front_door_ring
        title: Scene
        type: entities
      - entities:
          - script.1588319908809
          - script.1588319908807
          - script.1588319908804
          - script.1588319908808
          - script.1588319908801
        title: Script
        type: entities
      - entities:
          - vacuum.gizi
          - vacuum.lujzi
        title: Vacuum
        type: entities
      - entity: weather.home
        type: weather-forecast
    path: default_view
    title: Home
  

  - !include lovelace/view_garden_version2.yaml

Some small changes uploaded to hopefully prevent this error when installing the package.
No need to get the new files if you’ve already worked around it unless you just want to keep the current files.

Unfortunately the icon and state won’t flash when unavailable unless the screen is refreshed. This due to something in one f the cards I use and I have a feature request in to change it. I’m not sure if it will happen though.

Try to do like this

title: Home
views:
  - id: 0  # Page 1
    title: default_view
    icon: mdi:home
    badges:
........

  - id: 1  # Page 2
    title: Irrigation
    icon: mdi:sprinkler-variant
**

instead on including the view_garden_version2.yaml copy and paste its code where are the ** respecting the yaml indentation

Just a quick question where do i define the information with the sun symbol and information under the afternoon cycle, i just notice that on the github page screenshot, and it jogged my memory that in the previous version i had that showing but not in the latest one …

Ok, this is now an ‘external’ sensor.

You create a sensor anywhere in your config and call it sensor.irrigation_weather_outlook.
This will be displayed on that screen.

It used to be based on DarkSky but I decided to make it user definable for flexibility. The one you see in that screen shot is based on some complicated REST api sensors that I have been playing around with…

1 Like

I’ve made it like this in sensors

  - platform: template
    sensors:
      irrigation_weather_outlook:
        friendly_name: "Irrigation weather outlook"
        value_template: "{{ states('sensor.dark_sky_hourly_summary') }}"
1 Like