Slide to confirm

Hi all,
i am new here but since 3 weeks ago when i started configuring HA i spend more time with you than with my family :joy: anyway…

I do hardware and software assistance and also i tech in school computer stuff but I never thought to learn some programming language so here in HA i am really working hard reading a lot or traying to bypass problems finding alternative solutions.

Now i found this HACS plugin “Slide to Confirm” that is really easy to use but I am not able to make it works. I would like to use it instead of other that i saw on here cause it is nice and easy to configure.

After istalling it and writing in the target field my lock entity… sliding the bar i get nothing
and at the bottom of the editor i find this message

Visual Editor not supported

  • this._configElement.setConfig is not a function
    It’s still possible to change the configuration using YAML.

My questions are two:

  • how to make it works?
  • is it possible to add more than 2 bars?

Thanks a lot for the help!


Usage
After installation, edit your dashboard and click the “Add Card” button. Choose the “Manual” box at the very bottom. The card must be configured manually as shown here:

# REQUIRED: Specify the card
type: custom:slide-confirm-card
# REQUIRED: A list of sliders to display
sliders:
    # Text that appears above the slider
  - name: Front Door
    # An icon to appear in front of the name
    icon: mdi:door
    # Default text that appears in the slider
    textUnconfirmed: Slide to Unlock
    # Text that appears when an action is confirmed
    textConfirmed: Door Unlocked!
    # Default icon that appears in the slider knob
    iconUnconfirmed: mdi:lock
    # Icon that appears in the slider knob when an action is confirmed
    iconConfirmed: mdi:lock-open
    confirm_action:
      # Note that only service calls are currently supported!
      action: call-service
      # Example service to call
      service: input_boolean.turn_on
      target:
        # Target entity
        entity_id: input_boolean.slide_confirm
  - name: Back Door
    textUnconfirmed: Slide to Unlock
    textConfirmed: Door Unlocked!
    iconUnconfirmed: mdi:lock
    iconConfirmed: mdi:lock-open
    confirm_action:
      action: call-service
      service: input_boolean.turn_on
      target:
        entity_id: input_boolean.slide_confirm

HACs is basically a 3rd party integration so the Visual Editor isn’t supported unless the the developer included it.

you can add as many slides as you want…

type: custom:slide-confirm-card
sliders:
  - name: Front Door
    icon: mdi:door
    textUnconfirmed: Slide to Unlock
    textConfirmed: Door Unlocked!
    iconUnconfirmed: mdi:lock
    iconConfirmed: mdi:lock-open
    confirm_action:
      action: call-service
      service: input_boolean.turn_on
      target:
        entity_id: input_boolean.slide_confirm
  - name: Back Door
    textUnconfirmed: Slide to Unlock
    textConfirmed: Door Unlocked!
    iconUnconfirmed: mdi:lock
    iconConfirmed: mdi:lock-open
    confirm_action:
      action: call-service
      service: input_boolean.turn_on
      target:
        entity_id: input_boolean.slide_confirm
  - name: Side Door
    textUnconfirmed: Slide to Unlock
    textConfirmed: Door Unlocked!
    iconUnconfirmed: mdi:lock
    iconConfirmed: mdi:lock-open
    confirm_action:
      action: call-service
      service: input_boolean.turn_on
      target:
        entity_id: input_boolean.slide_confirm

Thanks a lot for your reply and example for adding more than 2 bars but why it is not working?
where is written target: i write this

target: lock.door

but if i slide…i am not able to open my door

what is missing?

All the devices in your posted code are input_booleans. What specific device are you trying to control?

Hi and so sorry to disturb you.
i am trying to use a shelly 1 configured like momentary button

this is how mine should look and but it doesnt work

type: custom:slide-confirm-card
sliders:
  - name: Cancello
    icon: mdi:door
    textUnconfirmed: Slide to Unlock
    textConfirmed: Door Unlocked!
    iconUnconfirmed: mdi:lock
    iconConfirmed: mdi:lock-open
    confirm_action:
      action: call-service
      service: input_boolean.turn_on
      target: lock.cancello
      entity_id: input_boolean.slide_confirm

