Skip to content

Commit

Permalink
fix: deserialize scene UUIDs in scene list responses
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaka91 committed Jun 3, 2024
1 parent 36af6a8 commit ceeadb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/iter_scenes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() -> Result<()> {
for scene in scene_list.scenes.iter().cycle() {
client
.scenes()
.set_current_program_scene(&*scene.name)
.set_current_program_scene(&scene.id)
.await?;
tokio::time::sleep(Duration::from_secs(1)).await;
}
Expand Down
6 changes: 3 additions & 3 deletions src/responses/scenes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ pub struct Scenes {
/// Response value for [`crate::client::Scenes::list`] as part of [`Scenes`].
#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub struct Scene {
/// Name of the scene.
#[serde(rename = "sceneName")]
pub name: String,
/// Identifier of the scene.
#[serde(flatten)]
pub id: SceneId,
/// Positional index in the list of scenes.
#[serde(rename = "sceneIndex")]
pub index: usize,
Expand Down

0 comments on commit ceeadb4

Please sign in to comment.