use sysinfo::Components;

pub fn get(components: &Components) -> Option<f32> {
    for comp in components.list() {
        let label = comp.label().to_lowercase();
        if label.contains("core 0") || label.contains("cpu") || label.contains("tdie") {
            return Some(comp.temperature());
        }
    }
    None
}
