Skip to content

Correct Preset 3 and 4 commands and add substitutions#115

Open
frenetic00 wants to merge 1 commit intoiMicknl:mainfrom
frenetic00:main
Open

Correct Preset 3 and 4 commands and add substitutions#115
frenetic00 wants to merge 1 commit intoiMicknl:mainfrom
frenetic00:main

Conversation

@frenetic00
Copy link
Copy Markdown

Preset 3 button currently issues the command for Preset 4 and vice versa.

Added substitutions so that Sit / Stand can be configured to different presets numbers other than 3 and 4.

@frenetic00 frenetic00 requested a review from iMicknl as a code owner February 4, 2025 11:05
@jamesmyatt
Copy link
Copy Markdown
Contributor

Which control panel are you using?

preset_3_name: "Preset 3"
preset_3_icon: "mdi:numeric-3-box"
preset_4_name: "Preset 4"
preset_4_icon: "mdi:numeric-4-box"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd personally prefer to keep these as sit/stand, because I think that's more common. If users want to change it to 3/4 then I think it's easier to infer those changes than to make the right changes for sit/stand.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using the HCB213A-1

I added them as substitutions to give users more flexibility which preset is associated with sit / stand as it might not always default to 3 and 4. The link for the different Loctek control panels seems to be dead but from the images I've seen, some panels only have presets 1-3.

I could add a commit so that preset 3 and 4 default to sit and stand respectively?

The substitutions result in a smaller config with more flexibility and less editing overall:

packages:
  remote_package: github://frenetic00/LoctekMotion_IoT/packages/office-desk-esp32.yaml
substitutions:
  device_name: Flexispot - Office Desk
  max_height: '100'
  min_height: '71'
  name: flexispot-office-desk
  preset_1_icon: mdi:chair-rolling
  preset_1_name: Sit
  preset_2_icon: mdi:human-handsup
  preset_2_name: Stand

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great if you can make this change!

Comment thread packages/office-desk-esp32.yaml
@iMicknl
Copy link
Copy Markdown
Owner

iMicknl commented Jan 4, 2026

Thanks for your contribution, @frenetic00, and apologies for the very late reply.

The button mapping depends on the control panel and is fairly easy to adjust in code. Your changes around the substitutions make sense, but I think it would be good to keep the original mapping as the default.

Would you mind double-checking that there are no breaking changes? Happy to merge once you have changed the name back to "Sit" and "Stand".

@iMicknl iMicknl added the enhancement New feature or request label Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants