Configurable dragpad swipe threshold #310
hyperpetroll-lab
started this conversation in
General
Replies: 3 comments 1 reply
|
Am I doing something wrong here? Can’t get it working. type: custom:universal-remote-card
platform: Samsung TV
config_entry_id: 740XB82937BDJ383BAJDH
remote_id: remote.living_room_tv
media_player_id: media_player.living_room_tv
rows:
- - power
- null
- null
- info
- more
- - volume
- slider
- - touchpad # also tried dragpad here
- - back
- home
- play_pause
custom_actions:
- type: button
name: more
icon: setting
tap_action:
action: key
key: KEY_MORE
- name: power
tap_action:
action: key
key: KEY_POWER
icon: power
type: button
- name: info
tap_action:
action: key
key: KEY_INFO
icon: info
type: button
- name: volume
entity_id: media_player.living_room_tv
value_attribute: is_volume_muted
tap_action:
action: key
key: KEY_MUTE
icon: '{{ ''volume_mute'' if value else ''volume'' }}'
type: button
- name: back
tap_action:
action: key
key: KEY_RETURN
icon: back
hold_action:
action: key
key: KEY_EXIT
hold_time: 1500
type: button
- name: home
tap_action:
action: key
key: KEY_HOME
icon: home
type: button
- name: play_pause
tap_action:
action: perform-action
perform_action: media_player.media_play_pause
target:
entity_id: media_player.living_room_tv
icon: play_pause
type: button
- type: touchpad
name: touchpad
drag_action:
touch_threshold: 5
custom_icons:
- name: play_pause
path: >-
M 17.6512 6.666 v 12.12 a 1.1362 1.1362 90 0 1 -2.2725 0 V 6.666 a 1.1362
1.1362 90 0 1 2.2725 0 m 3.4087 -1.1362 A 1.1362 1.1362 90 0 0 19.9238
6.666 v 12.12 a 1.1362 1.1362 90 0 0 2.2725 0 V 6.666 a 1.1362 1.1362 90 0
0 -1.1362 -1.1362 M 13.8637 12.726 a 1.8665 1.8665 90 0 1 -0.8696 1.5827 l
-8.3497 5.3176 A 1.8857 1.8857 90 0 1 1.7438 18.0426 V 7.4094 a 1.8857
1.8857 90 0 1 2.9007 -1.5827 l 8.3497 5.3176 A 1.8665 1.8665 90 0 1
13.8637 12.726 m -2.6149 0 L 4.0162 8.1214 v 9.2092 Z
- name: setting
path: >-
M10.825 22q-.675 0-1.162-.45t-.588-1.1L8.85
18.8q-.325-.125-.612-.3t-.563-.375l-1.55.65q-.625.275-1.25.05t-.975-.8l-1.175-2.05q-.35-.575-.2-1.225t.675-1.075l1.325-1Q4.5
12.5 4.5 12.337v-.675q0-.162.025-.337l-1.325-1Q2.675 9.9 2.525
9.25t.2-1.225L3.9
5.975q.35-.575.975-.8t1.25.05l1.55.65q.275-.2.575-.375t.6-.3l.225-1.65q.1-.65.588-1.1T10.825
2h2.35q.675 0 1.163.45t.587 1.1l.225
1.65q.325.125.613.3t.562.375l1.55-.65q.625-.275 1.25-.05t.975.8l1.175
2.05q.35.575.2 1.225t-.675 1.075l-1.325 1q.025.175.025.338v.674q0
.163-.05.338l1.325 1q.525.425.675 1.075t-.2 1.225l-1.2
2.05q-.35.575-.975.8t-1.25-.05l-1.5-.65q-.275.2-.575.375t-.6.3l-.225
1.65q-.1.65-.587 1.1t-1.163.45zM11 20h1.975l.35-2.65q.775-.2
1.438-.587t1.212-.938l2.475
1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5
12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475
1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35
2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15
1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975
1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0
2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.487 1.025T8.55
12t1.013 2.475T12.05 15.5M12 12
- name: volume
path: >-
M12.14 4.91c-.714.347-1.62.942-2.909
1.792l-.219.144l-.05.033c-.38.25-.643.424-.931.552a3.8 3.8 0 0
1-.89.267c-.31.052-.626.052-1.082.052H6c-1.444 0-1.93.016-2.345.208a2.47
2.47 0 0 0-1.036.975c-.218.405-.259.82-.336
2.084c-.02.347-.033.68-.033.983s.012.636.033.983c.077 1.264.118 1.68.336
2.084c.209.389.635.79 1.036.975c.414.192.901.208 2.345.208h.06c.455 0 .77
0
1.081.052q.462.079.89.267c.288.128.552.301.932.552l.05.033l.218.144c1.29.85
2.195 1.445 2.91 1.792c.711.346 1.068.36
1.317.275c.137-.047.272-.115.39-.199c.217-.152.415-.447.553-1.218c.14-.775.191-1.847.263-3.377c.052-1.12.086-2.06.086-2.571s-.034-1.451-.086-2.57c-.072-1.531-.123-2.603-.262-3.378c-.14-.771-.337-1.066-.553-1.218a1.6
1.6 0 0 0-.391-.2c-.25-.084-.606-.07-1.318.276m-.655-1.35c.826-.4
1.64-.624 2.457-.345c.272.093.534.226.769.391c.706.497 1.005 1.28 1.167
2.18c.159.884.213 2.056.281 3.516l.003.058c.052 1.115.088 2.088.088
2.64s-.036 1.525-.088 2.64l-.003.058c-.068 1.46-.122 2.632-.281
3.516c-.162.9-.461 1.683-1.167 2.18a3 3 0 0
1-.769.39c-.818.28-1.631.057-2.457-.344c-.814-.396-1.8-1.047-3.032-1.858l-.267-.176c-.447-.295-.602-.394-.76-.464q-.257-.114-.535-.16c-.171-.03-.354-.032-.89-.032h-.162c-1.217
0-2.062.001-2.814-.347a3.96 3.96 0 0
1-1.727-1.624c-.392-.729-.438-1.49-.504-2.575l-.008-.13A18 18 0 0 1 .75
12c0-.341.014-.706.036-1.074l.008-.13C.86 9.712.906 8.95 1.298 8.22a3.96
3.96 0 0 1 1.727-1.624c.752-.348 1.597-.348 2.814-.347H6c.537 0
.72-.002.891-.031a2.3 2.3 0 0 0
.534-.16c.16-.07.314-.17.761-.465l.267-.176c1.231-.811 2.218-1.462
3.032-1.857m8.035 1.864a.75.75 0 0 1 1.056.096L20
6l.576-.48l.001.001l.002.002l.003.004l.007.009a2 2 0 0 1 .086.114a5 5 0 0
1 .203.311c.161.27.368.665.572 1.195c.408 1.061.8 2.653.8 4.844s-.392
3.783-.8 4.845a7.7 7.7 0 0 1-.572 1.194a5 5 0 0
1-.268.399l-.013.017l-.008.01l-.007.009l-.003.003l-.002.002L20
18l.576.48a.75.75 0 0 1-1.156-.955m0 0l.003-.005l.031-.041a3 3 0 0 0
.137-.212c.12-.198.288-.516.459-.961c.342-.889.7-2.297.7-4.306s-.358-3.417-.7-4.306a6
6 0 0 0-.459-.961a3 3 0 0
0-.171-.257l.003.004l-.001-.002l-.002-.002a.75.75 0 0 1 .1-1.052m-1.884
2.92a.75.75 0 0 1
1.02.292l-.628.349l.628-.349v.001l.001.002l.002.003l.004.007l.01.018l.026.054q.03.064.075.174c.06.147.132.356.203.631c.14.551.273
1.364.273 2.474s-.132 1.923-.273 2.474a5 5 0 0 1-.203.631a3 3 0 0
1-.102.228l-.01.019l-.003.007l-.002.003v.001s-.001.002-.63-.347l.629.348a.75.75
0 0
1-1.317-.719l.005-.01l.038-.087c.035-.087.087-.234.141-.447c.11-.424.227-1.11.227-2.1s-.118-1.678-.227-2.102a4
4 0 0 0-.179-.534l-.005-.01a.75.75 0 0 1 .297-1.01
- name: volume_mute
path: >-
M 12.14 4.91 c -0.714 0.347 -1.62 0.942 -2.909 1.792 l -0.219 0.144 l
-0.05 0.033 c -0.38 0.25 -0.643 0.424 -0.931 0.552 a 3.8 3.8 0 0 1 -0.89
0.267 c -0.31 0.052 -0.626 0.052 -1.082 0.052 H 6 c -1.444 0 -1.93 0.016
-2.345 0.208 a 2.47 2.47 0 0 0 -1.036 0.975 c -0.218 0.405 -0.259 0.82
-0.336 2.084 c -0.02 0.347 -0.033 0.68 -0.033 0.983 s 0.012 0.636 0.033
0.983 c 0.077 1.264 0.118 1.68 0.336 2.084 c 0.209 0.389 0.635 0.79 1.036
0.975 c 0.414 0.192 0.901 0.208 2.345 0.208 h 0.06 c 0.455 0 0.77 0 1.081
0.052 q 0.462 0.079 0.89 0.267 c 0.288 0.128 0.552 0.301 0.932 0.552 l
0.05 0.033 l 0.218 0.144 c 1.29 0.85 2.195 1.445 2.91 1.792 c 0.711 0.346
1.068 0.36 1.317 0.275 c 0.137 -0.047 0.272 -0.115 0.39 -0.199 c 0.217
-0.152 0.415 -0.447 0.553 -1.218 c 0.14 -0.775 0.191 -1.847 0.262 -3.377 c
0.053 -1.12 0.087 -2.06 0.087 -2.571 s -0.034 -1.451 -0.087 -2.57 c -0.07
-1.531 -0.122 -2.603 -0.262 -3.378 c -0.138 -0.771 -0.336 -1.066 -0.552
-1.218 a 1.6 1.6 0 0 0 -0.391 -0.2 c -0.25 -0.084 -0.605 -0.07 -1.318
0.276 m -0.655 -1.35 c 0.826 -0.4 1.64 -0.624 2.457 -0.345 c 0.272 0.093
0.534 0.226 0.769 0.391 c 0.706 0.497 1.005 1.28 1.167 2.18 c 0.159 0.884
0.213 2.056 0.281 3.516 l 0.003 0.058 c 0.052 1.115 0.088 2.088 0.088 2.64
s -0.036 1.525 -0.088 2.64 l -0.003 0.058 c -0.068 1.46 -0.122 2.632
-0.281 3.516 c -0.162 0.9 -0.461 1.683 -1.167 2.18 a 3 3 0 0 1 -0.769 0.39
c -0.818 0.28 -1.631 0.057 -2.457 -0.344 c -0.814 -0.396 -1.8 -1.047
-3.032 -1.858 l -0.266 -0.176 c -0.448 -0.295 -0.602 -0.394 -0.762 -0.464
q -0.256 -0.114 -0.534 -0.16 c -0.171 -0.03 -0.354 -0.032 -0.89 -0.032 h
-0.162 c -1.217 0 -2.062 0.001 -2.814 -0.347 a 3.96 3.96 0 0 1 -1.727
-1.624 c -0.392 -0.729 -0.438 -1.49 -0.504 -2.575 l -0.008 -0.13 A 18 18 0
0 1 0.75 12 c 0 -0.341 0.014 -0.706 0.036 -1.074 l 0.008 -0.13 c 0.066
-1.084 0.112 -1.846 0.504 -2.575 a 3.96 3.96 0 0 1 1.727 -1.624 c 0.752
-0.348 1.597 -0.348 2.814 -0.347 H 6 c 0.537 0 0.72 -0.002 0.891 -0.031 a
2.3 2.3 0 0 0 0.534 -0.16 c 0.16 -0.07 0.314 -0.17 0.761 -0.465 l 0.267
-0.176 c 1.231 -0.811 2.218 -1.462 3.032 -1.857
- name: back
path: >-
m 7.8802 12.185 l 6.2843 6.2843 q 0.3206 0.3206 0.3104 0.7481 t -0.3317
0.7481 t -0.7481 0.3206 t -0.7481 -0.3206 l -6.5835 -6.5621 q -0.2565
-0.2565 -0.3847 -0.5771 T 5.5504 12.185 t 0.1283 -0.6412 t 0.3847 -0.5771
l 6.5835 -6.5835 q 0.3206 -0.3206 0.7592 -0.3104 t 0.7584 0.3317 t 0.3206
0.7481 t -0.3206 0.7481 z
- name: more
path: >-
M4.5 20q-.213 0-.357-.143T4 19.5t.143-.357T4.5 19h9.366q.213 0
.356.143q.144.143.144.357t-.144.357t-.356.143zm0-3.384q-.213 0-.357-.144Q4
16.329 4 16.115q0-.213.143-.356t.357-.143h15q.214 0
.357.143t.143.357t-.143.356t-.357.144zm1.116-3.385q-.691 0-1.153-.463T4
11.616v-6q0-.691.463-1.153T5.616 4h12.769q.69 0 1.153.463T20 5.616v6q0
.69-.462 1.152t-1.153.463z
- name: info
path: >-
M12.713 16.713Q13 16.425 13 16v-4q0-.425-.288-.712T12 11t-.712.288T11
12v4q0 .425.288.713T12 17t.713-.288m0-8Q13 8.425 13 8t-.288-.712T12
7t-.712.288T11 8t.288.713T12 9t.713-.288M12 22q-2.075
0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12
2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175
2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4
12t2.325 5.675T12 20m0-8
- name: power
path: >-
M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2
12q0-1.825.613-3.463T4.3
5.6q.275-.35.663-.325t.662.275t.363.65t-.263.825q-.8 1.025-1.263 2.288T4
12q0 3.35 2.325 5.675T12 20t5.675-2.325T20
12q0-1.425-.462-2.687t-1.263-2.288q-.35-.425-.262-.825t.362-.65t.663-.275t.662.325q1.075
1.3 1.688 2.938T22 12q0 2.075-.788 3.9t-2.137 3.175t-3.175 2.138T12
22m-.712-9.287Q11 12.425 11 12V3q0-.425.288-.712T12 2t.713.288T13 3v9q0
.425-.288.713T12 13t-.712-.288
- name: home
path: >-
M 3.982 19.241 v -9.27 q 0 -0.4892 0.2194 -0.927 t 0.6046 -0.721 l 6.18
-4.635 q 0.5408 -0.412 1.236 -0.412 t 1.236 0.412 l 6.18 4.635 q 0.3862
0.2833 0.6056 0.721 T 20.462 9.971 v 9.27 q 0 0.8498 -0.6056 1.4554 T
18.402 21.301 h -3.09 q -0.4377 0 -0.7334 -0.2966 T 14.282 20.271 v -5.15
q 0 -0.4377 -0.2966 -0.7334 T 13.252 14.091 h -2.06 q -0.4377 0 -0.7334
0.2966 T 10.162 15.121 v 5.15 q 0 0.4377 -0.2966 0.7344 T 9.132 21.301 H
6.042 q -0.8498 0 -1.4544 -0.6046 T 3.982 19.241
repeat_delay: 200
styles: |-
remote-button {
--icon-size: 33px;
width: 65px;
height: 65px;
}
#power::part(icon) {
color: red;
} |
1 reply
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Could there be an option to configure how far the finger needs to move before a dragpad direction is triggered?
Currently, even a small movement can trigger UP/DOWN/LEFT/RIGHT, which makes it difficult to land on a specific item. Tracking finger movement before triggering a direction would make swipes more deliberate.
I tried changing
sampling_delay/repeat_delay, but those affect the timing between repeated actions rather than initial movement distance.Something like:
would be great, where value controls movement distance before a direction is triggered.
Lower swipe_threshold:

Increased swipe_threshold:

All reactions