Skip to content

Add configurable manual feed amount and move global feed settings out of schedules #26

Description

@bschlagheck

Problem

Manual feeding is currently fixed to 1 portion unit.

This affects both:

  • the Feed Now action in the web UI
  • the hardware button manual feed action

At the same time, the global portion_unit_grams setting is currently placed inside the schedules section, even though it also affects manual feeding and button-triggered feeding.

Goal

  • Allow configuring the manual feed amount in the UI
  • Persist that value in device config
  • Use the same saved manual feed amount for both:
    • Feed Now
    • hardware button manual feeding
  • Move global feed settings out of the schedules section
  • Increase portion sliders from 1..5 to 1..10 consistently across the system

Proposal

Add a new global feed settings block above the schedules section.

The block should contain:

  • Portion size (g per unit)
  • Manual feed amount

The portion_unit_grams setting should no longer live inside the schedules section.

Manual feeding should use a saved manual_portion_units config value instead of being hardcoded to 1.

Technical outline

  1. Config

    • Add persistent manual_portion_units
    • Default to 1
  2. Firmware

    • POST /feed should use stored manual_portion_units
    • hardware button manual feed should use stored manual_portion_units
    • extend validation for portion units from 1..5 to 1..10
  3. Web API

    • include manual_portion_units in GET /config
    • accept and validate manual_portion_units in POST /config
  4. Frontend

    • add a new Feed settings block above schedules
    • move Portion size (g per unit) into that block
    • add UI control for Manual feed amount
    • update displayed gram calculations accordingly
  5. Import / Export

    • include manual_portion_units in config export/import
  6. Mock

    • extend mock config and validation
    • use stored manual amount in mock manual feed behavior

Acceptance criteria

  • The manual feed amount can be configured in the UI
  • The value is saved persistently on the device
  • Feed Now uses the saved manual feed amount
  • hardware button manual feeding uses the same saved manual feed amount
  • Portion size (g per unit) is no longer shown inside the schedules section
  • Portion sliders support 1..10 for schedules and manual feeding
  • Import/export includes the new manual feed config
  • Mock behavior matches the real API behavior

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions