My Garden Irrigation

@klogg haven’t changed a single line. Just trying to get lovelace to actually display the picture you added on Github.Thanks man i really appreciate it.

@klogg Ok here’s what i have on a brand new HA install. I used the folder structure as is and haven’t edited any of the files. All i’m hoping to achieve is only to at least get LoveLace to load up.

108.8

  • Installed hacs and added the custom integration and cards you mentioned. After adding each one i’m being presented to add them to lovelace

Here’s my full config.yaml file

homeassistant:
  packages: !include_dir_named packages
default_config:
frontend:
  themes: !include_dir_named themes
lovelace:
  mode: yaml

tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

I copied the lovelace directory as is
image
I copied the package directory to packages

image
I created a ui-lovelace.yaml file to include view_garden_version2.yaml

image

When reloading HA - System goes into recovery mode. Also Loading error log doesn’t load any logs

Looking at the log file from File Editor

2020-04-24 01:07:13 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Error during setup of component lovelace
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/lovelace/__init__.py", line 97, in async_setup
    resource_collection = await create_yaml_resource_col(hass, yaml_resources)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/__init__.py", line 222, in create_yaml_resource_col
    ll_conf = await default_config.async_load(False)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 186, in async_load
    self._load_config, force
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/lovelace/dashboard.py", line 204, in _load_config
    config = load_yaml(self.path)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 116, in _include_yaml
    return _add_reference(load_yaml(fname), loader, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 116, in _include_yaml
    return _add_reference(load_yaml(fname), loader, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 61, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/local/lib/python3.7/site-packages/yaml/__init__.py", line 114, in load
    return loader.get_single_data()
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 51, in get_single_data
    return self.construct_document(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
    data = self.construct_object(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 195, in _ordered_dict
    nodes = loader.construct_pairs(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 155, in construct_pairs
    value = self.construct_object(value_node, deep=deep)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 226, in _construct_seq
    (obj,) = loader.construct_yaml_seq(node)
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq
    data.extend(self.construct_sequence(node))
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in construct_sequence
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 130, in <listcomp>
    for child in node.value]
  File "/usr/local/lib/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
    data = constructor(self, node)
  File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 114, in _include_yaml
    fname = os.path.join(os.path.dirname(loader.name), node.value)
  File "/usr/local/lib/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/local/lib/python3.7/genericpath.py", line 153, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'list'
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: lovelace
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of hacs. Setup failed for dependencies: frontend, lovelace
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Setup failed for hacs: Could not set up all dependencies.
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Setup failed for map: Could not set up all dependencies.
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend
2020-04-24 01:07:14 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not set up all dependencies.
2020-04-24 01:07:15 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: frontend, logbook, map
2020-04-24 01:07:15 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.
2020-04-24 01:07:20 WARNING (MainThread) [homeassistant.bootstrap] Detected that frontend did not load. Activating safe mode

@klogg I managed to get to here, still a lot of issues though.

I have moved the prerequisites into a separate page on GitHub to make it more useful.
Please check you have followed everything there.

Two easy starters though:

I suspect your DarkSky weather sensor doesn’t match mine. This was mentioned in a forum post above but I have now detailed it in the readme.

It also looks like you haven’t defined the correct font.

@klogg Thank you so much for taking the time to read through my comments.

Here’s what i have. I’ve been through the prerequisites and the only thing i haven’ done is the notifications

  • HACS cards installed and defined as indicated on each of the respective install pages.
  • Oswold font set
  • dark_teal theme set
  • Darksky have been added however not too sure if these are 100% correct:
  -  platform: darksky
     api_key: <apikey>
     forecast: 1
     monitored_conditions:
     - summary
     - temperature
     - temperature_max
     - temperature_min
     - cloud_cover
     - humidity
     - pressure
     - minutely_summary
     - hourly_summary
     - daily_summary

Overall:

  • System IDLE is unkown
  • Morning Afternoon and Manual is Unkown - Where is this being defined or being pulled from?

Because the file “view_garden_v2.yaml” must be in the /config directory. And also the two directory “includes” and “includes_garden” must be in te /config directory.

Hi @klogg, i have see now that you have upload the version2 with some correction. I have rewrite the garden_irrigation.yaml file for receive notifications in telegram.

This is my code:


#===================
#=== Input Booleans
#===================
input_boolean:
  irrigation_notify_user1:
    name: Notify Edoardo of events
    icon: mdi:message-text-outline

  irrigation_notify_user2:
    name: Notify Sabrina of events
    icon: mdi:message-text-outline

#================
#=== Automations
#================
automation:

  #===================================================
  #=== Notify about irrigation events
  #===================================================
  - alias: Irrigation Notify About Irrigation Events User1
    trigger:
      - platform: state
        entity_id:
        - input_boolean.irrigation_cycle1_running
        - input_boolean.irrigation_cycle2_running

    condition:
      - condition: state
        entity_id: input_boolean.irrigation_notify_user1
        state: 'on'        

    action:
      - service: telegram_bot.send_message
        data_template:
          target: !secret chat_id_edoardo
          title: '*IRRIGATION SYSTEM*'
          message: >
            {% if trigger.entity_id == 'input_boolean.irrigation_cycle1_running' %}
              {% set cycle = 'cycle1' %}
            {% else %}
              {% set cycle = 'cycle2' %}
            {% endif %}

            {% set cycle_name = states('input_text.irrigation_' ~ cycle ~ '_name') %}

            {% if trigger.to_state.state == 'on' %}
              {% set ns = namespace(total_time = 0) %}
              {% for zone in states.input_number if zone.entity_id.startswith('input_number.irrigation_' ~ cycle ~ '_zone') and
                                                    zone.entity_id.endswith('_duration') %}
                {% if is_state('input_boolean.irrigation_' ~ cycle ~ '_zone' ~ loop.index ~ '_skip', 'off') %}
                    {# Adjust for rainfall #}
                    {% if is_state('input_boolean.irrigation_' ~ cycle ~ '_adjust_for_rainfall', 'on') %}
                      {% set ns.total_time = ns.total_time * states('input_number.irrigation_rainfall_multiplier') | float %}
                    {% elif is_state('input_boolean.irrigation_' ~ cycle ~ '_adjust_for_temperature', 'on') %}
                      {% set ns.total_time = ns.total_time * states('input_number.irrigation_temp_multiplier') | float %}
                    {% else %}
                      {% set ns.total_time = ns.total_time + states(zone.entity_id) | float %}
                    {% endif %}
                {% endif %} 
              {% endfor %}
              
              I thought you'd like to know that the {{ cycle_name }} cycle has just started.


            The total watering time should be about {{ (ns.total_time * 60) | timestamp_custom('%H:%M', false) }} but I'll let you know when it has finished.
            {% else %}
              All the {{ cycle_name }} cycle watering is done.
            {% endif %}
  
  #===================================================
  #=== Notify about irrigation events
  #===================================================
  - alias: Irrigation Notify About Irrigation Events User2
    trigger:
      - platform: state
        entity_id:
        - input_boolean.irrigation_cycle1_running
        - input_boolean.irrigation_cycle2_running

    condition:
      - condition: state
        entity_id: input_boolean.irrigation_notify_user2
        state: 'on'         

    action:
      - service: telegram_bot.send_message
        data_template:
          target: !secret chat_id_sabrina
          title: '*IRRIGATION SYSTEM*'
          message: >
            {% if trigger.entity_id == 'input_boolean.irrigation_cycle1_running' %}
              {% set cycle = 'cycle1' %}
            {% else %}
              {% set cycle = 'cycle2' %}
            {% endif %}

            {% set cycle_name = states('input_text.irrigation_' ~ cycle ~ '_name') %}

            {% if trigger.to_state.state == 'on' %}
              {% set ns = namespace(total_time = 0) %}
              {% for zone in states.input_number if zone.entity_id.startswith('input_number.irrigation_' ~ cycle ~ '_zone') and
                                                    zone.entity_id.endswith('_duration') %}
                {% if is_state('input_boolean.irrigation_' ~ cycle ~ '_zone' ~ loop.index ~ '_skip', 'off') %}
                    {# Adjust for rainfall #}
                    {% if is_state('input_boolean.irrigation_' ~ cycle ~ '_adjust_for_rainfall', 'on') %}
                      {% set ns.total_time = ns.total_time * states('input_number.irrigation_rainfall_multiplier') | float %}
                    {% elif is_state('input_boolean.irrigation_' ~ cycle ~ '_adjust_for_temperature', 'on') %}
                      {% set ns.total_time = ns.total_time * states('input_number.irrigation_temp_multiplier') | float %}
                    {% else %}
                      {% set ns.total_time = ns.total_time + states(zone.entity_id) | float %}
                    {% endif %}
                {% endif %} 
              {% endfor %}
              
              I thought you'd like to know that the {{ cycle_name }} cycle has just started.


              The total watering time should be about {{ (ns.total_time * 60) | timestamp_custom('%H:%M', false) }} but I'll let you know when it has finished.
            {% else %}
              All the {{ cycle_name }} cycle watering is done.
            {% endif %}
          

I have also fixed many other small errors, including: cycle 3 could not be edited from the interface, the valves turned on but did not turn off (I rewrite the template), I added the pulsetime for each valve and I removed the master valve which I do not have, fixed some settings that were not seen.

I have yet to take a look at the new changes you’ve uploaded and the temperature and rainfall part because I don’t have smartweather sensors in my area.

This is being caused by the darksky sensor. I have changed the prerequisite description on GitHub to try and make it clearer. There is one line you need to change as your sensor will not have the same name as mine:

In the file item_schedule_cycle_header.yaml you must change from:

label: "[[[ return 'Weather Outlook: ' + states['sensor.dark_sky_current_minutely_summary'].state.replace(',', ',<br>'); ]]]"

to:

label: "[[[ return 'Weather Outlook: ' + states['sensor.dark_sky_minutely_summary'].state.replace(',', ',<br>'); ]]]"

Then your cycle headers should show and if you click on it you can rename them.

@http_edo13, Nice work with the notifications.

I think I have included all the bugs found so far in the new version. I have also removed the use of a Sonoff as I found a way to include the failsafe time directly on the ESP32 in ESPHome.

If you still want to use the temperature adjustments, that only needs DarkSky or some other source of temperature. To be honest since I came up with those algorithms in version 1 I have never actually used them much :blush:.

Actually, if I’m totally honest I pretty much only even use the schedules when I’m on holiday. My wife likes to press the Dash button to make it work :wink:

Hi klogg, I would like to implement this…would you mind sharing hardware information/configuration in ESPhome as that is likely the direction I would pursue.

(This all relates to Version 2 of course, Version 1 used a simple Sonoff 4ch flashed with Tasmota)


I will be implementing a hardware solution pretty much exactly as described by @sparkydave
here, and from here onwards but as of yet it is only the ESP32 and the relay board sitting on my desk. So I know the software driven ‘relay-on-and-off’ bit works, I just need to install the electrics on the other side of the relays to actually control the valves :slight_smile:

My ESPHome config is here. As always, suggestions for improvements are welcome:


#==================
#=== Uses ESP32-03
#==================

#==================
#=== Substitutions
#==================
substitutions:
  device_name: esphome_irrigation_controller
  friendly_name: ESPHome Irrigation Controller
#==================

# Board
esphome:
  name: ${device_name}
  platform: ESP32
  board: mhetesp32devkit

# WiFi
wifi:
  ssid: !secret not_wifi_ssid
  password: !secret not_wifi_password
  fast_connect: True
  ap:
    ssid: Irrigation Fallback Hotspot
    password: some.random.fallback.password!

# Fallback portal 
captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

# Enable Over-The-Air updates
ota:

# # Enable Web server.
# web_server:
#   port: 80

    
#=== Sensors
sensor:
  #=== Uptime
  - platform: uptime
    name: ${friendly_name} Uptime

  #=== WiFi Signal
  - platform: wifi_signal
    name: ${friendly_name} WiFi Signal
    update_interval: 60s

  #=== Failsafe time
  - platform: homeassistant
    id: failsafe_time
    name: ${friendly_name} Failsafe Time
    entity_id: input_number.irrigation_failsafe_time_in_seconds


#=== Switches
switch:
  #=== Zone Relay 1
  - platform: gpio
    pin: 
      number: 21
      inverted: True
    name: Garden Irrigation Relay Zone1
    id: relay1
    restore_mode : ALWAYS_OFF
    interlock: &interlock_group [relay1, relay2, relay3, relay4, relay5, relay6, relay7, relay8]
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 2
  - platform: gpio
    name: Garden Irrigation Relay Zone2
    id: relay2
    pin: 
      number: 22
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe
      
  #=== Zone Relay 3
  - platform: gpio
    name: Garden Irrigation Relay Zone3
    id: relay3
    pin: 
      number: 23
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe
      
  #=== Zone Relay 4
  - platform: gpio
    name: Garden Irrigation Relay Zone4
    id: relay4
    pin: 
      number: 14
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 5
  - platform: gpio
    name: Garden Irrigation Relay Zone5
    id: relay5
    pin: 
      number: 25
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 6
  - platform: gpio
    name: Garden Irrigation Relay Zone6
    id: relay6
    pin: 
      number: 26
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 7
  - platform: gpio
    name: Garden Irrigation Relay Zone7
    id: relay7
    pin: 
      number: 27
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Zone Relay 8
  - platform: gpio
    name: Garden Irrigation Relay Zone8
    id: relay8
    pin: 
      number: 18
      inverted: True
    restore_mode : ALWAYS_OFF
    interlock: *interlock_group
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

  #=== Reboot
  - platform: restart
    name: ${friendly_name} Reboot
    id: reboot


#=== Scripts
script:

  #=== Set failsafe time converted to milliseconds
  - id: failsafe
    then:
      - delay: !lambda |-
          return id(failsafe_time).state * 1000;
      - switch.turn_off: relay1
      - switch.turn_off: relay2
      - switch.turn_off: relay3
      - switch.turn_off: relay4
      - switch.turn_off: relay5
      - switch.turn_off: relay6
      - switch.turn_off: relay7
      - switch.turn_off: relay8

Awesome thank you :slight_smile:

@http_edo13 thanks, all of the config is currently in /config. It was the DarkSky sensor causing the issue

This has been a massive learning curve for me so far and i’m really grateful for the advise and help so far. Now trying to get the below sorted

Now trying to get the below sorted


Sensors to show detail Unless i need to wait a bit.
image

@klogg i’m using mqtt to control my 8 channel relay. Apologies for the stupid question. Can the below switch be changed to use mqtt instead to turn the zones on and off?

#=== Switches
switch:
  #=== Zone Relay 1
  - platform: gpio
    pin: 
      number: 21
      inverted: True
    name: Garden Irrigation Relay Zone1
    id: relay1
    restore_mode : ALWAYS_OFF
    interlock: &interlock_group [relay1, relay2, relay3, relay4, relay5, relay6, relay7, relay8]
    on_turn_on:
      - script.execute: failsafe
    on_turn_off:
      - script.stop: failsafe

if necessary I can share the code of the changes made, but I hope they have been resolved in the new commit of version 2

Regarding the temperature history, yes you need to wait for those figures to become populated over time.

The graph though should display but it has the same darksky sensor problem. I’ll update the readme but in the meantime you need to edit one line in section_settings_temperature.yaml

Line103:

- entity: sensor.dark_sky_forecast_daytime_high_temperature_0d

needs to be:

- entity: sensor.dark_sky_daytime_high_temperature_0d


I’m not really the person to ask this, I’m still finding my way a bit with ESP32 etc.

Maybe someone else can help?

Hello
I tried to install the package but I’m having problems.
with Lovelace, I get an error unknown tag !<!include>
if I insert:
views:

  • !include lovelace/view_garden_v2.yaml
    thanks for your great work

In the esphome config file you can enable MQTT control as well.
By default it uses HA’s own api between HA and ESP32.

my my_esp32.yaml includes:

# Enable Home Assistant API
api:

mqtt:
  broker: 192.168.100.xxx
  username: xxx
  password: xxx

see: https://esphome.io/components/mqtt.html?highlight=mqtt

So far for me irrigation works with esp32 + relays + a simple cron job that sends mqtt messages, to add more flexibility for the config I’m trying to configure this package.
Now I’m stuck at lovelace not displaying anything and trying to sort out this:
Secret smartweather_location_code_1 not defined

Do you have any pointers if I’m not able to use smartweather as no stations are around, nor darksy, what to use instead?

@klogg thanks for the updated readme file it helped a lot!

I think you may not have lovelace_gen installed.
Did you go through the prerequisites?

For rainfall I have no other suggestions I’m afraid. Getting rainfall data in a way that is useable is a real problem. In version 1 I attempt to use darksky but the method is not very reliable and relies on constantly updating the figures (I think I have it updating every 30 minutes).

For temperature, an alternative could be openweathermap. Since the Apple/Darksky announcemnet I think they have decided to try and capture some of the Darksky users. They have a new api too I think.

At some point I will probably change to openweathermap as I will lose access to darksky in 2021.

… I think no… Ok I read about it, thanks