Skip to content

Commit

Permalink
settingsValue decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
Standarduser committed Feb 8, 2025
1 parent 3277978 commit e2eee07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ The widgets are designed for VIS 1.x.
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**

* hkt-settings-value: added format options for decimals

### 0.4.1 (2025-02-08)

* All tiles: added icon for state off
Expand Down
4 changes: 2 additions & 2 deletions widgets/vis-homekittiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@
</div>
</div>
</div>'
data-vis-attrs="description/custom,vis-homekittiles.infoText,hktSettingsValue;oid/id;label[Value];unit;"
data-vis-attrs="description/custom,vis-homekittiles.infoText,hktSettingsValue;oid/id;label[Value];unit;decimals[1];factor[1];comma[true]/checkbox;tdp/checkbox;"
data-vis-attrs0="group.increment;incrementPlusShow[true]/checkbox;incrementMinusShow[true]/checkbox;incrementPlusValue[1];incrementMinusValue[-1];incrementValueMax[100];incrementValueMin[0];"
data-vis-attrs1="group.blockOperation;blockOperationIfTrue/checkbox;blockOperationIfFalse/checkbox;blockOperationShowDisabled/checkbox;blockOperationShowIcon/checkbox/addBlockOperationShowHideInputfields();blockOperationIcon/image;blockOperationIconNotInEditor/checkbox;blockOperationUseDifferentOID/checkbox/addBlockOperationShowHideInputfields();oidBlockOperation/id;"
>
Expand All @@ -1030,7 +1030,7 @@
<% } %>

<div class="value">
<%== vis.states.attr(this.data['oid'] + '.val') %><%= this.data.attr('unit') %>
<%= vis.binds['vis-homekittiles'].formatValue(vis.states.attr(data.oid + '.val'), this.data.attr('decimals'), this.data.attr('factor'), this.data.attr('comma'), this.data.attr('tdp')) %><%= this.data.attr('unit') %></span>
</div>

<% if (this.data.attr('incrementPlusShow')) { %>
Expand Down

0 comments on commit e2eee07

Please sign in to comment.