Update rest_lights.cpp
Update rest_lights.cpp

Refactor `setLightState()`, see #2475.

dresden-elektronik/deconz-rest-plugin,dresden-elektronik/deconz-rest-plugin,dresden-elektronik/deconz-rest-plugin,dresden-elektronik/deconz-rest-plugin,dresden-elektronik/deconz-rest-plugin