Skip to content

Commit f3edfbf

Browse files
committed
Update generateNewSupportedDevices.js
1 parent d701d96 commit f3edfbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/generateNewSupportedDevices.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
55

66

77
for (const line of text.split('\n')) {
8-
const model = zigbeeHerdsmanConverters.devices.find((d) => d.model === line);
8+
const [modelNumber, user] = line.split(',').map((t) => t.trim());
9+
const model = zigbeeHerdsmanConverters.devices.find((d) => d.model === modelNumber);
910
if (!model) throw new Error(`${line} does not exist`);
10-
console.log(`- \`${line}\` ${model.vendor} ${model.description}`);
11+
console.log(`- \`${modelNumber}\` ${model.vendor} ${model.description} (${user})`);
1112
}

0 commit comments

Comments
 (0)