From 8f2ba87ceda6f54970ad4d4478973597dffa24cf Mon Sep 17 00:00:00 2001 From: gemu2015 Date: Mon, 30 Sep 2019 10:41:04 +0200 Subject: [PATCH] Update xdrv_10_scripter.ino --- sonoff/xdrv_10_scripter.ino | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sonoff/xdrv_10_scripter.ino b/sonoff/xdrv_10_scripter.ino index 0d3307490..ce0430f8f 100644 --- a/sonoff/xdrv_10_scripter.ino +++ b/sonoff/xdrv_10_scripter.ino @@ -1646,6 +1646,20 @@ chknext: goto exit; } #endif + +#ifdef USE_SHUTTER + if (!strncmp(vname,"sht[",4)) { + GetNumericResult(vname+4,OPER_EQU,&fvar,0); + uint8_t index=fvar; + if (index<=shutters_present) { + fvar=Settings.shutter_position[index-1]; + } else { + fvar=-1; + } + len+=1; + goto exit; + } +#endif break; case 't': if (!strncmp(vname,"time",4)) {