From 520558d3817b458ec9d8e3384eeafe0d9cd3c2d9 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 25 Jul 2020 17:08:11 +0200 Subject: [PATCH] Fix no sensor issue --- tasmota/xsns_interface.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasmota/xsns_interface.ino b/tasmota/xsns_interface.ino index b6abce101..0c85854de 100644 --- a/tasmota/xsns_interface.ino +++ b/tasmota/xsns_interface.ino @@ -868,6 +868,11 @@ void XsnsSensorState(void) bool XsnsNextCall(uint8_t Function, uint8_t &xsns_index) { + if (0 == xsns_present) { + xsns_index = 0; + return false; + } + xsns_index++; if (xsns_index == xsns_present) { xsns_index = 0; }