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 12, 2024
1 parent b505eff commit 6971b9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions static/js/smarthome.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,15 @@ function refreshSwitches(updateSwitches) {
}
if (data == 'Open'){
$('#icon_DoorContact_' + idx).html("door_open")
$('#icon_Contact_' + idx).css('color', red)
$('#icon_blinds_' + idx).css('color', green)
}
if (data == 'Stopped'){
$('#icon_blinds_' + idx).css('color', yellow)
}
if (data == 'Unlocked'){
$('#icon_DoorLock_' + idx).html("lock_open").css('color',green)
$('#icon_lock_' + idx).css('color', green)
$('#icon_DoorLockInverted_' + idx).html("lock_open").css('color',green)
}
if (data == 'Off'){
Expand All @@ -156,9 +158,11 @@ function refreshSwitches(updateSwitches) {
if (data == 'Closed'){
$('#icon_DoorContact_' + idx).html("door_front")
$('#icon_blinds_' + idx).removeAttr('style')
$('#icon_Contact_' + idx).removeAttr('style')
}
if (data == 'Locked'){
$('#icon_DoorLock_' + idx).html("lock").css('color',red)
$('#icon_lock_' + idx).css('color', red)
$('#icon_DoorLockInverted_' + idx).html("lock").css('color',red)
}
if (data == 'Normal'){
Expand Down

0 comments on commit 6971b9d

Please sign in to comment.