From 8b5c6d1e9bedfc159343fb51d9f1e76d34a2f05c Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Fri, 25 Oct 2019 19:18:38 +0200 Subject: [PATCH] Add configuration for MQTT user and password in different file. https://github.com/Koenkk/zigbee2mqtt/issues/2201 --- docs/configuration/configuration.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 843975e84b640..df2e01ef9792c 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -159,3 +159,20 @@ groups: groups.yaml friendly_name: group_1 retain: true ``` + +## Specifying MQTT user and password in a different file +To specify the MQTT user and password in a different file, e.g `secret.yaml`, use the following configuration. + +**configuration.yaml** +```yaml +mqtt: + # IMPORTANT: Don't forget the quotes! + user: '!secret user' + password: '!secret password' +``` + +**secret.yaml** +```yaml +user: mqtt_user +password: mqtt_password +``` \ No newline at end of file