Merge pull request #10386 from s-hadinger/zigbee_fix_permitjoin_no_device

Zigbee fix display `Devices allowed to join` when zero device
This commit is contained in:
s-hadinger 2021-01-03 16:50:53 +01:00 committed by GitHub
commit a0a99f9395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1914,7 +1914,7 @@ void ZigbeeShow(bool json)
} else { } else {
UnishoxStrings msg(ZB_WEB); UnishoxStrings msg(ZB_WEB);
uint32_t zigbee_num = zigbee_devices.devicesSize(); uint32_t zigbee_num = zigbee_devices.devicesSize();
if (!zigbee_num) { return; } if (zigbee_num > 0) {
if (zigbee_num > 255) { zigbee_num = 255; } if (zigbee_num > 255) { zigbee_num = 255; }
WSContentSend_P(msg[ZB_WEB_CSS], WebColor(COL_TEXT)); WSContentSend_P(msg[ZB_WEB_CSS], WebColor(COL_TEXT));
@ -2078,6 +2078,7 @@ void ZigbeeShow(bool json)
} }
WSContentSend_P(msg[ZB_WEB_LINE_END]); // Terminate current multi column table and open new table WSContentSend_P(msg[ZB_WEB_LINE_END]); // Terminate current multi column table and open new table
}
if (zigbee.permit_end_time) { if (zigbee.permit_end_time) {
// PermitJoin in progress // PermitJoin in progress