|
| 1 | +# Copilot instructions for `ha-victron-mqtt` |
| 2 | + |
| 3 | +This is a Home Assistant custom integration that wraps the `victron_mqtt` library. |
| 4 | + |
| 5 | +## Workflow — things NOT to do |
| 6 | + |
| 7 | +- **Never commit or push before the user reviews.** Do not run `git commit`, `git push`, |
| 8 | + create tags, or open PRs unless the user has explicitly reviewed the change and asked you to. |
| 9 | + Make the edits and stop so they can review. |
| 10 | +- **Do not skip verification checks** (`--no-verify`, `commit skip checks`, etc.) unless the |
| 11 | + user explicitly asks for it. |
| 12 | +- **Do not perform hard-to-reverse git actions** (force-push, `reset --hard`, amending pushed |
| 13 | + commits, deleting branches/tags) without explicit confirmation. |
| 14 | + |
| 15 | +## Vendored `victron_mqtt` library |
| 16 | + |
| 17 | +- Code under `custom_components/victron_mqtt/_vendor/` is a **vendored copy** of the upstream |
| 18 | + `victron_mqtt` repo. **Do not make functional changes here.** |
| 19 | +- Fixes and features for that library belong in the **source `victron_mqtt` repository**, then |
| 20 | + get re-vendored/synced into this repo (typically via an "Update victron_mqtt to X" commit). |
| 21 | +- Only touch integration code **outside** `_vendor/` to adapt to the library. |
| 22 | +- (A scoped rule in `.github/instructions/vendored-victron-mqtt.instructions.md` enforces this |
| 23 | + when editing files under `_vendor/`.) |
| 24 | + |
| 25 | +## Tests |
| 26 | + |
| 27 | +- **Tests only run on Linux or in the devcontainer**, where the Home Assistant dependencies can |
| 28 | + be installed. **When working from Windows, skip running the tests** — the HA dependencies |
| 29 | + cannot be installed there. Do not attempt to run the suite on Windows. |
| 30 | +- **Do not reintroduce snapshot tests.** Snapshots were intentionally removed because they keep |
| 31 | + breaking with Home Assistant core changes. Prefer behavior-based tests. |
| 32 | +- On Linux/devcontainer, run the test suite and make sure it passes before declaring work done, |
| 33 | + but still do not commit without review. |
| 34 | + |
| 35 | +## Versioning & releases |
| 36 | + |
| 37 | +- The integration version lives in `custom_components/victron_mqtt/manifest.json` and follows a |
| 38 | + calendar pattern (`YYYY.M.P`, e.g. `2026.7.3`). |
| 39 | +- Version bumps are a **separate, user-initiated step** ("Bump version to ...") — do not bump the |
| 40 | + version as part of unrelated changes unless asked. |
| 41 | + |
| 42 | +## Deployment |
| 43 | + |
| 44 | +- Deploying to a live Home Assistant instance is done via the provided VS Code tasks |
| 45 | + ("Deploy to Home Assistant to container" / "...to test environment", which `scp` the |
| 46 | + `custom_components/victron_mqtt/` folder). Do not invent alternative deploy mechanisms. |
0 commit comments