mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
only use first sensor of each group for temp reporting (#2457)
This commit is contained in:
@@ -588,7 +588,8 @@ async fn get_temp() -> Result<Celsius, Error> {
|
|||||||
.flat_map(|(_, v)| v.as_object())
|
.flat_map(|(_, v)| v.as_object())
|
||||||
.flatten()
|
.flatten()
|
||||||
.filter_map(|(k, v)| {
|
.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()
|
v.as_f64()
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|||||||
Reference in New Issue
Block a user