now i noticed that probably writing some different ini the code like space between word or column i get a message down
message

To start…your indentions are off

confirm_action:
      action: call-service
      service: input_boolean.turn_on
      target:
        entity_id: input_boolean.slide_confirm

This line is incorrect

target: lock.cancello

I’ll do some testing. I have to create a template lock, but should be able to provide a resolution.

thanks you are kind i am still fighting with the code but i get always the same error.
i will be waiting thanks again

I don’t think this HACs plugin works the way you think it works

I tried it with a switch, nothing. It does work with the input_boolean so it may be limited to the call-service command.

Call service was changed to Action

thanks a lot, then i should change the way to do that…any suggestion?

I am going to look at the JS and see if it can be adjusted to accommodate the changes in call service to action

The code needs updated

image

action needs to be action not call-service with the HA updates

Liquid really thank you so much for your work.
i dunno if someone is going to update the code but thanks to investigate the cause.
i hope that with time i will be able to do the same…i really would like.
have a nice day!!!

You can always post your issue on the author’s GitHub.

Thank i will try

Hi, just to let you know i messaged the author and the right code is this:

     target: 
      entity_id: lock.cancello

I tried but still not working… so i kept trying and dicovered that for some reason the shelly 1, set as lock doesnt work… and while i am writing to you i did another test with a sonoff.
The sonoff 4 channell that works… well works only 3 channel on 4 the one that doesnt work it is because as the shelly 1 it is momentary buttons… strange.
Probably it work only with on/off buttons and not momentary

Not sure what changed, but today this code worked

type: custom:slide-confirm-card
sliders:
  - name: Front Door
    icon: mdi:door
    textUnconfirmed: Slide to UnLock
    textConfirmed: Door Unlocked!
    iconUnconfirmed: mdi:lock
    iconConfirmed: mdi:lock-open
    confirm_action:
      action: call-service
      service: lock.unlock
      target:
        entity_id: lock.garage_door
  - name: Front Door
    icon: mdi:door
    textUnconfirmed: Slide to Lock
    textConfirmed: Door Locked!
    iconUnconfirmed: mdi:lock
    iconConfirmed: mdi:lock-open
    confirm_action:
      action: call-service
      service: lock.lock
      target:
        entity_id: lock.garage_door

Untitled video

Can you provide a little more clarity on this statement?

What is the Shelly 1 initial device type?

I ask, because a Helper or Template Lock device may help.

I thought we were dealing with a straightforward lock integration

Hi again!!!
I am late but I was away and busy.
Now i pasted your code in my entity configuration and it didnt work cause i think i dont have the service lock.unlock or lock.lock. My service, better the one that author put in, is input_boolean.turn_on.
Some message ago I said that i able with this integration to to turn on and off a light on a shelly 1 that is an on/off switch…well that worked, but i am tying to make it works is a momentary button with a shelly 1. I modified an old intercom where I installed shelly 1 to open the outside door. The shelly close contact for 2 seconds and I set this in shelly app. Home assistant add shelly as a simle on off button but it works fine because it is configured in the app. Anyway after that i add my shelly devices in home assistance, to understand what they do and also to look better, i say to home assistant to turn some in light and others in locks, but all starts being on/off switch when recognized.
Slide to confirm is something so stupid to do but i am getting angry cause it doesn’t work… but i will get over it someday.
Now i am working on PV panell with solarman integration but… as always i am not a lucky man… the integration works but my logger is one that give problems… i cant connect to it, but it is strange because also if it is present on the network with the right IP address i cant access to it or ping it, i can only get access if i reset and connect to the AP wifi with an IP that is out of my lan address
My dear friend I am “working hard” here but bad luck works against me, there is no simple thing.
I hope we will have better days.
Thanks for replying to my posts again