Git Product home page Git Product logo

Comments (16)

petergridge avatar petergridge commented on July 26, 2024

Hi, Do you have a frequency set for each zone? If you do you can add 'off' to the list of options and this will have the same effect.

I will look at the card and fix this issue though.

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

Hi, I have updated the ** custom card**, V5.2.1 is available as a beta, you will need to check the show beta option in HACS.

I had to clear my cache for it to take effect so keep an eye out for that.

Let me know if this is ok and I will close this issue and make the new version the primary version

from irrigation-v5.

ds7771 avatar ds7771 commented on July 26, 2024

Thank you! Yes, the update has the enable_zone input correctly showing in the custom card now -- very much appreciated.

However, I wanted to raise a side issue, per your comment that the run_freq set to "off" has the same effect. I tried this solution initially, but I found that it did not work entirely as described. In my instance, setting run_freq to "off" inside the zone causes the zone to be skipped only in the scheduled program. However, when I push the button to run the zone manually, it will turn on the zone despite setting run_freq to "off". Perhaps this is the intended behavior, in which case the description should be updated to clarify this distinction. Sorry if this should have been opened as a separate issue.

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

You are right the only sensor I intend to ignore is the rain sensor when running manually. The fix will be in the next release.

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

For me if I choose to run the program manually I want it to run without having to change the config. So unless the zone is explicitly 'Off' it will run.

  1. if the frequency contains valid values i.e. Mon, Tue... and it does not matches today and the zone is run manually it will run
  2. if the frequency contains valid values i.e. Mon, Tue... and it does not matches today the program is run manually it will run
  3. if the frequency has any other value i.e. Off it will not run

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

Here is where I have landed on the manual execution of the program/zone
It will not run only in these circumstances:

  • the zone is disabled, or
  • the zone frequency is 'Off'
    These sensors will be ignored:
  • Water Adjustment will default to 1
  • Rain sensor will default to off
    My reasoning is that I don't want to change the config for a one off. These two sensors may be giving inaccurate readings and if I am deciding to water manually I actually want to run a full cycle. For example washing the car sets the rain sensor off or the weather app is not accurate for a period in your area and the water adjustment is wrong.

I am still testing based on these rules but I should have a new version out on the weekend.

from irrigation-v5.

ds7771 avatar ds7771 commented on July 26, 2024

Hi, these conditions make sense to me, thanks!

I have a small nit pick, which may not be everyone's use case but I thought I would mention it. It would be nice if manually triggering a zone did not cause the start.program event to trigger, since I have some automations set up based on that event trigger, such as evapotranspiration calculations. I dont necessarily want those automatons to run whenever a single zone is manually triggered, but only when the scheduled program has been run.

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

Not a problem, the little nit picks are what improve the product, and this one has a simple solution, I will add a new event when the program is turned on rather than rely on the switch status. I will add it to the upcoming release.

event_data = {
"device_id": self._device_id,
"action": "program_turned_on",
"scheduled": self._scheduled,
"program": self._name
}

you can then automate based on this specific event when it starts and is scheduled rather than manually started, this example should work once the event is added:

alias: scheduled_program_start
description: "Do something when the program turns on"
trigger:
  - platform: event
    event_type: irrigation_event
    event_data:
      action: program_turned_on
      scheduled: true
action: ---- Put your action here ----
mode: single

it also makes sense to add the scheduled attribute to other events.

from irrigation-v5.

ds7771 avatar ds7771 commented on July 26, 2024

That sounds perfect, thanks! I was initially looking for the events but ended up settling on switch status instead.

To be really flexible, I might suggest defining an event for both program turned on and program turned off.

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

Hi, the actions and other changes have been applied in V5.2.6 (Beta), can you install it and verify it is behaving as expected before I release it as 'main'.

from irrigation-v5.

ds7771 avatar ds7771 commented on July 26, 2024

Hi - thanks for making these updates! Im not sure if it’s just me, but it’s not working for me. I set up a test automation, but it does not seem to notice any irrigation events coming from the events bus; nor is there any information being logged when I listen to “irrigation.event”:

alias: New Automation
description: ""
trigger:

  • platform: event
    event_type: Irrigation.event
    event_data:
    action: program_turned_on
    device_id: switch.planters_program
    scheduled: false
    condition: []
    action:
  • service: switch.turn_on
    data: {}
    target:
    entity_id: switch.library_lights
    mode: single

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

I had a similar issue, but before I installed it, the events where showing up without event data, I installed and restarted and it is working for me. I am not sure if it was a browser cache issue or what...

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

image
or in YAML

alias: test irrigation event
description: ""
trigger:
  - platform: event
    event_type: irrigation_event
    event_data:
      action: program_turned_on
      scheduled: true
condition: []
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.dummy_pump
mode: single

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

when listening for the event:

image

from irrigation-v5.

ds7771 avatar ds7771 commented on July 26, 2024

Ok, I got this working. I don't know why, but the irrigation_event bus was just not happy. I ended up deleting the integration and re-downloading the beta and re-building the programs from scratch. That seemed to do the trick. Now I see all the events when listening to irrigation_event channel.

One other point, irrigation_event is case-sensitive. I could not get automations to trigger on irrigation_event until I realized that irrigation_event needs to be specified in lower case:

Screenshot 2023-05-29 at 10 43 21 AM

from irrigation-v5.

petergridge avatar petergridge commented on July 26, 2024

Thanks for the update, I will close this issue, let me know if you require any other assistance

from irrigation-v5.

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.