fix(sensors): numeric parser anchors on degree symbol (label-digit bug) [#618]

This commit is contained in:
2026-09-01 18:22:52 -05:00
parent 6c8f839eaa
commit 133b68ab40
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ numeric_pick() {
[[ "$pick" =~ $num_re ]] && { printf '%s\n' "$pick"; return 0; }
done
if [[ -n "$native" ]]; then
pick="$(grep -oE '\-?[0-9]+(\.[0-9]+)?' <<<"$native" | head -1)"
pick="$(grep -oE "\-?[0-9]+(\.[0-9]+)?°C" <<<"$native" | head -1)"; pick="${pick%°C}"
[[ "$pick" =~ $num_re ]] && { printf '%s\n' "$pick"; return 0; }
fi
return 1