Skip to content

Commit

Permalink
only use first sensor of each group for temp reporting (#2457)
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez authored Oct 16, 2023
1 parent 532ab91 commit edcd1a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ async fn get_temp() -> Result<Celsius, Error> {
.flat_map(|(_, v)| v.as_object())
.flatten()
.filter_map(|(k, v)| {
if k.ends_with("_input") {
// we have seen so far that `temp1` is always a composite reading of some sort, so we should just use that for each chip
if k.trim() == "temp1_input" {
v.as_f64()
} else {
None
Expand Down

0 comments on commit edcd1a3

Please sign in to comment.