Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mikakoivisto committed Jun 13, 2024
1 parent 0bf57dc commit 73f8d7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class App {
let id = `xiomi_${mac}_${disco.jsonAttribute}`;
let objectId = `${objectIdPrefix}${mac}_${disco.jsonAttribute}`;
let confTopic = `${config.homeassistantTopicPrefix}/sensor/${objectId}/config`;
let stateTopic = (disco.stateTopicPostfix && disco.stateTopicPostfix !== '') ? `${config.xiomiTopic}/${mac}/${stateTopicPostfix}` : `${config.xiomiTopic}/${mac}`;
let stateTopic = (disco.stateTopicPostfix && disco.stateTopicPostfix !== '') ? `${config.xiomiTopic}/${mac}/${disco.stateTopicPostfix}` : `${config.xiomiTopic}/${mac}`;
let deviceName = (measurement.name && measurement.name !== '') ? `${measurement.name}` : `Xiomi sensor ${mac.slice(-6)}`;
let name = (measurement.name && measurement.name !== '') ? `${measurement.name} ${disco.namePostfix}` : `${disco.namePostfix}`;
let valueTemplate = `{{ value_json.${disco.jsonAttribute}${disco.jsonAttributeMutator} | float | round(${disco.precision}) }}`;
Expand Down

0 comments on commit 73f8d7d

Please sign in to comment.