When the wasmachine is executing it uses more than 0,8 i like it to be red.
I added the following code to custom.js.
When the machine is activate (and a washing program it uses more power then 0,8 ... but the switch does not get red...
Code: Select all
//add custom javascript in here
function afterGetDevices(){
}
// 1 powerusage then red
function getChange_982_1(idx,value,device){
if(parseFloat(device['Power Usage'])>1){
blocks['982_1']['icon'] = 'fas fa-thermometer-full';
}
else {
blocks['982_1']['icon'] = 'fas fa-thermometer-half';
}
}
DateTime,"Energieverbruik","Power Usage"
2019-07-12 19:00:00,0,0,7
2019-07-12 19:05:00,,0,7
2019-07-12 19:10:00,,0,7
2019-07-12 19:15:00,,0,7
2019-07-12 19:20:00,,0,6
xls
DateTime Energieverbruik Power Usage Energieverbruik Power Usage
12-7-2019 19:00 0,00
12-7-2019 19:05 0,70
12-7-2019 19:10 0,70
12-7-2019 19:15 0,70
12-7-2019 19:20 0,60
12-7-2019 19:25 0,70
12-7-2019 19:30 0,70
12-7-2019 19:35 0,70