Unit Type

Returns a 'list' of all units of a specified 'type'


unit type (text, the type of unit from list of: all, real, dimmable, smart, analog, discrete, pseudo, blocked, simulated, security)

Optional Parameters:

with extract (returns a unit record with all data about the unit instead of just the name)
The Extract record is detailed here Unit Extract Record


set MyUnitList to unit type "analog"
write log "we got this many analog units: " & (count of items of MyUnitList)
write log "and here are their names and current values:"
repeat with ThisUnitName in MyUnitList
  write log ThisUnitName & " has a value of " & (value of ThisUnitName)
end repeat


2/25/17 removed reference to “wireless” and “passthrough” as those were legacy types with no important meaning in recent versions.

dictionary/lists/unittype.txt · Last modified: 2017/02/25 13:43 by James Sentman
CC Attribution-No Derivative Works 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0