diff --git a/esphome/dashboard/static/js/esphome.js b/esphome/dashboard/static/js/esphome.js index f6e9979eb2..d80e5e4ec9 100644 --- a/esphome/dashboard/static/js/esphome.js +++ b/esphome/dashboard/static/js/esphome.js @@ -735,6 +735,7 @@ document.querySelectorAll("[data-action='edit']").forEach((button) => { const closeButton = document.querySelector("#js-editor-modal [data-action='close']"); saveButton.setAttribute('data-filename', editorActiveFilename); uploadButton.setAttribute('data-filename', editorActiveFilename); + uploadButton.setAttribute('onClick', `saveFile("${editorActiveFilename}")`); if (editorActiveFilename === "secrets.yaml") { uploadButton.classList.add("disabled"); editorActiveSecrets = true;