Skip to content

Commit

Permalink
fix: Template value
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Jan 31, 2020
1 parent e1f61f8 commit 0db8d89
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 @@ -641,7 +641,7 @@ Gateway.prototype.publishDiscovery = function (hassDevice, nodeId, deleteDevice,

if (this.config.payloadType === 2) { // Payload is set to "Just Value"
var p = hassDevice.discovery_payload
var template = 'value' + (p.hasOwnProperty('payload_on') && p.hasOwnProperty('payload_off') ? ' | bool' : '')
var template = 'value' + (p.hasOwnProperty('payload_on') && p.hasOwnProperty('payload_off') ? ' == \'true\'' : '')

for (const k in p) {
if (typeof p[k] === 'string') {
Expand Down

0 comments on commit 0db8d89

Please sign in to comment.