commit
This commit is contained in:
parent
66c86df2a4
commit
6b4ea3f4ae
13 changed files with 819 additions and 375 deletions
|
@ -210,9 +210,12 @@ async fn manage_knob(path: KnobPath, config: KnobConfig, mut events: broadcast::
|
|||
loop {
|
||||
tokio::select! {
|
||||
Ok(volume_state) = volume_states.recv() => {
|
||||
entity_state = volume_state.entities_by_id().values().find(|entity| state_matches(&config.target, entity)).map(Arc::clone);
|
||||
update_knob_style(&entity_state);
|
||||
update_knob_value(&entity_state);
|
||||
let new_entity_state = volume_state.entities_by_id().values().find(|entity| state_matches(&config.target, entity)).map(Arc::clone);
|
||||
if entity_state != new_entity_state {
|
||||
entity_state = new_entity_state;
|
||||
update_knob_style(&entity_state);
|
||||
update_knob_value(&entity_state);
|
||||
}
|
||||
}
|
||||
|
||||
Ok((event_path, event)) = events.recv() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue