Skip to content

Commit e0853c0

Browse files
committed
BidCos-RF: show UPDATE_PENDING in device list (close #92)
1 parent a85ab09 commit e0853c0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

www/js/homematic-manager.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,7 @@ function refreshGridDevices() {
14101410
if (listDevices[i].RF_ADDRESS) {
14111411
listDevices[i].RF_ADDRESS = parseInt(listDevices[i].RF_ADDRESS, 10).toString(16);
14121412
}
1413+
let updatePending = false;
14131414

14141415
if (daemon === 'BidCos-RF' || daemon === 'HmIP') {
14151416
const msgs = [];
@@ -1441,6 +1442,9 @@ function refreshGridDevices() {
14411442
case 'CONFIG_PENDING':
14421443
msgs.push('<img title="CONFIG_PENDING" style="height: 12px; padding-top: 3px;" src="images/servicemsgs/config_pending.png">');
14431444
break;
1445+
case 'UPDATE_PENDING':
1446+
updatePending = true;
1447+
break;
14441448
default:
14451449
}
14461450
}
@@ -1463,6 +1467,8 @@ function refreshGridDevices() {
14631467
break;
14641468
default:
14651469
}
1470+
} else if (updatePending) {
1471+
listDevices[i].FIRMWARE += ' <span class="firmware-status">update pending</span>';
14661472
} else if (listDevices[i].AVAILABLE_FIRMWARE && listDevices[i].AVAILABLE_FIRMWARE !== listDevices[i].FIRMWARE) {
14671473
listDevices[i].FIRMWARE += ' <button class="update-firmware device-table" data-address="' + listDevices[i].ADDRESS + '" id="update-firmware_' + listDevices[i].ADDRESS + '">install ' + listDevices[i].AVAILABLE_FIRMWARE + '</button>';
14681474
} else if (listDevices[i].UPDATABLE) {
@@ -4043,6 +4049,9 @@ function getServiceMessages() {
40434049
case 'CONFIG_PENDING':
40444050
msg = ('<img title="CONFIG_PENDING" style="height: 12px; padding-top: 3px;" src="images/servicemsgs/config_pending.png">');
40454051
break;
4052+
case 'UPDATE_PENDING':
4053+
rowData.FIRMWARE = rowData.FIRMWARE.split(' ')[0] + '<span class="firmware-status">update pending</span>';
4054+
break;
40464055
default:
40474056
}
40484057
if (!rowData.msgs) {

0 commit comments

Comments
 (0)