From a3abdbfef2b9396e567ced2f257501f919af4117 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sat, 11 Apr 2020 19:01:39 +0200 Subject: [PATCH] Ensure zb_channel is in 11..26 range --- tasmota/xdrv_23_zigbee_9_impl.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasmota/xdrv_23_zigbee_9_impl.ino b/tasmota/xdrv_23_zigbee_9_impl.ino index 845babc2d..86c63eb5b 100644 --- a/tasmota/xdrv_23_zigbee_9_impl.ino +++ b/tasmota/xdrv_23_zigbee_9_impl.ino @@ -1044,6 +1044,8 @@ void CmndZbConfig(void) { // Channel const JsonVariant &val_channel = getCaseInsensitive(json, PSTR("Channel")); if (nullptr != &val_channel) { zb_channel = strToUInt(val_channel); } + if (zb_channel < 11) { zb_channel = 11; } + if (zb_channel > 26) { zb_channel = 26; } // PanID const JsonVariant &val_pan_id = getCaseInsensitive(json, PSTR("PanID")); if (nullptr != &val_pan_id) { zb_pan_id = strToUInt(val_pan_id); }