My Garden Irrigation

configuration.yaml:

lovelace_gen:

lovelace:
  mode: yaml
  resources: !include lovelace/resources.yaml

browser_mod:

lovelace_gen in custom_components
lovelace_gen
Cards installed:

resources:
  - url: /browser_mod.js
    type: module
  - url: /local/hacsfiles/card-mod/card-mod.js
    type: module
  - url: /local/hacsfiles/lovelace-hui-element/hui-element.js
    type: module
  - url: /local/hacsfiles/button-card/button-card.js
    type: module
  - url: /local/hacsfiles/config-template-card/config-template-card.js
    type: module
  - url: /local/hacsfiles/mini-graph-card/mini-graph-card-bundle.js
    type: module
  - url: /local/hacsfiles/lovelace-layout-card/layout-card.js
    type: module
  - url: /local/hacsfiles/state-switch/state-switch.js
    type: module
  - url: /local/hacsfiles/lovelace-time-picker-card/time-picker-card.js
    type: module  

Is your folder named ‘Templates’ or ‘templates’?
It should be lower case.

Also I don’t think you need,

  - url: /browser_mod.js
    type: module

in your resources. Although I don’t think that will cause a problem.

Apart from that, at the moment I can’t see anything wrong :thinking:

browser_mod is used in sthg else, it does not belong to irrigation :slight_smile:
folder name in lovelace is ‘templates’

I am at a loss to understand why you get these errors.
Where do the errors appear? I don’t recognise this:

image

Are they being highlighted in the editor? What editor do you use? Could it be that it doesn’t recognise the syntax of the !includes?

It is File editor.


Those errors are higlighted by the red circle with exclamation mark on the right upper corner of the editor’s window.
If you click on it, error description appears in the popup window.
If you open any of listed files in it, you will see it

Ok, have you tried to ignore those errors and refreshed Lovelace?
I just wonder if File Editor doesn’t know about lovelace_gen and doesn’t like the syntax.

I refreshed lovelace several times,
Iˇve even restarted hassio, checked all installed components.
There are even other errors than bad indentation.

What are the other errors?

I scanned files once more and only one error is different:

missed comma between flow collection entries at line 3, column 2:
    {% set margin_top = margin_top |  ... 
     ^

It is necessary to consider that it is first error in the file only, the check does not go further without correction.

Well it is a mystery to me.
I really don’t know how to proceed with this.

You could try loading it section by section.

The main view file is divided into very clear and separate sections. You could try loading them one section at a time. Each section is also in itself quite modular. Maybe you can start by loading only a very small section at a time and see if you make any progress or at least narrow down what the issue is

it is a mystery for me as well.
If I want to load it in sections - not sure how to do it.
There are !include everywhere. Well, almost everywhere.
Should I “disable” them? Or just try those .yaml files where !include are absent?

Start with the view.

There are three sections:

SYSTEM STATUS
SCHEDULES
and
SETTINGS

Comment out two of those sections and see if any one will load on its own.

Thanks. Will try.

Update:
All it stops here : /config/lovelace/templates/garden/status/section_status_header.yaml

There are displayed both dividers only

  - type: custom:hui-element
    row_type: divider

I’m sorry but I really don’t know what else to suggest at the moment…

Is anyone else out there using this on HA v110?

Hello, i have HA v110
after some issues i stuck now on this, and don’t know
what i can do with this…

if someone have an idea??

image

I can’t do much with those error messages…
Can you copy and paste some more of the text in the red boxes?
You should be able to select it with the mouse even if it doesn’t show on the screen. Possibly a triple left click in the red box will select it all.

But as a first guess…
Do you have the following entity?

input_boolean.irrigation_master_control_switch

What is it’s state?

Announcement

I have improved Version 2 so that it now includes the ability to run each Zone on a choice of days rather than each Cycle.

So, a Cycle is now scheduled for a start time and at that time, every day the cycle will run but you can choose which days of the week that Zone is watered on. I have removed the option to ‘Skip’ a zone as that makes no sense now. Either set the time to zero or turn it off for that day(s).

I’ll be honest and say that doing this has made the UI less attractive as it is a bit more cluttered but I think this is a small trade-off for the extra flexibility.

Warning

I realise some may want to stay with the current version so I will not be uploading the new files for a few days. Please make any preparations you might need before I do this.

2 Likes

Hi Klogg.
I’m still using version 1, it’s perfect for my needs.
I have only a problem with the “alternate” scheduling.
It runs the first day and then it doesn’t run anymore.
I didn’t look into it yet.
Are you aware of any problem in the “alternate” code?
Thanks

Hi, I’m glad that you’re getting good use from it.
To be honest I never used the Alternate schedule myself although I am sure I would have tested it :thinking::wink:

I will try to have a look at it over the next few days and see if I can see anything wrong with it.

Hi.
Yes, I added telegram notification, removed a zone and removed weather adjustment, as I was having some problem.
New version is gorgeus, but I chose to stay on V1 because it suits my needs :slight_smile:
Meanwhile I checked the code.
I admit that I can’t understand it very well bercause of my poor skills

update_next_runtime:
    sequence:
      - service: input_datetime.set_datetime
        data_template:
          entity_id: input_datetime.cycle{{ cycle }}_next_run_time
          date: >
            {% if states('input_select.cycle' + cycle + '_watering_days') == 'Daily' %}
              {{ (as_timestamp(now() ) + 24 * 3600 ) | timestamp_custom("%Y-%m-%d") }}
            {% elif states('input_select.cycle' + cycle + '_watering_days') == 'Alternate' %}  
              {{ (as_timestamp(now() ) + 48 * 3600 ) | timestamp_custom("%Y-%m-%d") }}
            {% else %}
              {{ states('input_datetime.cycle' + cycle + '_next_run_time').split(' ')[0] }}
            {% endif %}
          time: >
            {{ states('input_select.cycle' + cycle + '_schedule_time') }}

Alternate part looks straight, it adds 48 hours instead of the daily 24 hours, until here it’s easy, but then I don’t know.

I’ll test it better, if you find anything please tell me.

1 Like