mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fix web color rendering for mqtt fails
This commit is contained in:
@@ -52,5 +52,5 @@ export const mqttPublishHighlight = ({ mqtt_fails }: MqttStatus, theme: Theme) =
|
||||
if (mqtt_fails < 10)
|
||||
return theme.palette.warning.main;
|
||||
|
||||
return theme.palette.success.main;
|
||||
return theme.palette.error.main;
|
||||
}
|
||||
@@ -215,6 +215,8 @@ StateUpdateResult MqttSettings::update(JsonObject & root, MqttSettings & setting
|
||||
emsesp::EMSESP::mqtt_.set_publish_time(newSettings.publish_time);
|
||||
}
|
||||
|
||||
emsesp::EMSESP::mqtt_.reset_publish_fails(); // reset fail counter back to 0
|
||||
|
||||
settings = newSettings;
|
||||
|
||||
return StateUpdateResult::CHANGED;
|
||||
|
||||
Reference in New Issue
Block a user