Contributing¶
If the behavior of this library does not fit your needs, or you want to improve it, or add features: please make a pull request.
Adding or changing a component¶
- Check the component page on home-assistant.io: the doc page is the source of truth for which options are
RequiredvsOptional. - Add or update the component class in
src/MycilaHADiscovery.h, following the existing conventions: - Required topics are constructor arguments; optional topics are
std::stringfields - Add an id-only constructor (
X(std::string id)) so entities can be removed withunpublish<X>(id)alone - Payloads and templates are borrowed
const char* - Values whose omission lets Home Assistant apply its default are
std::optionaland are not emitted when unset - Validate every JSON key you emit against Home Assistant's abbreviation list.
- Build an example with
pio run -e ci-arduino-3and runcpplintas configured in the CI workflow. - Update the matching page under
docs/components/.
Documentation¶
The website is built with mkdocs-material from this repository (mkdocs.yml + docs/), and published to GitHub Pages by the website.yml workflow. To preview locally: