change block/device title when value changes
Posted: Wednesday 25 September 2019 21:09
Hi
I made a script that changes the block title when the state of the device changes
Problem is that the title does not change.
When the switch 1474 is On the title must be test1 and test2 when off...
function getChange_1474(idx,value,device){
if(parseFloat(device['state'])='On'){
blocks['1474']['title'] = 'test1';
}
else {
blocks['1474']['title'] = 'test2';
}
}
I made a script that changes the block title when the state of the device changes
Problem is that the title does not change.
When the switch 1474 is On the title must be test1 and test2 when off...
function getChange_1474(idx,value,device){
if(parseFloat(device['state'])='On'){
blocks['1474']['title'] = 'test1';
}
else {
blocks['1474']['title'] = 'test2';
}
}