Fixed issue with Bell Assignments
This commit is contained in:
@@ -358,9 +358,15 @@ void CommandHandler::handleSetRelayTimersCommand(JsonVariant contents, const Mes
|
||||
void CommandHandler::handleSetRelayOutputsCommand(JsonVariant contents, const MessageContext& context) {
|
||||
try {
|
||||
_configManager.updateBellOutputs(contents);
|
||||
// Note: Bell outputs are typically not persisted to SD card as they're more of a mapping configuration
|
||||
sendSuccessResponse("set_relay_outputs", "Relay outputs updated", context);
|
||||
LOG_INFO("Relay outputs updated successfully");
|
||||
// Save bell outputs configuration to SD card for persistence
|
||||
bool saved = _configManager.saveBellOutputs();
|
||||
if (saved) {
|
||||
sendSuccessResponse("set_relay_outputs", "Relay outputs updated and saved", context);
|
||||
LOG_INFO("Relay outputs updated and saved successfully");
|
||||
} else {
|
||||
sendErrorResponse("set_relay_outputs", "Failed to save relay outputs to SD card", context);
|
||||
LOG_ERROR("Failed to save relay outputs configuration");
|
||||
}
|
||||
} catch (...) {
|
||||
sendErrorResponse("set_relay_outputs", "Failed to update relay outputs", context);
|
||||
LOG_ERROR("Exception occurred while updating relay outputs");
|
||||
|
||||
Reference in New Issue
Block a user