light: stop the update request from running twice

In case the rgb+white(cct) brightness function was selected by the
configuration, internal calculations will always result in 'changed' being 'true'
and as a result it will continiously re-create the transition object.

fix #2467 (at least for now, the brightness function should be actually fixed)
This commit is contained in:
Maxim Prokhorov
2021-08-27 23:28:10 +03:00
parent 188414b431
commit a55cf0b847

View File

@@ -1333,6 +1333,7 @@ struct LightUpdateHandler {
template <typename T>
void run(T&& callback) {
if (_run) {
_run = false;
LightUpdate update{_update};
callback(update.save, update.transition, update.report);
}