Still trying to wrap my head around the way this system works. I am currently trying to create an automation that will lock my front door whenever my alarm system is armed. My current script does not seem to be working. Please advise
I’m more familiar with writing automations in YAML (backend code) and also using service calls rather than device functions but I’ll take a stab at it.
Depending how your alarm is configured, your alarm may not go from disarmed to armed right away. There may be an intermediate “pending” state. Typically triggers only need a from state or to state, not both unless you’re trying to be really specific.
As for the action, if you put the same action section into a script, does the script lock the lock? If it does then you’re fine and it’s just your triggers that need some work. If the lock doesn’t lock, I’d suggest trying to use the service call option of
lock.lock Or whatever it is and specify your lock entity then try the automation again.
Well I also created an automation backwards of that one to unlock on disarm, which would technically have no pending time and it didn’t work either. When I execute the automation the lock works so I think it’s definitely an issue with the trigger as you said. FYI I’m using an AD2USB to integrate to my vista 20p alarm.