From 0c2f733d7db92b4a84d66f853a34916a428a83d2 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Thu, 18 Jan 2024 23:34:48 +0100 Subject: [PATCH] Berry/Zigbee add web hook per device for customized status display --- CHANGELOG.md | 1 + tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 138793c34afb..0e43fc9dbf51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. - GUI sensor separators (#20495) - Command ``TimedPower [,ON|OFF|TOGGLE|BLINK]`` executes ``Power [ON|OFF|TOGGLE|BLINK] `` and after executes ``Power [OFF|ON|TOGGLE|BLINK_OFF]`` - Berry solidification of strings longer than 255 bytes (#20529) +- Berry/Zigbee add web hook per device for customized status display ### Breaking Changed 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 a27b25e2bc47..4f96e003cb7c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino @@ -2211,6 +2211,7 @@ void ZigbeeShow(bool json) uint32_t now = Rtc.utc_time; + // iterate through devices by alphabetical order for (uint32_t i = 0; i < zigbee_num; i++) { const Z_Device &device = zigbee_devices.devicesAt(sorted_idx[i]); uint16_t shortaddr = device.shortaddr; @@ -2365,6 +2366,10 @@ void ZigbeeShow(bool json) } WSContentSend_P(PSTR("{e}")); } +#ifdef USE_BERRY + // Berry hook to display additional customized information + callBerryZigbeeDispatcher("web_device_status", nullptr, nullptr, shortaddr); +#endif // USE_BERRY } WSContentSend_P(msg[ZB_WEB_LINE_END]); // Terminate current multi column table and open new table