slider-button-card icon indicating copy to clipboard operation
slider-button-card copied to clipboard

Add 'tap' to stop for use with cover

Open ManCaveMedia opened this issue 3 years ago • 6 comments
trafficstars

I use the slider button cards for lots of purposes and I really enjoy it. However, sometimes I accidentally drag one of my cover buttons and the cover starts to move to the set position. The problem is, there's no way to stop de cover, other than tapping the icon and stop te cover from the more-info window.

I would love to be able to set the tap behavior of the buttons that I use for covers to perform a custom action/start a custom service, like 'cover.stop_cover'. So that would mean swiping on the button makes the cover move to the set position, but when I tap it in the meantime, the cover stops and the button will represent the current cover position.

ManCaveMedia avatar Apr 15 '22 08:04 ManCaveMedia

I've been wanting a tap-action for the other entity types too, not just cover. Tap on a light entity should be a toggle, or more-info, or whatever else the user wants. I know we can already tap on the icon, but being able to tap on the slider itself would enhance usability of the card quite a bit.

lizsugar avatar Apr 15 '22 19:04 lizsugar

I'm actually starting work on this over here: https://github.com/lizsugar/slider-button-card/tree/slider_tap_action

The goal is to make it work for all entity types for any action. You should be able to call the cover.stop_cover service using this.

It's not ready just yet, as it still triggers a tap_action even when sliding, so I would not recommend using it yet. And GUI config just isn't even there yet.

lizsugar avatar Apr 21 '22 23:04 lizsugar

Okay, it's come a long way since then and I'm just wrapping up a weird issue where mouse click to trigger tap_action does not work when the slider is enabled - touch with a finger works just fine in that event! and both finger touch and mouse click work just fine when the slider is disabled.

Almost there! Will submit a pull request once I got that figured out.

lizsugar avatar Apr 30 '22 00:04 lizsugar

Oh, and on my plate is to get a gui config for this as well, but I think i'm going to submit a PR before then since the current action button and icon tap_actions also do not have a super functioning gui anyway

lizsugar avatar Apr 30 '22 00:04 lizsugar

did you ever gotten to a release ?

joeblack2k avatar Jul 29 '22 18:07 joeblack2k