Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(matter): add matter driver validation #385

Merged
merged 3 commits into from
Apr 18, 2024
Merged

Conversation

nozols
Copy link
Contributor

@nozols nozols commented Apr 17, 2024

No description provided.

@nozols nozols requested review from RobinBol and jeroenwienk April 17, 2024 11:32
Comment on lines +378 to +381
if (
(driver.matter.deviceVendorId === undefined && driver.matter.deviceProductName !== undefined) ||
(driver.matter.deviceVendorId !== undefined && driver.matter.deviceProductName === undefined)
) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deze waardes zijn optioneel (alleen voor bridged matter apparaten). Dus ze moeten allebei undefined zijn of allebei een waarde hebben.

lib/App/index.js Outdated
Comment on lines 385 to 391
const deviceJsExists = await this._fileExistsCaseSensitive(join('drivers', driver.id, 'device.js'));

if (deviceJsExists) {
throw new Error(`drivers.${driver.id}: using a device.js file is not supported for Matter drivers.`);
}

const driverJsExists = await this._fileExistsCaseSensitive(join('drivers', driver.id, 'driver.js'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik denk dat dit niet lekker gaat werken we hebben sowieso al .ts en straks ook .mjs. Misschien maar gewoon niet doen deze error?

@nozols nozols merged commit 31c97b0 into develop Apr 18, 2024
2 checks passed
@nozols nozols deleted the feature/matter-drivers branch April 18, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants