embassy-ha
MQTT Home Assistant integration library for the Embassy async runtime.
Features
- Support for multiple entity types: sensors, buttons, switches, binary sensors, numbers, device trackers
- Built on top of Embassy's async runtime for embedded systems
- No-std compatible
- Automatic MQTT discovery for Home Assistant
- No runtime allocation
Installation
Quick Start
This example does not compile as-is because it requires device-specific setup, but it should be easy to adapt if you already have Embassy running on your microcontroller.
use Spawner;
use ;
use Timer;
use StaticCell;
static HA_RESOURCES: = new;
async
async
Examples
The repository includes several examples demonstrating different entity types. To run an example:
Available examples:
sensor- Temperature and humidity sensorsbutton- Triggerable button entityswitch- On/off switch controlbinary_sensor- Binary state sensornumber- Numeric input entitydevice_tracker- Location tracking entity
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.