Allow spaces in MQTT device commands (for friendly names with spaces in it). #86

This commit is contained in:
Koenkk
2018-06-03 00:42:15 +02:00
parent 95f21947fc
commit a8dca627d9
+2 -2
View File
@@ -8,8 +8,8 @@ const objectAssignDeep = require(`object-assign-deep`);
const debug = require('debug')('zigbee2mqtt:controller');
const mqttConfigRegex = new RegExp(`${settings.get().mqtt.base_topic}/bridge/config/\\w+`, 'g');
const mqttDeviceRegex = new RegExp(`${settings.get().mqtt.base_topic}/\\w+/set`, 'g');
const mqttDevicePrefixRegex = new RegExp(`${settings.get().mqtt.base_topic}/\\w+/\\w+/set`, 'g');
const mqttDeviceRegex = new RegExp(`${settings.get().mqtt.base_topic}/[\\w\\s\\d]+/set`, 'g');
const mqttDevicePrefixRegex = new RegExp(`${settings.get().mqtt.base_topic}/[\\w\\s\\d]+/[\\w\\s\\d]+/set`, 'g');
const pollInterval = 60 * 1000; // seconds * 1000.
const softResetTimeout = 3600 * 1000; // seconds * 1000.