diff --git a/src/homeassistant.rs b/src/homeassistant.rs index 10ea47f..795a637 100644 --- a/src/homeassistant.rs +++ b/src/homeassistant.rs @@ -226,8 +226,11 @@ impl HomeAssistant { let artist = attributes["media_artist"].as_str().unwrap_or("No artist"); let title = attributes["media_title"].as_str().unwrap_or("No title"); let volume_raw = attributes["volume_level"].as_f64().unwrap_or(-1.); + let is_muted = attributes["is_volume_muted"].as_bool().unwrap_or(false); - let volume = if volume_raw >= 0. { + let volume = if is_muted { + String::from("[ ﱝ ]") + } else if volume_raw >= 0. { format!("[{:3.0}%] ", volume_raw * 100.) } else { String::new()