{# Settings ▸ Food, above the fields: how the energy target is worked out (views.plan as p, from Health's energy summary e), what each weight goal would give, every macro preset in grams (views.presets). Read-only — the fields below set it. Styles inline (settings page). #} {% macro n(x) %}{{ "{:,.0f}".format(x).replace(",", " ") if x is not none else "—" }}{% endmacro %}
Limited: at most {{ n(1000) }} kcal under your usual day and never under {{ n(p.floor) }} kcal — more than that only with a doctor.
{% endif %} {% if p.set %}Your own number below replaces the calculated {{ n(p.calc) }}. Set it to 0 to use the calculation.
{% endif %} {% else %}Can't calculate a target yet: Health needs your sex, birth date, height (Settings ▸ Health) and a weight measurement. Until then: {{ "your own number" if p.set else "2 000 kcal" }}.
{% endif %}| Goal | kg a week | kcal a day |
|---|---|---|
| {{ o.label }} | {{ "%+g" | format(-o.kg_week) if o.kg_week else "0" }} | {{ n(o.kcal) }}{% if o.capped %} (limited){% endif %} |
0.5–1 % of body weight a week is the usual advice for losing weight without losing much muscle; slower is easier to keep up. Your usual day comes from Health's energy estimate and moves with your weight and activity.
| Split | % | Protein | Carbs | Fat |
|---|---|---|---|---|
| {{ s.label }} | {{ s.pct | join("·") }} | {{ s.g[0] }} g{% if s.per_kg %} {{ s.per_kg }}/kg{% endif %} | {{ s.g[1] }} g | {{ s.g[2] }} g |
Recommended ranges: protein 10–35 %, carbs 45–65 %, fat 20–35 % of the energy. When losing weight, more protein (about 1.2–1.6 g per kg — per kg of a healthy weight if you're heavier) keeps muscle and keeps you full: Higher protein is a good start. Hover a row for what it's for.
USDA FoodData Central (generic foods, ≈ 13 700, nutrients per 100 g + household portions) — the add form searches it as you type.
{% else %}Not installed: build dash_data/food/foods.db on the PC with python3 plugins/food/fdc.py <FoodData_Central_csv zip> foods.db and copy it there.
{% endif %}