Skip to content

Commit

Permalink
Update smarthome.js
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Feb 1, 2024
1 parent 720c20f commit 60f96bf
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions static/js/smarthome.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ function refreshScenes(updateScenes) {
if (data != 'Off'){
$('#icon_Group_' + idx).removeClass("bi bi-toggle2-off")
$('#icon_Group_' + idx).addClass("bi bi-toggle2-on").css('color', green)

}else{
$('#icon_Group_' + idx).removeClass("bi bi-toggle2-on")
$('#icon_Group_' + idx).addClass("bi bi-toggle2-off").removeAttr('style')
Expand Down Expand Up @@ -510,3 +511,46 @@ function decodeBase64(string) {
} while( i < string.length );
return result;
}

function getlog(div, idx, name, timeline){
setTimeout(() => {
ShowTempLog(div, idx, name, timeline)
}, 500);
<!-- setInterval(ShowTempLog, 60000, div, idx, name, timeline); -->
}

function getLigthLog(idx){
setTimeout(() => {
getDeviceLog(idx)
}, 100);
}

$('#title_scenes').click(function(){
$("#title_scenes > i").toggleClass('bi bi-chevron-compact-up')
$('#scene_devices').slideToggle();
});

$('#title_switches').click(function(){
$("#title_switches > i").toggleClass('bi bi-chevron-compact-up')
$('#switch_devices').slideToggle();
});
$('#title_temps').click(function(){
$("#title_temps > i").toggleClass('bi bi-chevron-compact-up')
$('#temp_devices').slideToggle();
});

$('#title_security').click(function(){
$("#title_security > i").toggleClass('bi bi-chevron-compact-up')
$('#sec_devices').slideToggle();
});

$("#title_other").click(function(){
$("#title_other > i").toggleClass('bi bi-chevron-compact-up')
$("#other_devices").slideToggle();
});

$("#title_hidden").click(function(){
$("#title_hidden > i").toggleClass('bi bi-chevron-compact-up')
$("#hidden_devices").slideToggle();
});

0 comments on commit 60f96bf

Please sign in to comment.