Update docgen for homeassistant.

This commit is contained in:
Koenkk
2018-06-13 20:28:35 +02:00
parent b3108a26d0
commit b0cdcf2e21
+17 -7
View File
@@ -47,16 +47,26 @@ fs.writeFileSync(outputdir + '/' + file, text);
file = 'Integrating-with-Home-Assistant.md';
text = '*NOTE: Automatically generated by `npm run docgen`*\n\n';
text += 'If you\'re hosting zigbee2mqtt using [this hassio addon-on](https://github.com/danielwelch/hassio-zigbee2mqtt) use their documentation on how to configure.\n\n'
text += 'The easiest way to integrate zigbee2mqtt with Home Assistant is by using [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/).'
text += ' To enable MQTT discovery set `homeassistant: true` in your zigbee2mqtt `configuration.yaml` and add the following to your Home Assistant `configuration.yaml`.\n'
text += '```yaml\n'
text += 'mqtt:\n'
text += ' discovery: true\n'
text += '```\n'
text += 'The easiest way to integrate zigbee2mqtt with Home Assistant is by using [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/).\n\n'
text += 'To achieve the best possible integration (including MQTT discovery):\n';
text += '- In your **zigbee2mqtt** `configuration.yaml` set `homeassistant: true`\n'
text += '- In your **Home Assistant** `configuration.yaml`:\n';
text += '```yaml';
text += 'mqtt:';
text += ' discovery: true';
text += ' broker: [YOUR MQTT BROKER]';
text += ' birth_message:';
text += ` topic: 'hass/status'`;
text += ` payload: 'online'`;
text += ' will_message:';
text += ` topic: 'hass/status'`;
text += ` payload: 'offline'`;
text += '```';
text += '\n\n'
text += 'To respond to button clicks you can use the following Home Assistant configuration:\n'
text += 'To respond to button clicks (e.g. WXKG01LM) you can use the following Home Assistant configuration:\n'
text += '```yaml'
text += `
automation: