Skip to content

Commit

Permalink
fix: Replace space with underscore in zwave events names
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Jan 20, 2020
1 parent 09cc9c7 commit 68f7e45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function init (config, zwave, mqtt) {
* Catch all Zwave events
*/
function onEvent (name, ...args) {
var topic = this.mqtt.eventsPrefix + '/' + this.mqtt.clientID + '/' + name
var topic = this.mqtt.eventsPrefix + '/' + this.mqtt.clientID + '/' + name.replace(/\s/g, '_')
this.mqtt.publish(topic, {data: args}, { qos: 1, retain: false })
}

Expand Down

0 comments on commit 68f7e45

Please sign in to comment.