diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 1ebcf936c..2c5828786 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -1775,14 +1775,9 @@ void CmndGpioRead(void) { bool jsflg = false; Response_P(PSTR("{\"" D_CMND_GPIOREAD "\":{")); for (uint32_t i = 0; i < nitems(Settings->my_gp.io); i++) { - bool sensor_active = false; - uint32_t sensor_type = template_gp.io[i]; // Template GPIO - if ((sensor_type != GPIO_NONE) && (AGPIO(GPIO_USER) != sensor_type)) { - sensor_active = true; - } else if (Settings->my_gp.io[i] != GPIO_NONE) { // Module GPIO - sensor_active = true; - } - if (sensor_active) { + uint32_t sensor_type = template_gp.io[i]; // Template GPIO + if (((sensor_type != GPIO_NONE) && (AGPIO(GPIO_USER) != sensor_type)) || + (Settings->my_gp.io[i] != GPIO_NONE)) { // Module GPIO if (jsflg) { ResponseAppend_P(PSTR(",")); }