From fb5dbb6bca5b930468266687bacd0542adbd5722 Mon Sep 17 00:00:00 2001 From: Michael Wyraz Date: Sat, 25 Nov 2023 15:06:54 +0100 Subject: [PATCH] Support for wiz smart button --- wled00/remote.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wled00/remote.cpp b/wled00/remote.cpp index 922c5738be..1dbb47f8e3 100644 --- a/wled00/remote.cpp +++ b/wled00/remote.cpp @@ -17,6 +17,12 @@ #define WIZMOTE_BUTTON_BRIGHT_UP 9 #define WIZMOTE_BUTTON_BRIGHT_DOWN 8 +#define WIZ_SMART_BUTTON_ON 100 +#define WIZ_SMART_BUTTON_OFF 101 +#define WIZ_SMART_BUTTON_BRIGHT_UP 102 +#define WIZ_SMART_BUTTON_BRIGHT_DOWN 103 + + #ifdef WLED_DISABLE_ESPNOW void handleRemote(){} #else @@ -159,6 +165,10 @@ void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) { case WIZMOTE_BUTTON_NIGHT : activateNightMode(); stateUpdated(CALL_MODE_BUTTON); break; case WIZMOTE_BUTTON_BRIGHT_UP : brightnessUp(); stateUpdated(CALL_MODE_BUTTON); break; case WIZMOTE_BUTTON_BRIGHT_DOWN : brightnessDown(); stateUpdated(CALL_MODE_BUTTON); break; + case WIZ_SMART_BUTTON_ON : setOn(); stateUpdated(CALL_MODE_BUTTON); break; + case WIZ_SMART_BUTTON_OFF : setOff(); stateUpdated(CALL_MODE_BUTTON); break; + case WIZ_SMART_BUTTON_BRIGHT_UP : brightnessUp(); stateUpdated(CALL_MODE_BUTTON); break; + case WIZ_SMART_BUTTON_BRIGHT_DOWN : brightnessDown(); stateUpdated(CALL_MODE_BUTTON); break; default: break; }