thx for adding my “minutes” in attributes, pls add the same to the base index sensor i will be able to get rid of few template sensors
Re % adjustment … I think first of all you would have to add support for zones but anyway this is what I currently implemented in my system -> as 2 layers of adjustments:
generic adjustment … if I decide that "daily"run time is too short or too long I can adjust it by multiplying sensor result by some % defined. e.g. 10 min * 50% = 5 min applied for my irrigation
second level is adjustment per zone. idea the same … if one zone is bigger than other one or have a different water flow I can adjust it by some %. e.g. 5 min * 100% for zone1 = 5 min but 5 min * 150% for zone2 = 7,5 min.
Of course at all adjustment levels I take into account general adjustment and general maximum irrigation time… full example
daily run time = 10 min
general adj. = 50%
zone1 adj = 100%
zone2 adj. = 150%
max irrigation time = 6 min
calcs looks like that (done in sensor template):
zone1 duration = 10 min * 50% * 100% = 5 min
zone2 duration = 10 min * 50% * 150% = 7,5 min but set to 6 min as this is the max defined.
Multiple zones is possible with the new version: you can add the intergration multiple times to HA; one for each zone. It will have some redundant config / fetch settings but it will do fine.
could you please verify service smart_irrigation.calculate_hourly_adjusted_run_time
seems doesn’t work as I tried to push my value into sensor and call service. didn’t changed back state of the sensor.
the other one “smart_irrigation.calculate_daily_adjusted_run_time” seems to works fine … i could push my value and service changed back to previous state.
bucket survives HA restart but sensor’s state/value not. so if “daily” sensor is being set at 23:00 we should not restart HA after that time as we will loose sensor state and irrigation will not gonna happen. solution can be to call newly added service just before irrigation starts but it complicate things IMO
I know there are several options available as for ex. I did it in my implantation via % adjustments per zone so no issue at all …
The only comment is that having zones in the garden is quite common thing and adding the same integration several times makes things a bit complicated and time consuming … easier would be to have a systems supporting zones … anyhow, no issue as the same functionality can be achieved easily in many different ways, so I’m cool with the way how it is done now
zones support can be done already by adding the component more than once. I have also added lead-time, so wouldn’t that cover your scenario 1? Maximum irrigation time is also included already.
yeep I see it but can you please remove ‘min’ from attributes ? in all three sensors please
name itself is a self explaining about what units are we talking here …
adjusted_run_time_minutes: 1.62 min
with ‘min’ suffix it is a string so I can’t easily use it for my further calcs