timrogers / litra-rs

💡 Control your Logitech Litra light from the command line
MIT License
35 stars 4 forks source link

`Litra::get_connected_devices` returns a cached list of devices that is never updated #108

Closed timrogers closed 2 days ago

timrogers commented 2 days ago

When using the library from Rust code, the Litra context (returned by Litra::new()) holds a cached list of connected devices which is never updated.

There is no way to update this list when a new device is connected or an existing device is disconnected, other than instantiating a new context.

We should allow the list of cached devices to be refreshed, and make it clear that the list is cached.

Kudos to @aeirola for spotting this in an issue in litra-autotoggle!