Subtract one from the returned pHTank value
When I checked this yesterday, my IntelliChem was set to 5/6, but the module was showing 100%. So maybe the API returns it on a 1-7 scale instead of a 0-6 scale or something? I don't know. Let's try this.
This commit is contained in:
@ -85,7 +85,7 @@ Module.register('MMM-ScreenLogic',{
|
||||
if (this.config.showPH) {
|
||||
let dataStr = poolData.status.pH
|
||||
if (this.config.showPHTankLevel) {
|
||||
let percent = Math.round((poolData.status.pHTank / this.config.pHTankLevelMax) * 100)
|
||||
let percent = Math.round(((poolData.status.pHTank - 1) / this.config.pHTankLevelMax) * 100)
|
||||
let progBarDiv = `<div class="progress vertical">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="${percent}" aria-valuemin="0" aria-valuemax="100" style="width: ${percent}%;">
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user