Refactoring of previous fix: merge if statements to be more efficient.
Refactoring of previous fix: merge if statements to be more efficient.

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