Contributing¶
Contributions are welcome. Please open an issue first to discuss what you'd like to change, unless it is a straightforward bug fix.
Translations¶
Eight languages ship with the integration: English, French, German, Dutch, Spanish, Italian, Portuguese, Polish. Translations cover all 150+ entity names, config flow strings, state labels, and attribute keys.
To add a new language:
1. Copy custom_components/ws_core/translations/en.json to a new file named with
the BCP-47 language tag
(e.g. zh.json for Simplified Chinese, sv.json for Swedish)
2. Translate all values. Keys must not change.
3. Open a PR
Languages most needed: Chinese (Simplified), Japanese, Korean, Czech, Swedish, Norwegian, Finnish, Danish, Turkish.
Bug reports¶
Use the GitHub issue template. Include: - Your HA version and ws_core version - Diagnostics export (Settings → Devices & Services → Weather Station Core → ⋮ → Download Diagnostics) - Relevant log entries with debug logging enabled
Weather station compatibility¶
If your station brand needs special entity handling (non-standard device class, unusual unit, etc.), open an issue with your entity IDs and the output of Developer Tools → States filtered to your station entities.
New forecast providers¶
The forecast provider system is pluggable. To add a new provider:
- Create
custom_components/ws_core/providers/your_provider.py - Subclass
ForecastProviderfrombase.py - Implement
async_fetch(session, lat, lon, api_key=None)returning the normalised 7-day daily + 24h hourly format documented inbase.py - Add one line to
providers/__init__.py:"your_id": YourProvider - Add display names to
strings.jsonand alltranslations/*.jsonunderforecast_providerselector options
Open a PR. Include a note on whether the provider requires an API key and any rate-limiting constraints.
Development setup¶
Run tests:
Run linting:
CI runs automatically on PRs to main. All six jobs must pass: hassfest, HACS
validation, lint, tests, no-bytecode, and version consistency.
Code conventions¶
- Follow the existing code style (ruff enforces it)
- New sensors go in
sensor.pywith aWSSensorDescriptionentry - New algorithm code goes in
algorithms.py - New coordinator keys go in
const.pyasKEY_*constants - New feature toggles need:
const.pyCONF_*+DEFAULT_*,switch.pyentry,strings.jsontranslation,en.jsontranslation, coordinator guard - All PRs need: passing CI, no new lint warnings, and a CHANGELOG entry under
## Unreleased(or the correct version section)
License¶
MIT. Contributions are accepted under the same license.