added stop command and button

This commit is contained in:
Rocka84
2024-06-01 13:58:30 +02:00
parent 902df4e618
commit 31d70b3746
4 changed files with 23 additions and 10 deletions

View File

@@ -146,6 +146,10 @@ namespace esphome {
send_simple_command(0x02);
}
void JiecangDeskController::stop() {
send_simple_command(0x2B);
}
void JiecangDeskController::goto_position(int pos) {
switch (pos) {
case 1:
@@ -184,6 +188,9 @@ namespace esphome {
case BUTTON_LOWER:
lower();
break;
case BUTTON_STOP:
stop();
break;
case BUTTON_POSITION1:
goto_position(1);
break;