| Crates.io | switchbot-api2 |
| lib.rs | switchbot-api2 |
| version | 0.2.2 |
| created_at | 2025-06-04 16:07:44.594762+00 |
| updated_at | 2025-06-04 16:17:58.710778+00 |
| description | SwitchBot device control |
| homepage | |
| repository | https://github.com/calder/switchbot |
| max_upload_size | |
| id | 1700581 |
| size | 55,628 |
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.
| Device | 🌡️ | 💦 | 🔋 |
|---|---|---|---|
| Hub 2 | ✅ | ✅ | - |
| Indoor/Outdoor Thermo-Hygrometer | ✅ | ✅ | ✅ |
| API | 🌡️ | 💦 | 🔋 |
|---|---|---|---|
| Temperature | ✅ | - | - |
| Humidity | - | ✅ | - |
| Battery | - | - | ✅ |
| Climate | ✅ | ✅ | - |
Pull requests for new device types or anything else are welcome!