From d87cc9ddb6958a7786a9da3df55f79e174987c1f Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Sat, 2 Sep 2023 09:14:09 +0300 Subject: [PATCH] Fix homekit pairing table --- www/add.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/add.html b/www/add.html index 53665777..bcb9e1c7 100644 --- a/www/add.html +++ b/www/add.html @@ -130,11 +130,11 @@ await getSources('homekit-table', 'api/homekit'); const rows = document.querySelectorAll('#homekit-table tr'); - rows.forEach((row) => { + rows.forEach((row, i) => { let commands = ''; if (row.children[2].innerText.indexOf('status=1') > 0) { commands += 'pair'; - } else if (row.children[3].innerText) { + } else if (i > 0 && row.children[3].innerText) { commands += 'unpair'; } row.innerHTML += `${commands}`;