Device Action not Working As Expected

I have a textbox set up where I can input a pincode into it to eventually disarm my alarm system. I have set a toggle switch set the toggle to checked true when the correct characters are in the textbox.

From there I have set up an event on the toggle switch to turn on a Vera Virtual switch which will run a reactor sensor on the Vera side to disarm my alarm.

The issue is comes about when the correct pincode is inputted in the textbox, the toggle swtich is checked but the Vera V Switch does not turn on. However, if I manually toggle the toggle switch the Vera V switch turns on just fine. Attached is the events I have set on the toggle switch, I cannot seem to figure out why it doesnt work.

Okay so after a bit of digging I think I have figured out the source of the problem. It seems that an EventTrigger will only work the device is physically manipulated. In my case even though the toggle switch is changing states, its’ state is not being manipulated by someone rather something ie in this case the condition where the value in the text box it 1234.

The only trigger I can use in this case is a Data Trigger , is there anyway I can use a Data Trigger to change the state of a physical device?

Edit: Or better yet, use a button as an enter key, which satisfies the need to have a physical state change for an Event Trigger to work. Is there a way to have a sort of ‘and’ condition where the textbox text has to equal a number, and the enter button has to be pressed for an action to be carried out?

Yes. Each Action has Conditions. Use those.

Attached is an example. When you click the Submit Button, it will show a message of “1234 Entered” if 1234 is in the TextBox.
Keypad_TextBox.hrp (3.6 KB)

Thanks Bill I got it working! One more question is it possible to set the value to not be a number. In this case I want the textbox to go red when any combination of numbers except the correct code are entered

Yes. For this I’d recommend changing the default display options to your red color. Then add a Property Trigger so that when the Text equals 1234, set it to Green.
Keypad_TextBox_Color.hrp (3.7 KB)