Skip to content

Support program budget in update_program service#389

Merged
sebr merged 1 commit intomainfrom
program-budgets
Apr 17, 2026
Merged

Support program budget in update_program service#389
sebr merged 1 commit intomainfrom
program-budgets

Conversation

@sebr
Copy link
Copy Markdown
Owner

@sebr sebr commented Apr 17, 2026

Summary

  • Adds an optional budget field (integer, 0-200%) to the existing bhyve.update_program service.
  • The budget scales each zone's run time: 100 leaves run times unchanged, 50 halves them, 200 doubles them.
  • Service now requires at least one of start_times, frequency or budget to be provided.

Fixes #345.

Usage

service: bhyve.update_program
data:
  entity_id: switch.front_yard_usual_programming_program
  budget: 75

Test plan

  • Added unit test covering budget-only updates (preserves other fields).
  • ./scripts/lint and pytest tests/ pass (37 switch tests).
  • Manual test: verify the B-hyve API accepts values up to 200 and that the budget change is reflected in the B-Hyve app after the program_changed event fires.

Adds an optional `budget` field (0-200%) to the update_program service,
which scales zone run times. Addresses #345.
@sebr sebr merged commit 49d7d5a into main Apr 17, 2026
4 checks passed
@sebr sebr deleted the program-budgets branch April 17, 2026 01:23
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

Successfully merging this pull request may close these issues.

Feature request: Add ability to set program budgets

1 participant