mirror of
https://github.com/alexhopeoconnor/arduino-home-assistant.git
synced 2026-10-04 02:48:13 +10:00
2.4 KiB
2.4 KiB
ArduinoHA examples
Each directory is an Arduino sketch. Start with the network example matching your board, then pick an entity example from the table. Copy credentials into your local development configuration; do not commit them in a sketch.
| Starting point | Use it for |
|---|---|
| nodemcu | Basic ESP8266 Wi-Fi and MQTT connection |
| nano33iot | Basic Arduino Nano 33 IoT connection |
| mqtt-with-credentials | MQTT authentication |
| mqtt-advanced | Custom MQTT subscriptions and publishing |
| availability | Per-entity availability |
| advanced-availability | Shared availability and MQTT Last Will |
Entity examples
| Example | Home Assistant behaviour |
|---|---|
| binary-sensor | Door/contact-style binary state |
| button | Press action |
| cover | Open, close, and stop commands |
| esp32-cam | ESP32 camera preview |
| fan | State and speed commands |
| hvac | Modes, power, and target temperature |
| led-switch | Basic writable switch |
| light | Brightness, colour temperature, and RGB |
| lock | Writable lock state |
| multi-state-button | Device triggers from a wall switch |
| multi-switch | Multiple writable switches |
| number | Writable numeric value |
| scene | Scene trigger |
| select | Writable option list |
| sensor | String state sensor |
| sensor-analog | Analog voltage measurement |
| sensor-integer | Integer uptime measurement |
| tag-scanner | RFID tag reporting |
The examples are intentionally small, not production firmware frameworks. For reusable Wi-Fi configuration, MQTT wiring, profiles, OTA, and migrations, use DeviceFramework in a consuming firmware.
See the entity guide and project overview.