Fix crash when having no lights groups

- In this case params[:groups] is nil and .each is undefined
- Now using the final variable in any case
Merge pull request #5 from j15e/no-groups-fix

Fix crash when having no lights groups