dictionary:unitinformation:getunitproperty
This is an old revision of the document!
Table of Contents
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.
Usage:
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.
Examples:
set BatteryChangedDate to (get unit property "last batt change" from unit "kitchen motion") write log "battery was on " BatteryCHangedDate as text
Notes:
- from unit is optional if the script is an ON or OFF script for a unit in which case it will try to use the thisUnit value.
- see also set unit property
- see also Unit Properties
dictionary/unitinformation/getunitproperty.1254174203.txt.gz · Last modified: 2023/02/13 14:51 (external edit)