Problem
validators.py rejects schedulesInterval < 10 via MINIMUM_SCHEDULES_INTERVAL_MINUTES = 10 in constants.py. Other polling intervals have minimums of 5 (MINIMUM_DEVICE_INFO_INTERVAL_MINUTES, MINIMUM_MOISTURES_INTERVAL_MINUTES) or even 3 (MINIMUM_EVENTS_INTERVAL_MINUTES). The 10-min floor on schedules prevents users from getting zone state updates (isIrrigating, lastWateringStart, etc.) any faster than every 10 minutes, which causes perceptible UX lag after manual actions (see #).
Proposed fix
In constants.py, change MINIMUM_SCHEDULES_INTERVAL_MINUTES from 10 to 5. That brings it in line with moistures and device-info minimums. The validator logic is unchanged — it picks up the new constant automatically.
No test changes required (the existing validators.py tests validate behaviour, not the constant value).
Token budget impact
Netro v2 API has a daily token budget. /schedules.json costs 1 token per call. Moving from 10 → 5 min means 288 calls/day instead of 144 — an extra 144 tokens. Default v2 quota is 2000/day, so this is an acceptable 7% increase for users who opt in. Users who don't change the default (30 min) are unaffected.
Acceptance
Out of scope
- Per-endpoint token budget warnings in the plugin UI.
- Auto-tuning the interval based on observed token-reset patterns.
Context
Surfaced during PR #55 dogfooding — user tried schedulesInterval = 5 in prefs and hit the floor.
Problem
validators.pyrejectsschedulesInterval < 10viaMINIMUM_SCHEDULES_INTERVAL_MINUTES = 10inconstants.py. Other polling intervals have minimums of 5 (MINIMUM_DEVICE_INFO_INTERVAL_MINUTES,MINIMUM_MOISTURES_INTERVAL_MINUTES) or even 3 (MINIMUM_EVENTS_INTERVAL_MINUTES). The 10-min floor on schedules prevents users from getting zone state updates (isIrrigating,lastWateringStart, etc.) any faster than every 10 minutes, which causes perceptible UX lag after manual actions (see #).Proposed fix
In
constants.py, changeMINIMUM_SCHEDULES_INTERVAL_MINUTESfrom10to5. That brings it in line with moistures and device-info minimums. The validator logic is unchanged — it picks up the new constant automatically.No test changes required (the existing
validators.pytests validate behaviour, not the constant value).Token budget impact
Netro v2 API has a daily token budget.
/schedules.jsoncosts 1 token per call. Moving from 10 → 5 min means 288 calls/day instead of 144 — an extra 144 tokens. Default v2 quota is 2000/day, so this is an acceptable 7% increase for users who opt in. Users who don't change the default (30 min) are unaffected.Acceptance
MINIMUM_SCHEDULES_INTERVAL_MINUTES = 5inconstants.py.schedulesInterval.Out of scope
Context
Surfaced during PR #55 dogfooding — user tried
schedulesInterval = 5in prefs and hit the floor.