| orphan | true |
|---|
the current `src/emhass/...` tree. Do NOT leave `path.py:LINE` placeholders in
a merged recipe — reviewers will reject.
- Anchor recipe Config + Snippet content against `src/emhass/utils.py`
(`treat_runtimeparams`), `src/emhass/optimization.py`, or
`src/emhass/data/config_defaults.json`.
B. Length and array-size discipline
- Whenever a Snippet builds an array passed to EMHASS (load_cost_forecast,
prod_price_forecast, etc.), include either a runtime length-check OR an
in-code comment stating the expected length (= horizon_steps). EMHASS
silently pads / truncates mismatched arrays.
C. Transport tagging - Mark every Snippet with which transport stack it was tested on (e.g. Node-RED 3.x, Home Assistant 2024.x, AppDaemon Y.Z). Mark untested variants explicitly: "untested — contribution welcome".
D. Stepwise structure - Use the Step-1 / Step-2 / ... format below. Each step is small (one node / one config block / one validation pass), has narrative explaining WHY, shows the code, and ends with "Expected: ..." stating what the reader should see after this step.
E. Length cap - Keep total length under ~250 lines including code blocks. If you need more, consider splitting into two recipes (e.g. basic + advanced variant).
F. File naming - Pattern: .md (e.g. transport_nodered_mpc_orchestration.md, tariff_tibber_dynamic.md). - Category is one of: ev / dhw / heatpump / battery / forecast / tariff / transport. Use transport for stack-orchestration recipes (Node-RED MPC driver, watchdog, MQTT publishing patterns, EVCC/HA adapters). - If a recipe is transport-agnostic, omit the transport segment and use _.md (e.g. battery_aware_runtime_params.md, forecast_pv_resilience.md). -->
One sentence — what does this recipe achieve?
- EMHASS version: e.g. ≥ X.Y
- Config flags / runtime env required (one per line)
- Transport stack tested against: e.g. Node-RED 3+, Home Assistant Core ≥ 2024.x, EVCC ≥ 0.x, etc.
Narrative — what static keys must be set before this recipe makes sense.
# EMHASS config keys, runnable as-isExpected: your EMHASS instance restarts cleanly with these keys present.
Narrative — what this step adds and why.
// integration code, runnable, source-verifiedExpected: msg.payload (or equivalent) now contains <x> after this step.
Narrative + code + Expected. Repeat as needed (Step 4, Step 5, ...).
- Known limit one
- Known limit two
- Edge case when X
- Pattern from Discussion #NNN (@handle)
- Prior art:
docs/study_cases/...md - Field names verified against
src/emhass/utils.py:treat_runtimeparamson YYYY-MM-DD