diff --git a/data/set.device.json b/data/set.device.json index a54ce803..aafd6bab 100644 --- a/data/set.device.json +++ b/data/set.device.json @@ -43,7 +43,7 @@ }, { "type": "h4", - "title": "LittleFS version: 248" + "title": "LittleFS version: 249" }, { "type": "hr" diff --git a/include/Consts.h b/include/Consts.h index 8ab174a8..1446cf65 100644 --- a/include/Consts.h +++ b/include/Consts.h @@ -2,7 +2,7 @@ //=================Firmeare================= #define FIRMWARE_NAME "esp8266-iotm" -#define FIRMWARE_VERSION 248 +#define FIRMWARE_VERSION 249 #define FLASH_4MB true //=================System=================== diff --git a/include/items/ButtonInClass.h b/include/items/ButtonInClass.h index d496e416..97d9e5e1 100644 --- a/include/items/ButtonInClass.h +++ b/include/items/ButtonInClass.h @@ -28,10 +28,13 @@ class ButtonInClass : public LineParsing { buttons[switch_number].update(); if (buttons[switch_number].fell()) { String key = jsonReadStr(configOptionJson, "switch_num_" + String(switch_number)); - state = !state; + state = 0; switchChangeVirtual(key, String(state)); } if (buttons[switch_number].rose()) { + String key = jsonReadStr(configOptionJson, "switch_num_" + String(switch_number)); + state = 1; + switchChangeVirtual(key, String(state)); } } switch_number++;