mirror of
https://codeberg.org/icewind/taspromto.git
synced 2026-06-04 00:54:13 +02:00
skip devices without name
This commit is contained in:
parent
d93f1f91c1
commit
2d7f5f7920
1 changed files with 4 additions and 0 deletions
|
|
@ -143,6 +143,10 @@ pub fn format_device_state<W: Write>(
|
|||
state: &DeviceState,
|
||||
mi_temp_names: &BTreeMap<BDAddr, String>,
|
||||
) -> std::fmt::Result {
|
||||
if state.name.is_empty() {
|
||||
println!("{} has no name set, skipping", device.hostname);
|
||||
return Ok(());
|
||||
}
|
||||
if let Some(switch_state) = state.state {
|
||||
writeln!(
|
||||
writer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue