Skip to content

Commit

Permalink
boolean value fix for output templates
Browse files Browse the repository at this point in the history
  • Loading branch information
harriedegroot committed May 14, 2021
1 parent bd1f7d2 commit 85e788c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/device/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class MQTTDevice extends Homey.Device {

const topic = config.setTopic;
let payload = capabilityId === 'onoff'
? formatOnOff(value, this.onOffValues)
? (config.outputTemplate ? value : formatOnOff(value, this.onOffValues))
: formatValue(value, CAPABILITIES[capabilityId], this.percentageScale);

// output template?
Expand Down

0 comments on commit 85e788c

Please sign in to comment.