AudioSetup now takes the name of two already created devices and stores a reference to the devices instead of creating and owning the devices directly
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -62,8 +62,15 @@ async fn app() -> anyhow::Result<()> {
|
||||
|
||||
// Create all the devices specified in the config
|
||||
for (id, device_config) in config.devices {
|
||||
let device =
|
||||
device_config.create(&id, &event_channel, &client, &config.presence.mqtt.topic)?;
|
||||
let device = device_config
|
||||
.create(
|
||||
&id,
|
||||
&event_channel,
|
||||
&client,
|
||||
&config.presence.mqtt.topic,
|
||||
&device_manager,
|
||||
)
|
||||
.await?;
|
||||
|
||||
device_manager.add(device).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user