From 850d240d2e2889b1f1b5f4e98512405c61c19eea Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 30 Dec 2018 14:56:50 +0100 Subject: [PATCH] Add test for result usage --- sonoff/xsns_interface.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/xsns_interface.ino b/sonoff/xsns_interface.ino index d39995be9..1c02787db 100644 --- a/sonoff/xsns_interface.ino +++ b/sonoff/xsns_interface.ino @@ -311,7 +311,9 @@ boolean XsnsCall(byte Function) } #endif // PROFILE_XSNS_SENSOR_EVERY_SECOND - if (result) break; + if (result && (FUNC_COMMAND == Function)) { + break; + } #ifdef USE_DEBUG_DRIVER } #endif