zigbee2mqtt/support/verify-homeassistant-mapping.js

13 lines
409 B
JavaScript

// Verify that there are homeassistant mappings for every device.
const devices = require('zigbee-shepherd-converters').devices;
const homeassistant = require('../lib/homeassistant');
let failed = false;
devices.forEach((d) => {
if (!homeassistant.mapping[d.model]) {
console.error(`Missing homeassistant mapping for '${d.model}'`);
failed = true;
}
});
process.exit(failed ? 1 : 0);