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

Water Adjustment factor not being applied #110

Open
patfelst opened this issue Jan 12, 2025 · 6 comments
Open

Water Adjustment factor not being applied #110

patfelst opened this issue Jan 12, 2025 · 6 comments

Comments

@patfelst
Copy link

Apologies for another issue...

I might be doing something wrong, but the adjustment factor, calculated using an OWMH template sensor, is increasing the time remaining correctly, but when I look at the logbook for the sprinkler switch, its only coming on for the base watering time.

I've only just noticed this, so will do some more testing to see if the zone turns off with non-zero time remaining.

@RouxStrauss
Copy link

Hi there. I am also trying to get it to work. I have the right API with OWM (v3). What sensor do I need to put in to get it to work?
Thanks!

@petergridge
Copy link
Owner

Hi there. I am also trying to get it to work. I have the right API with OWM (v3). What sensor do I need to put in to get it to work? Thanks!
Assuming that you have a sensor named 'adjustment' defined in OWMH using for example this script:

{{ 
  [(10 
  - day0rain 
  - day1rain*0.5
  - day2rain*0.25
  - day3rain*0.12
  - day4rain*0.06)/10
  ,0]|max
}}

then on the zone configuration, if you want it applied to all zones you will need to add it to each zone.
image

So when it runs the program will apply the adjustment factor to determine the new duration. so if it set the run time for 6 minutes and the adjustment is 0.5 the zone will run for 3 minutes.

@RouxStrauss
Copy link

RouxStrauss commented Jan 13, 2025

Thanks for the reply. I got that working! Just another question. Is the factor determined on the forecast or the past rainfall in the area?

@petergridge
Copy link
Owner

With the script provided it is using the history rainfall, if you want to use the forecast use something like this script that uses 3 days of history and 2 days of forecast

{{ 
  [(10 
  - day0rain 
  - day1rain*0.5
  - day2rain*0.25
  - forecast1rain*forecast1pop*0.5
  - forecast2rain*forecast2pop*0.25)/10
  ,0]|max
}}

These are documented in the OWMH repository
https://github.com/petergridge/openweathermaphistory?tab=readme-ov-file#examples

@petergridge
Copy link
Owner

Apologies for another issue...

I might be doing something wrong, but the adjustment factor, calculated using an OWMH template sensor, is increasing the time remaining correctly, but when I look at the logbook for the sprinkler switch, its only coming on for the base watering time.

I've only just noticed this, so will do some more testing to see if the zone turns off with non-zero time remaining.

I am not experiencing this on at my end, let me know what you find.

@RouxStrauss
Copy link

With the script provided it is using the history rainfall, if you want to use the forecast use something like this script that uses 3 days of history and 2 days of forecast

{{ 
  [(10 
  - day0rain 
  - day1rain*0.5
  - day2rain*0.25
  - forecast1rain*forecast1pop*0.5
  - forecast2rain*forecast2pop*0.25)/10
  ,0]|max
}}

These are documented in the OWMH repository https://github.com/petergridge/openweathermaphistory?tab=readme-ov-file#examples

Thanks, one last question, can I factor temperature in as well with the forecast and the past rainfall?

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

3 participants