Skip to content

Commit

Permalink
Merge pull request #393 from athombv/master
Browse files Browse the repository at this point in the history
Merge master into production (#minor)
  • Loading branch information
RobinBol authored May 7, 2024
2 parents 4ec598f + 1eabe59 commit c43a3d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/app/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,8 @@
"enum": [
"nfc",
"speaker",
"ledring"
"ledring",
"matter"
]
}
},
Expand Down
11 changes: 11 additions & 0 deletions lib/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,17 @@ class App {
throw new Error(`drivers.${driver.id} Matter drivers require 'connectivity' to include 'matter'.`);
}
}

const allDriversMatter = appJson.drivers.every(driver => driver.connectivity && driver.connectivity.includes('matter'));
const hasPlatformRequiredFeatureMatter = appJson.platformLocalRequiredFeatures && appJson.platformLocalRequiredFeatures.includes('matter');

if (allDriversMatter && !hasPlatformRequiredFeatureMatter) {
console.warn('Warning: all drivers have connectivity: matter, but matter is not set as a platform required feature.');
}

if (!allDriversMatter && hasPlatformRequiredFeatureMatter) {
console.warn('Warning: matter is set as a platform required feature, but not all drivers have connectivity: matter.');
}
}

// validate `appJson.capabilities`
Expand Down

0 comments on commit c43a3d9

Please sign in to comment.