Switch prog commands sent to a 1 button garage motor.

This commit is contained in:
Robert Strouse 2023-08-28 10:46:48 -07:00
parent 74ee9f6f25
commit 3ec67cd0ea
3 changed files with 2 additions and 1 deletions

View file

@ -1965,7 +1965,7 @@ void SomfyShade::sendCommand(somfy_commands cmd, uint8_t repeat) {
this->tiltTarget = this->currentTiltPos; this->tiltTarget = this->currentTiltPos;
} }
} }
else if(this->shadeType == shade_types::garage1 && cmd == somfy_commands::My) { else if(this->shadeType == shade_types::garage1 && cmd == somfy_commands::Prog) {
SomfyRemote::sendCommand(somfy_commands::Toggle, repeat); SomfyRemote::sendCommand(somfy_commands::Toggle, repeat);
} }
else { else {

Binary file not shown.

View file

@ -381,6 +381,7 @@ void Web::handleRepeatCommand(WebServer& server) {
server.send(500, _encoding_json, F("{\"status\":\"ERROR\",\"desc\":\"Shade reference could not be found.\"}")); server.send(500, _encoding_json, F("{\"status\":\"ERROR\",\"desc\":\"Shade reference could not be found.\"}"));
return; return;
} }
if(shade->shadeType == shade_types::garage1 && command == somfy_commands::Prog) command = somfy_commands::Toggle;
if(!shade->isLastCommand(command)) { if(!shade->isLastCommand(command)) {
// We are going to send this as a new command. // We are going to send this as a new command.
shade->sendCommand(command, repeat >= 0 ? repeat : shade->repeats); shade->sendCommand(command, repeat >= 0 ? repeat : shade->repeats);