Creating custom attribute not working


I am trying to add a custom attribute to my device handler as below:-

command "setDoorState", ["string"]    
attribute "control", "enum", ["opening", "closing", "NA"]

On using the control from the UI send event using the following command:-

sendEvent(name: "control", value: "opening")

And then I subscribe to it in my SmartApp like below:-

subscribe(garageDoor, "control", garageDoorControl)

I never get the event to my App, I can see in the logs that the function is being call in the device handler.

So I continued testing the code, so the same code works if I manually create a device using my device handler. The above code does not work if I create the device from my SmartApp.

I am creating the device in installed() before I call subscribe(). So the device is created before I try subscribing.

Any Ideas?