Adding new component is also relatively straight forward. For ex, have a look at https://github.com/home-assistant/home-assistant/blob/dev/ho... and other components. You implement couple of methods of existing traits, in this case, SwitchDevice.