Coder Social home page Coder Social logo

Comments (11)

rgc99 avatar rgc99 commented on August 15, 2024

A controller/zone supports only one switch but it's a good idea to allow a list for this type of situation. Probably not that difficult to implement. In the meantime HA group might help, haven't tried it but should work.

from irrigation_unlimited.

rgc99 avatar rgc99 commented on August 15, 2024

Possibly the smallest feature I have made. Turns out the HA service call accepts a CSV list. Just needed to let the string pass through config validation. One character, two if you count the same change at the controller level. The identity_id now takes a list separated by commas.

from irrigation_unlimited.

miguelpucela avatar miguelpucela commented on August 15, 2024

Related to this, I'd like to make a sequence in which some of the zones run at the same time, but also sequentially.

For instance, a controller with 3 zones. The desired sequence would be:

  • zone 1: 2 minutes.
  • zone 2: 2 minutes.
  • zone1+zone2: 5 minutes.
  • zone3: 7 minutes.

I think that in the actual sequence implementation it cannot be done ... Am I right?

from irrigation_unlimited.

rgc99 avatar rgc99 commented on August 15, 2024

I love this thread. Short answer, you are correct. Long answer, if we make the zone_id parameter in the sequence a CSV string like '1,2' then this might work. I am thinking something like this:

irrigation_unlimited:
  controllers:
      zones:
        - name: "Zone 1"
        - name: "Zone 2"
        - name: "Zone 3"
      sequences:
        - name: "Run 1"
          duration: "00:02"
          delay: "00:01"
          schedules:
              time: "05:30"
          zones:
            - zone_id: 1
            - zone_id: 2
            - zone_id: 1,2
              duration: "00:05"
            - zone_id: 3
              duration: "00:07"

from irrigation_unlimited.

miguelpucela avatar miguelpucela commented on August 15, 2024

I've tried:
-zone_id:1,2
and it gives next error:

"Logger: homeassistant.config
Source: config.py:443
First occurred: 0:18:57 (1 occurrences)
Last logged: 0:18:57

Invalid config for [irrigation_unlimited]: expected int for dictionary value @ data['irrigation_unlimited']['controllers'][1]['sequences'][0]['zones'][1]['zone_id']. Got '2,3'. (See /config/configuration.yaml, line 19). Please check the docs at https://github.com/custom-components/irrigation_unlimited"

I think that what you sugested in your previous message is only an idea, so this error is expected.

from irrigation_unlimited.

rgc99 avatar rgc99 commented on August 15, 2024

This is still in development and not in the current release but looking good. Slight change to the zone_id parameter specification, you will need square brackets around the string when specifying multiple zones. This makes it a yaml list which is the proper way to go, CSV's are frowned upon apparently. The zone_id parameter will still take a single string so no breaking changes or a list. Example:

zone_id: [1,2]
zone_id: 1

Stay tuned.

from irrigation_unlimited.

miguelpucela avatar miguelpucela commented on August 15, 2024

So, I'll wait until then to test it :)

from irrigation_unlimited.

miguelpucela avatar miguelpucela commented on August 15, 2024

I've checked the new version and everything is working fine, including running several zones at the same time in schedules.

Great work!

from irrigation_unlimited.

Olum-hack avatar Olum-hack commented on August 15, 2024

I still get an error:
Invalid config for [irrigation_unlimited]: expected int for dictionary value @ data['irrigation_unlimited']['controllers'][0]['sequences'][2]['zones'][0]['zone_id']. Got [1, 2]. (See /config/configuration.yaml, line 102).

controllers:

  • name: 'Pumpe'
    preamble: '00:00'
    entity_id: 'switch.garten_bewasserung_wasserpumpe'
    zones:

    • name: "Hecke"
      entity_id: 'switch.garten_bewasserung_hecke'
    • name: "Hochbeet"
      entity_id: 'switch.garten_bewasserung_hochbeet'
    • name: "Rasen"
      entity_id: 'switch.garten_bewasserung_rasen'
    • name: "Vorgarten"
      entity_id: 'switch.garten_bewasserung_vorgarten'
    • name: "Rasen Dusche"
      entity_id: 'switch.garten_bewasserung_rasen_dusche'

    sequences:

    • name: "Tropfen"
      delay: '00:00'
      schedules:

      • name: "Morgen Tropfen"
        time:
        sun: "sunrise"
        before: '01:00'
        zones:
      • zone_id: 1
        duration: "00:15"
      • zone_id: 2
        duration: "00:15"
    • name: "Rasen"
      delay: '00:00'
      schedules:

      • name: "Morgen Rasen"
        time:
        sun: "sunrise"
        before: '01:00'
        zones:
      • zone_id: 3
        duration: "00:10"
      • zone_id: 4
        duration: "00:10"
      • zone_id: 5
        duration: "00:10"
    • name: "Tropfen Abend 1"
      delay: '00:00'
      duration: '00:15'
      schedules:

      • name: "Abend Tropfen 1"
        time:
        sun: "sunset"
        month: [apr, may, jun, jul, aug, sep, oct]
        zones:
      • zone_id: [1,2]

from irrigation_unlimited.

rgc99 avatar rgc99 commented on August 15, 2024

You need Irrigation Unlimited version 2021.6.15 which is a pre-release at the moment. Choose 'Show beta versions' in HACS when you install it.

from irrigation_unlimited.

rgc99 avatar rgc99 commented on August 15, 2024

Assume everything is going well. I will close off this issue.

from irrigation_unlimited.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.