Get Unit Property

Unit Properties can store any applescript object by key names. Some devices send extra keyed info that is stored here, like low battery flags. Many other datapoints are saved here for you to access and you can store anything specific to the unit that you wish here also. I store the date when I last changed the batteries in a unit in here.


get unit property (text, key name of the property)
from unit (text, the name of the unit)
returns whatever object was stored under that key for that unit, or nothing.


set BatteryChangedDate to (get unit property "last batt change" from unit "kitchen motion")
write log "battery was on " BatteryCHangedDate as text


dictionary/unitinformation/getunitproperty.txt · Last modified: 2009/09/28 17:43 by James Sentman
CC Attribution-No Derivative Works 3.0 Unported Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0