About the afvalwijzer - add-on: could this script be altered so that the switch isn't a 'selectable' switch anymore, but a text-switch? Now, you can select from the drop-down-menu, and it would be nicer if this wasn't selectable, but just a simple value: 'GFT', or 'Restafval', or 'Plastic', etc. Just my 2 cents.
In main.js you find this piece of code (No idea which line, it depends almost every update)
Code: Select all
else if(device['Type']=='Group' || device['Type']=='Scene'){
if(device['Type']=='Group') $('.block_'+idx).attr('onclick','switchDevice(this)');
if(device['Type']=='Scene') $('.block_'+idx).attr('onclick','switchGroup(this)');
if(buttonimg==''){
if(device['Status']=='Off') html+=iconORimage(idx,'fa-lightbulb-o','','off icon');
else html+=iconORimage(idx,'fa-lightbulb-o','','on icon');
}
else {
if(device['Status']=='Off') html+=iconORimage(idx,'',buttonimg+'.png','off icon');
else html+=iconORimage(idx,'',buttonimg+'.png','on icon');
}
html+=getBlockData(device,idx,lang.state_on,lang.state_off);
}
Paste the following code below the code above and change 112 with your idxnumber
Code: Select all
else if(data.result[r]['idx']==112){
var actions = data.result[r]['LevelActions'].split('|');
var names = data.result[r]['LevelNames'].split('|');
var switchHTML = '<div class="col-md-4 mb no-pr switch" data-light="'+data.result[r]['idx']+'">';
switchHTML+='<div class="transbg"> ';
switchHTML+='<div class="col-md-4 no-padding">';
switchHTML+='</div>';
switchHTML+='<div class="col-md-8 no-padding">';
switchHTML+='<strong class="title">'+data.result[r]['Name']+'</strong><br />';
switchHTML+='<option value="'+(a*10)+'" '+s+'>'+names[a]+'</option>';
switchHTML+='</div>';
switchHTML+='</div>';
switchHTML+='</div>';
$('div.block_'+idx).html(switchHTML);
addHTML=false;
}