Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to open to valves/zone at the same time #17

Closed
CiViC321 opened this issue May 28, 2021 · 11 comments
Closed

How to open to valves/zone at the same time #17

CiViC321 opened this issue May 28, 2021 · 11 comments

Comments

@CiViC321
Copy link

Firstly, great component and thank you for sharing.

I have quite a big garden with multiple lanes/valves in the system. I understand that a zone is equal to a switch. How would I go about opening two valves/switch at the same time, or add two switches to a zone?

Thanks again.

@rgc99
Copy link
Owner

rgc99 commented May 28, 2021

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.

@rgc99
Copy link
Owner

rgc99 commented Jun 1, 2021

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.

@miguelpucela
Copy link

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?

@rgc99
Copy link
Owner

rgc99 commented Jun 4, 2021

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"

@miguelpucela
Copy link

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.

@rgc99
Copy link
Owner

rgc99 commented Jun 7, 2021

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.

@miguelpucela
Copy link

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

@miguelpucela
Copy link

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

Great work!

@Olum-hack
Copy link

Olum-hack commented Jun 18, 2021

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]

@rgc99
Copy link
Owner

rgc99 commented Jun 19, 2021

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.

@rgc99
Copy link
Owner

rgc99 commented Nov 4, 2021

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

@rgc99 rgc99 closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants