Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for wiz smart button #3547

Merged
merged 1 commit into from
Nov 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions wled00/remote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
#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

// This is kind of an esoteric strucure because it's pulled from the "Wizmote"
// product spec. That remote is used as the baseline for behavior and availability
// since it's broadly commercially available and works out of the box as a drop-in
Expand Down Expand Up @@ -210,6 +215,10 @@ void handleRemote(uint8_t *incomingData, size_t len) {
case WIZMOTE_BUTTON_NIGHT : activateNightMode(); break;
case WIZMOTE_BUTTON_BRIGHT_UP : brightnessUp(); break;
case WIZMOTE_BUTTON_BRIGHT_DOWN : brightnessDown(); break;
case WIZ_SMART_BUTTON_ON : setOn(); break;
case WIZ_SMART_BUTTON_OFF : setOff(); break;
case WIZ_SMART_BUTTON_BRIGHT_UP : brightnessUp(); break;
case WIZ_SMART_BUTTON_BRIGHT_DOWN : brightnessDown(); break;
default: break;
}
last_seq = cur_seq;
Expand Down
Loading