diff --git a/lib/controller.js b/lib/controller.js index 9a0f36e6d..80d1ad1f5 100644 --- a/lib/controller.js +++ b/lib/controller.js @@ -8,8 +8,9 @@ const homeassistant = require('./homeassistant'); const objectAssignDeep = require(`object-assign-deep`); const mqttConfigRegex = new RegExp(`${settings.get().mqtt.base_topic}/bridge/config/\\w+`, '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 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.