This one is triggered anytime there is a change in the status of the lock..
I want to keep track of the time of the last status change, and what the last status update was
The time part of this works fine, but the status part doesn't. Regardless of the state the lock (on or off), the script always puts "Un-Locked!" into the variable...
- Code: Select all
tell application "IndigoServer"
set value of variable "LockTime" to (time string of (current date))
if on state of device named "Front Door Lock" is "true" then
set value of variable "FrontDoor" to "Locked!"
else
set value of variable "FrontDoor" to "Un-Locked!"
end if
end tell
Do I need to do some kind of "get status", or does the "if on state..." line do the same thing?