Matter Sensor: Fix Global defintion and adjust unit tests#3125
Open
ctowns wants to merge 1 commit into
Open
Conversation
|
Invitation URL: |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 0255dd3 |
ctowns
force-pushed
the
bugfix/soil-moisture-unit-tests
branch
3 times, most recently
from
July 16, 2026 18:15
7b39d29 to
de74548
Compare
hcarter-775
reviewed
Jul 16, 2026
| -- The SOIL_MOISTURE MeasurementTypeEnum variant was added to the Global MeasurementTypeEnum | ||
| -- def in lua libs in api version 21 as a part of the fix for Shared and Global types. | ||
| if version.api < 21 then | ||
| clusters.SoilMeasurement = require "embedded_clusters.SoilMeasurement" |
Contributor
There was a problem hiding this comment.
should we be removing the soil version check?
Contributor
Author
There was a problem hiding this comment.
Whoops, must've deleted this while I was moving things around, added back
hcarter-775
reviewed
Jul 16, 2026
Comment on lines
+14
to
+15
| -- The SOIL_MOISTURE MeasurementTypeEnum variant was added to the Global MeasurementTypeEnum | ||
| -- def in lua libs in api version 21 as a part of the fix for Shared and Global types. |
Contributor
There was a problem hiding this comment.
Suggested change
| -- The SOIL_MOISTURE MeasurementTypeEnum variant was added to the Global MeasurementTypeEnum | |
| -- def in lua libs in api version 21 as a part of the fix for Shared and Global types. | |
| -- The SOIL_MOISTURE MeasurementTypeEnum variant was added to the Global MeasurementTypeEnum | |
| -- def in lua libs in api version 21 |
nit: I feel like this last part of the comment overcomplicates things
Contributor
Author
There was a problem hiding this comment.
Yeah I agree, removed.
ctowns
force-pushed
the
bugfix/soil-moisture-unit-tests
branch
from
July 16, 2026 19:19
de74548 to
0255dd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Checklist
Description of Change
Updates the embedded cluster definition to be using the same type that is expected from the lua libs.
Since the lua libs themselves did not have the
SOIL_MOISTUREenum variant until the API 21 release (FW62), this updates the API checks to make sure that drivers use the embedded cluster definition on hubs without those updated lua libs.Summary of Completed Tests