Update thermostat.cpp
Update thermostat.cpp

Fix hang (due to infinite loop) when processing schedule with more than one transition, see #2393.

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