From edb0a8af9c968728f5a797f931a083de5441a4c3 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Fri, 9 Sep 2022 23:51:52 +0200 Subject: [PATCH] Zigbee grey buttons when not started --- .../xdrv_23_zigbee_A_impl.ino | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino index 37b000b00..fd8ec2f83 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino @@ -2077,7 +2077,14 @@ const char HTTP_ZB_VERSION[] PROGMEM = const char HTTP_BTN_ZB_BUTTONS[] PROGMEM = "" "

" - "
"; + "" + "

"; + +const char HTTP_BTN_ZB_BUTTONS_DISABLED[] PROGMEM = + "" + "

" + "" + "

"; void ZigbeeShow(bool json) { @@ -2275,6 +2282,10 @@ void ZigbeeShow(bool json) WSContentSend_P(HTTP_ZB_VERSION, zigbee.major_rel, zigbee.minor_rel, zigbee.maint_rel, zigbee.revision); + WSContentSend_P(HTTP_BTN_ZB_BUTTONS); + } else { + uint32_t grey = WebColor(COL_FORM); + WSContentSend_P(HTTP_BTN_ZB_BUTTONS_DISABLED, grey, grey); } #endif } @@ -2366,9 +2377,6 @@ bool Xdrv23(uint8_t function) { WebServer_on(PSTR("/zbm"), ZigbeeShowMap, HTTP_GET); // add web handler for Zigbee map WebServer_on(PSTR("/zbr"), ZigbeeMapRefresh, HTTP_GET); // add web handler for Zigbee map refresh break; - case FUNC_WEB_ADD_MAIN_BUTTON: - WSContentSend_P(HTTP_BTN_ZB_BUTTONS); - break; #endif // USE_WEBSERVER case FUNC_PRE_INIT: ZigbeeInit();