switchbot-api2

Crates.ioswitchbot-api2
lib.rsswitchbot-api2
version0.2.2
created_at2025-06-04 16:07:44.594762+00
updated_at2025-06-04 16:17:58.710778+00
descriptionSwitchBot device control
homepage
repositoryhttps://github.com/calder/switchbot
max_upload_size
id1700581
size55,628
Calder Coalson (calder)

documentation

https://docs.rs/switchbot-api2

README

🤖 SwitchBot

Documentation Latest Version

Rust client for controlling SwitchBot devices.

🛠️ Basic Usage

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 -

❤️ Contributing

Pull requests for new device types or anything else are welcome!

Commit count: 2

cargo fmt