Rust client for controlling SwitchBot devices.
Set SWITCHBOT_TOKEN to your API token, then:
let switchbot = switchbot_api2::SwitchBot::new_from_env()?;
for d in switchbot.get_devices().await? {
println!("{}: {:?}", d.name, switchbot.get_status(&d).await?);
}See examples and docs for more.
π Supported Devices
| Device | π‘οΈ | π¦ | π |
|---|---|---|---|
| Hub 2 | β | β | - |
| Indoor/Outdoor Thermo-Hygrometer | β | β | β |
π Supported APIs
| API | π‘οΈ | π¦ | π |
|---|---|---|---|
| Temperature | β | - | - |
| Humidity | - | β | - |
| Battery | - | - | β |
| Climate | β | β | - |
Pull requests for new device types or anything else are welcome!