1
0
mirror of https://github.com/s00500/ESPUI.git synced 2026-02-05 17:02:41 +00:00

Merge branch 'time-retrigger'

This commit is contained in:
2026-01-28 16:10:58 +01:00

View File

@@ -208,6 +208,20 @@ void Control::onWsEvent(String & cmd, String& data)
do // once
{
// Serial.println(String(F("Control::onWsEvent")));
// Handle time response separately - it should not mark the control as changed
// because it's a one-shot response to an updateTime() request, not a state change
// that needs to be broadcast to other clients
if (cmd.equals(F("time")))
{
if (HasCallback())
{
value = data;
SendCallback(TM_VALUE);
}
break;
}
SetControlChangedId(ESPUI.GetNextControlChangeId());
if (!HasCallback())
{
@@ -318,12 +332,6 @@ void Control::onWsEvent(String & cmd, String& data)
// updateControl(c, client->id());
SendCallback(S_VALUE);
}
else if (cmd.equals(F("time")))
{
value = data;
// updateControl(c, client->id());
SendCallback(TM_VALUE);
}
else
{
#if defined(DEBUG_ESPUI)