How to use the zigbee2mqtt/node_modules/zigbee-shepherd-converters.devices function in zigbee2mqtt

To help you get started, we’ve selected a few zigbee2mqtt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Koenkk / zigbee2mqtt.io / docgen / docgen.js View on Github external
const fs = require('fs');
const path = require('path');
const devices = require('zigbee2mqtt/node_modules/zigbee-shepherd-converters').devices;
const utils = require('./utils');

const base = path.join(__dirname, '..', 'docs');

const supportDevices = require('./supported-devices');
const devicePage = require('./device_page');

fs.writeFileSync(path.join(base, 'information', 'supported_devices.md'), supportDevices);

// Clean devices directory
for (const file of fs.readdirSync(path.join(base, 'devices'))) {
    fs.unlinkSync(path.join(base, 'devices', file));
}

devices.forEach((device) => {
    const file = path.join(base, 'devices', `${utils.normalizeModel(device.model)}.md`);
github Koenkk / zigbee2mqtt.io / docgen / integrating-with-homeassistant.js View on Github external
/**
 * This script generates the integrating-with-homeassistant page.
 */

const devices = require('zigbee2mqtt/node_modules/zigbee-shepherd-converters').devices;
const HomeassistantExtension = require('zigbee2mqtt/lib/extension/homeassistant');
const homeassistant = new HomeassistantExtension(null, null, null, null);
const YAML = require('json2yaml');

let template = `# Home Assistant

*NOTE 1: This file has been generated, do not edit this file manually!*

*NOTE 2: If you are using the [Zigbee2mqtt Hass.io add-on](https://github.com/danielwelch/hassio-zigbee2mqtt)
use their documentation*


## MQTT discovery
**At least Home Assistant >= 0.84 is required!**

**NOTE:** Groups are not auto-discovered, see configuration below.