-
-
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
Open
frenetic00
wants to merge
1
commit into
iMicknl:main
Choose a base branch
from
frenetic00:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,14 @@ substitutions: | |
rx_pin: GPIO16 # RXD 2 | ||
screen_pin: GPIO23 | ||
encryption_key: "iOZqtvw31Yy6sasRl5h2DElG2VDlqW2WjJEKObVN8bg=" | ||
preset_1_name: "Preset 1" | ||
preset_1_icon: "mdi:numeric-1-box" | ||
preset_2_name: "Preset 2" | ||
preset_2_icon: "mdi:numeric-2-box" | ||
preset_3_name: "Preset 3" | ||
preset_3_icon: "mdi:numeric-3-box" | ||
preset_4_name: "Preset 4" | ||
preset_4_icon: "mdi:numeric-4-box" | ||
|
||
external_components: | ||
source: github://iMicknl/LoctekMotion_IoT | ||
|
@@ -144,36 +152,36 @@ switch: | |
|
||
button: | ||
- platform: template | ||
name: "Preset 1" | ||
icon: mdi:numeric-1-box | ||
name: ${preset_1_name} | ||
icon: ${preset_1_icon} | ||
on_press: | ||
- uart.write: | ||
id: desk_uart | ||
data: [0x9b, 0x06, 0x02, 0x04, 0x00, 0xac, 0xa3, 0x9d] | ||
|
||
- platform: template | ||
name: "Preset 2" | ||
icon: mdi:numeric-2-box | ||
name: ${preset_2_name} | ||
icon: ${preset_2_icon} | ||
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 commentThe 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. |
||
icon: ${preset_3_icon} | ||
on_press: | ||
- uart.write: | ||
id: desk_uart | ||
data: [0x9b, 0x06, 0x02, 0x00, 0x01, 0xac, 0x60, 0x9d] | ||
data: [0x9b, 0x06, 0x02, 0x10, 0x00, 0xac, 0xac, 0x9d] | ||
|
||
- platform: template | ||
name: "Stand" # Preset 4 on some control panels | ||
icon: mdi:human-handsup | ||
name: ${preset_4_name} # Preset 4 on some control panels | ||
icon: ${preset_4_icon} | ||
on_press: | ||
- uart.write: | ||
id: desk_uart | ||
data: [0x9b, 0x06, 0x02, 0x10, 0x00, 0xac, 0xac, 0x9d] | ||
data: [0x9b, 0x06, 0x02, 0x00, 0x01, 0xac, 0x60, 0x9d] | ||
|
||
- platform: template | ||
name: "Memory" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: