Define a specific property by object type

Hi,
I’m doing an addon where I want to store in light objects a property that I could use later.

I think I can’t use bpy.types.Object.myProperty = IntProperty() because each light could have different values.
I could create a custom property but I’d like to have this property placed in the same area than my other addon functions.

So I don’t know how to create something very similar to a custom property but already created with a default value when an object is created or imported and displayed only in the light panel.

There are two separate things:

a) The creation of a custom property
b) Display of that property

a)
If you only want this to be stored for lamp objects, use bpy.types.Lamp:

bpy.types.Lamp.my_prop = bpy.props.IntProperty(default=100)

print(bpy.data.objects['Lamp'].data.my_prop) # prints 100

Just give it a default value, maybe also min, max and so on. You should register the property in register() of your addon, and unregister in unregister().

b)
If you want to display the property in an existing panel, you can either append or prepend a draw function to the panel. That function has the same signature as a draw() method of a bpy.types.Panel subclass:

def draw_func(self, context):
    layout = self.layout
    lamp = context.object.data

    # We don't need any checks here, the lamp panels are only shown if there's a context object of type lamp
    layout.prop(lamp, "my_prop")

Thank you CoDEmanX, that’s exactly what I needed.