Crate switchbot_api2

Source
Expand description

§🤖 Switchbot

Rust client for controlling SwitchBot devices.

§Basic Usage

let switchbot = switchbot_api2::SwitchBot::new_from_env()?;
for d in switchbot.get_devices().await? {
    println!("{}: {:?}", d.name, switchbot.get_status(&d).await?);
}

Structs§

BatteryStatus
Battery status.
ClimateStatus
Climate status.
Device
A single device.
Devices
A list of devices.
Error
The Error type, a wrapper around a dynamic error type.
Hub2Status
Hub 2 status.
HumidityStatus
Humidity status.
IOThermoHygrometerStatus
Indoor/outdoor thermo-hygrometer status.
SwitchBot
SwitchBot client.
TemperatureStatus
Temperature status.

Enums§

Dev
Device type.
DevStatus
Device status.

Type Aliases§

Result
Result<T, Error>