https://github.com/liamsnow/esphomebridge-rs
aioesphomeapi in Rust!
https://github.com/liamsnow/esphomebridge-rs
esp32 esphome rust
Last synced: about 1 month ago
JSON representation
aioesphomeapi in Rust!
- Host: GitHub
- URL: https://github.com/liamsnow/esphomebridge-rs
- Owner: LiamSnow
- License: apache-2.0
- Created: 2025-02-06T17:51:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-04T04:55:06.000Z (11 months ago)
- Last Synced: 2025-08-04T07:34:04.876Z (11 months ago)
- Topics: esp32, esphome, rust
- Language: Rust
- Homepage:
- Size: 81.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESPHome Bridge
A client API to interact with ESPHome devices (in the same way Home Assistant does).
The following features are **not** implemented:
- Bluetooth
- Voice Assistants
[aioesphomeapi](github.com/esphome/aioesphomeapi) was used a reference, but this
is not a one-to-one copy.
## Usage
Connect:
```rust
let dev = Device::new_noise("IP", "NOISE_PSK")?;
dev.connect().await?;
```
Print all buttons:
```rust
for e in &dev.entities.button {
println!("Button: {:#?}", e.1);
}
```
Turn on all lights:
```rust
for light in dev.entities.light {
let req = api::LightCommandRequest {
key: light.key,
has_state: true,
state: true
..Default::default()
};
dev.light_command(req).await?;
}
```
Turn on a light, given the entity name
```rust
let req = api::LightCommandRequest {
key: dev.get_light_key_from_name("rgbct_bulb")?,
has_state: true,
state: true
..Default::default()
};
dev.light_command(req).await?;
```
See [liamsnow.com](https://liamsnow.com/projects/esphomebridge-rs) for more.