Setup Pin for Disarm

I have virtual switches added to home remote as devices to arm/disarm the konnected alarm using smartthings.
Is there a way to add a prompt to verify pin before the disarm deivce actually disarms the system?
Disarm is a device added to the home remote.

1 Like

Yes. This can be done but it will require some scripting. There currently isn’t an in-app option for this. You’ll need the Designer.

Thanks for prompt response. I have the designer installed, just do not know how can I make a device tile pin protected.

Attached is example you can use. Copy the file “SwitchTileWithPin.xaml” into the Pages folder of project. Then update the TileTemplate property on your virtual switch to use the new template.
SwitchTileWithPin.xaml (3 KB)

That template will prompt you for the pin of 1234 when you try to turn the switch off. I’m assuming Off is Disarm for your virtual switch. You will need to edit the script to change the password.

Here is the full example.
TileWithPin.hrp (104.9 KB)

Thanks I just used the script action to do it and it is working fine.’
I created a Switch1.xaml and added the below script in script action on Clicked
var promptResult = prompt(“Please enter the pin number (1234):”);
if(promptResult == “2948”)
App.SetDeviceAttribute("@Device.Switch", “On”);
App.SetDeviceAttribute("@Device.Switch", “Off”);