You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::time::Duration;
use yeelib_rs::{
fields::{PowerStatus, Transition},
YeeClient,
};
fn main() {
let client = YeeClient::new().expect("init fail");
let mut all_lights = client.find_lights(Duration::from_secs(10));
println!("{:?}", all_lights);
let light = all_lights.get_mut(0).expect("no light");
match light.power() {
PowerStatus::Off => light
.set_power(PowerStatus::On, Transition::sudden())
.and_then(|_| light.set_bright(50, Transition::sudden()))
.and_then(|_| light.set_ct_abx(3500, Transition::sudden()))
.expect("light on fail"),
PowerStatus::On => light
.set_power(PowerStatus::Off, Transition::sudden())
.expect("light off fail"),
};
}
here all_lights always comes back as empty. It used to work previously, and I have another android app that works over the local network and can find the devices
The text was updated successfully, but these errors were encountered:
Hey @ryanhossain9797, I wrote this as a side-project to learn Rust a while ago but never completed it. I don't have access to Yeelight devices currently so unfortunately I can't troubleshoot the issue here. Please free to fork the library and complete it if you want!
I'm trying to run the below snippet
here
all_lights
always comes back as empty. It used to work previously, and I have another android app that works over the local network and can find the devicesThe text was updated successfully, but these errors were encountered: