Send websockets on every state change

This commit is contained in:
cschwinne
2021-07-02 00:24:14 +02:00
parent 801df94446
commit dc01c907f1
9 changed files with 202 additions and 172 deletions

View File

@@ -115,7 +115,7 @@ void colorUpdated(int callMode)
notify(callMode);
//set flag to update blynk and mqtt
//set flag to update blynk, ws and mqtt
interfaceUpdateCallMode = callMode;
} else {
if (nightlightActive && !nightlightActiveOld &&
@@ -180,6 +180,11 @@ void colorUpdated(int callMode)
void updateInterfaces(uint8_t callMode)
{
sendDataWs();
if (callMode == NOTIFIER_CALL_MODE_WS_SEND) {
lastInterfaceUpdate = millis();
return;
}
#ifndef WLED_DISABLE_ALEXA
if (espalexaDevice != nullptr && callMode != NOTIFIER_CALL_MODE_ALEXA) {
espalexaDevice->setValue(bri);