Difference between revisions of "Talk:App Object"

From Hubitat Documentation
Jump to: navigation, search
(Created page with "The documentation page indicates that '''addChildDevice()''' has four arguments. * String namespace * String typeName * String deviceNetworkId * Map properties = [:]) Exampl...")
 
 
Line 9: Line 9:
  
 
   addChildDevice("hubitat", "Virtual Illuminance Sensor", "AverageLux_${app.id}", '''null''', [label: thisName, name: thisName])
 
   addChildDevice("hubitat", "Virtual Illuminance Sensor", "AverageLux_${app.id}", '''null''', [label: thisName, name: thisName])
 +
 +
-- Fixed in the documentation.

Latest revision as of 14:31, 12 February 2020

The documentation page indicates that addChildDevice() has four arguments.

  • String namespace
  • String typeName
  • String deviceNetworkId
  • Map properties = [:])

Examples, like averageIlluminance.groovy suggest a fifth argument is required. From that file, see the "null" argument in the following example:

 addChildDevice("hubitat", "Virtual Illuminance Sensor", "AverageLux_${app.id}", null, [label: thisName, name: thisName])

-- Fixed in the documentation.