Updated API docs
Refactor: code moved to new helper and constants file. Also adds support for multiple types for switch/light components.
Fix some style warnings by PyCharm