mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 18:39:09 -07:00
19 lines
674 B
JavaScript
19 lines
674 B
JavaScript
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
|
|
const settings = require('../util/settings');
|
|
const Extension = require('./extension');
|
|
const utils = require('../util/utils');
|
|
|
|
class ExternalConverters extends Extension {
|
|
constructor(zigbee, mqtt, state, publishEntityState, eventBus) {
|
|
super(zigbee, mqtt, state, publishEntityState, eventBus);
|
|
|
|
for (const definition of utils.getExternalConvertersDefinitions(settings)) {
|
|
const toAdd = {...definition};
|
|
delete toAdd['homeassistant'];
|
|
zigbeeHerdsmanConverters.addDeviceDefinition(toAdd);
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = ExternalConverters;
|