-
Notifications
You must be signed in to change notification settings - Fork 70
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
Correct Preset 3 and 4 commands and add substitutions #115
base: main
Are you sure you want to change the base?
Conversation
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
on_press: | ||
- uart.write: | ||
id: desk_uart | ||
data: [0x9b, 0x06, 0x02, 0x08, 0x00, 0xac, 0xa6, 0x9d] | ||
|
||
- platform: template | ||
name: "Sit" # Preset 3 on some control panels | ||
icon: mdi:chair-rolling | ||
name: ${preset_3_name} # Preset 3 on some control panels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should probably be "Stand preset on some control panels". And equivalent for 4 too.
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.