From 6971b9db30ff9fdc98eb6a8ce1e999abd2fcba67 Mon Sep 17 00:00:00 2001 From: DewGew Date: Mon, 12 Feb 2024 09:51:03 +0100 Subject: [PATCH] Update smarthome.js --- static/js/smarthome.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/smarthome.js b/static/js/smarthome.js index 8387c0e..3100b45 100644 --- a/static/js/smarthome.js +++ b/static/js/smarthome.js @@ -137,6 +137,7 @@ 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'){ @@ -144,6 +145,7 @@ function refreshSwitches(updateSwitches) { } 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'){ @@ -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'){