       for virtualId, deviceOpts of deviceMap
         console.log virtualId, deviceOpts
 
-        if Device = @deviceTypes[deviceClass]?[deviceOpts.type]
+        if Device = @deviceClasses[deviceClass]?[deviceOpts.type]
           device = new Device deviceOpts
         else
           throw new Error "Unkdown device type #{ deviceOpts.type }"

    @groups = {}
    @hosts = {}

  deviceTypes:
    lights:
      rgb: enttec.RGBLight


        @hosts[hostName] = new Host hostOpts
        console.log "Host:", hostName, hostOpts.type
      else
        throw new Error "Unknown host type #{ hostOpts.type }"

    for deviceClass, deviceMap of @setup.mapping

