diff options
| author | diogo464 <[email protected]> | 2025-12-09 22:21:44 +0000 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-12-09 22:21:44 +0000 |
| commit | fc57d8583a578df9565d3143108504b1a21fd1b7 (patch) | |
| tree | 319626d2a8d579f95154ecace32d1e41fe3ef9d5 /src | |
| parent | fafbda512ff81825e3e43925d7f6225dd4918528 (diff) | |
added some documentation
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -1,3 +1,16 @@ | |||
| 1 | //! Home Assistant MQTT device library for embassy. | ||
| 2 | //! | ||
| 3 | //! To create a device use the [`new`] function. | ||
| 4 | //! After the device is created you should create one or more entities using functions such as | ||
| 5 | //! [`create_button`]/[`create_sensor`]/... | ||
| 6 | //! | ||
| 7 | //! Once the entities have been created either [`run`] or [`connect_and_run`] should be called in a | ||
| 8 | //! seperate task. | ||
| 9 | //! | ||
| 10 | //! There are various examples you can run locally (ex: `cargo run --features tracing --example | ||
| 11 | //! button`) assuming you have a home assistant instance running. To run the examples the | ||
| 12 | //! environment variable `MQTT_ADDRESS` should be set to the mqtt server used by home assistant. | ||
| 13 | |||
| 1 | #![no_std] | 14 | #![no_std] |
| 2 | 15 | ||
| 3 | use core::{ | 16 | use core::{ |
