From e8e2280bb370c327c2614369bbc345753c337c4b Mon Sep 17 00:00:00 2001 From: Barbudor Date: Tue, 23 Feb 2021 15:21:33 +0100 Subject: [PATCH] allows switch pinmode from output to input --- tasmota/xsns_29_mcp230xx.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xsns_29_mcp230xx.ino b/tasmota/xsns_29_mcp230xx.ino index b450d63d7..3e4dd9dee 100644 --- a/tasmota/xsns_29_mcp230xx.ino +++ b/tasmota/xsns_29_mcp230xx.ino @@ -645,7 +645,7 @@ bool MCP230xx_Command(void) return serviced; } #ifdef USE_MCP230xx_OUTPUT - if (Settings.mcp230xx_config[pin].pinmode >= 5) { + if (Settings.mcp230xx_config[pin].pinmode >= 5 && paramcount == 2) { uint8_t pincmd = Settings.mcp230xx_config[pin].pinmode - 5; uint8_t relay_no = 0; for (relay_no = 0; relay_no < mcp230xx_pincount ; relay_no ++) {