Fix Mod-S (Ctrl-S/Cmd-S) support for automation/scene/script YAML editors (#26412)

* Fix automation and script yaml mode Mod-S (Ctrl/Cmd-S) support

* Fix manual script editor

* Fix manual automation editor save

* Fix scene yaml mode
This commit is contained in:
Aidan Timson 2025-08-06 17:52:41 +01:00 committed by GitHub
parent c2c64b9923
commit fca530411f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View File

@ -487,6 +487,7 @@ export class HaAutomationEditor extends PreventUnsavedMixin(
.disabled=${Boolean(this._readOnly)}
.dirty=${this._dirty}
@value-changed=${this._valueChanged}
@editor-save=${this._handleSaveAutomation}
></manual-automation-editor>
`}
</div>
@ -517,6 +518,7 @@ export class HaAutomationEditor extends PreventUnsavedMixin(
.defaultValue=${this._preprocessYaml()}
.readOnly=${this._readOnly}
@value-changed=${this._yamlChanged}
@editor-save=${this._handleSaveAutomation}
.showErrors=${false}
disable-fullscreen
></ha-yaml-editor>`

View File

@ -320,6 +320,7 @@ export class HaSceneEditor extends PreventUnsavedMixin(
.hass=${this.hass}
.defaultValue=${this._config}
@value-changed=${this._yamlChanged}
@editor-save=${this._saveScene}
.showErrors=${false}
disable-fullscreen
></ha-yaml-editor>`;

View File

@ -438,6 +438,7 @@ export class HaScriptEditor extends SubscribeMixin(
.disabled=${this._readOnly}
.dirty=${this._dirty}
@value-changed=${this._valueChanged}
@editor-save=${this._handleSave}
></manual-script-editor>
`}
</div>
@ -450,6 +451,7 @@ export class HaScriptEditor extends SubscribeMixin(
.readOnly=${this._readOnly}
disable-fullscreen
@value-changed=${this._yamlChanged}
@editor-save=${this._handleSave}
.showErrors=${false}
></ha-yaml-editor>`
: nothing}