From c329a85a1b786a4880108de1384e71a2bc980211 Mon Sep 17 00:00:00 2001 From: bpohvoodoo Date: Sun, 17 Mar 2019 14:41:09 +0100 Subject: [PATCH] Fixes issue #3 Fixes issue #3 --- Arduino/McLighting/request_handlers.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index 9fc8a8b..c54a7f7 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -1167,6 +1167,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght if (root.containsKey("brightness")) { uint8_t json_brightness = constrain((uint8_t) root["brightness"], 0, 255); //fix #224 if (json_brightness != brightness) { + brightness = json_brightness; mode = SET_BRIGHTNESS; } }