Skip to content

Commit

Permalink
Fix range of temperature-measurement sample to be reasonable (#30861)
Browse files Browse the repository at this point in the history
* Fix range of temperature-measurement sample to be reasonable

- Prior range defaults were invalid (min was -327.68C which is impossible)
- Prior default temperature was also -327.68C which broke on several ecosystems
  that deny bogus temperatures.
- Changing default range to be -85C to 99C
- Change default temp to be 24.51C

This makes the sample work better out of the box.

Tested on ESP32-S3 w/ Google ecosystem

* Update .matter
  • Loading branch information
tcarmelveilleux authored Dec 7, 2023
1 parent 3785539 commit 4db8c38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1596,9 +1596,9 @@ endpoint 1 {
}

server cluster TemperatureMeasurement {
ram attribute measuredValue default = 0x8000;
ram attribute minMeasuredValue default = 0x8000;
ram attribute maxMeasuredValue default = 0x8000;
ram attribute measuredValue default = 2451;
ram attribute minMeasuredValue default = -8500;
ram attribute maxMeasuredValue default = 9900;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3135,7 +3135,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x8000",
"defaultValue": "2451",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -3151,7 +3151,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x8000",
"defaultValue": "-8500",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand All @@ -3167,7 +3167,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x8000",
"defaultValue": "9900",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down

0 comments on commit 4db8c38

Please sign in to comment.