Skip to content

Commit

Permalink
fix {status:...}
Browse files Browse the repository at this point in the history
  • Loading branch information
MiRo1310 committed Oct 22, 2023
1 parent 1c0e64f commit dd2b734
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ You can create different groups with separate menus, and then assign users to th

<!--
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->

### **WORK IN PROGRESS**

- fix {status:...}

### 0.8.1 (2023-10-22)

- hotfix, submenu switch
Expand Down
3 changes: 2 additions & 1 deletion lib/js/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ async function checkStatusInfo(_this, text) {
.replace(/'/g, "");
const value = await _this.getForeignStateAsync(id);
_this.log.debug(JSON.stringify({ id: id, val: value.val }));
if ((value && value.val) || value.val === 0) {
if ((value && value.val) || value.val === 0 || value.val == false || value.val == "false") {
console.log("test");
text = text.replace(text.slice(startindex, text.indexOf("}", startindex) + 1), value.val);
} else _this.log.debug("Error getting Value from " + JSON.stringify(id));
}
Expand Down

0 comments on commit dd2b734

Please sign in to comment.