mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-19 18:28:42 +00:00
Pass hass to ha-yaml-editors (and others) (#28485)
This commit is contained in:
@@ -17,6 +17,7 @@ export class HaTraceBlueprintConfig extends LitElement {
|
||||
return html`
|
||||
<ha-code-editor
|
||||
.value=${dump(this.trace.blueprint_inputs || "").trimRight()}
|
||||
.hass=${this.hass}
|
||||
read-only
|
||||
dir="ltr"
|
||||
></ha-code-editor>
|
||||
|
||||
@@ -17,6 +17,7 @@ export class HaTraceConfig extends LitElement {
|
||||
return html`
|
||||
<ha-code-editor
|
||||
.value=${dump(this.trace.config).trimRight()}
|
||||
.hass=${this.hass}
|
||||
read-only
|
||||
dir="ltr"
|
||||
></ha-code-editor>
|
||||
|
||||
@@ -278,6 +278,7 @@ export class HaTracePathDetails extends LitElement {
|
||||
return config
|
||||
? html`<ha-code-editor
|
||||
.value=${dump(config).trimEnd()}
|
||||
.hass=${this.hass}
|
||||
read-only
|
||||
dir="ltr"
|
||||
></ha-code-editor>`
|
||||
|
||||
@@ -109,6 +109,7 @@ export class HaConditionAction
|
||||
<ha-list-item .value=${opt} graphic="icon">
|
||||
${label}
|
||||
<ha-condition-icon
|
||||
.hass=${this.hass}
|
||||
slot="graphic"
|
||||
.condition=${condition}
|
||||
></ha-condition-icon>
|
||||
|
||||
@@ -450,6 +450,7 @@ class DialogAddAutomationElement
|
||||
|
||||
return html`
|
||||
<ha-wa-dialog
|
||||
.hass=${this.hass}
|
||||
width="large"
|
||||
.open=${this._open}
|
||||
@closed=${this._handleClosed}
|
||||
|
||||
@@ -114,6 +114,7 @@ class DialogImportBlueprint extends LitElement {
|
||||
<ha-code-editor
|
||||
mode="yaml"
|
||||
.value=${this._result.raw_data}
|
||||
.hass=${this.hass}
|
||||
read-only
|
||||
dir="ltr"
|
||||
></ha-code-editor>
|
||||
|
||||
@@ -311,6 +311,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
||||
></ha-state-icon>
|
||||
`
|
||||
: html`<ha-domain-icon
|
||||
.hass=${this.hass}
|
||||
.domain=${computeDomain(entry.entity_id)}
|
||||
></ha-domain-icon>`,
|
||||
},
|
||||
|
||||
@@ -46,7 +46,8 @@ class DialogSSDPRawData extends LitElement implements HassDialog {
|
||||
<ha-code-editor
|
||||
mode="yaml"
|
||||
.value=${dump(this._params.data)}
|
||||
readonly
|
||||
.hass=${this.hass}
|
||||
read-only
|
||||
autofocus
|
||||
></ha-code-editor>
|
||||
</ha-dialog>
|
||||
|
||||
@@ -35,7 +35,13 @@ class ZHADeviceZigbeeInfo extends LitElement {
|
||||
}
|
||||
|
||||
return html`
|
||||
<ha-code-editor mode="yaml" readOnly .value=${this._signature} dir="ltr">
|
||||
<ha-code-editor
|
||||
mode="yaml"
|
||||
read-only
|
||||
.hass=${this.hass}
|
||||
.value=${this._signature}
|
||||
dir="ltr"
|
||||
>
|
||||
</ha-code-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,12 @@ const dataMinusKeysRender = (
|
||||
<span slot="header"
|
||||
>${hass.localize("ui.panel.config.voice_assistants.debug.raw")}</span
|
||||
>
|
||||
<ha-yaml-editor readOnly autoUpdate .value=${result}></ha-yaml-editor>
|
||||
<ha-yaml-editor
|
||||
readOnly
|
||||
autoUpdate
|
||||
.hass=${hass}
|
||||
.value=${result}
|
||||
></ha-yaml-editor>
|
||||
</ha-expansion-panel>`
|
||||
: "";
|
||||
};
|
||||
@@ -237,6 +242,7 @@ export class AssistPipelineDebug extends LitElement {
|
||||
<ha-yaml-editor
|
||||
read-only
|
||||
auto-update
|
||||
.hass=${this.hass}
|
||||
.value=${content}
|
||||
></ha-yaml-editor>
|
||||
</ha-expansion-panel>
|
||||
@@ -265,6 +271,7 @@ export class AssistPipelineDebug extends LitElement {
|
||||
<ha-yaml-editor
|
||||
read-only
|
||||
auto-update
|
||||
.hass=${this.hass}
|
||||
.value=${content.tool_calls}
|
||||
></ha-yaml-editor>
|
||||
</ha-expansion-panel>
|
||||
@@ -528,6 +535,7 @@ export class AssistPipelineDebug extends LitElement {
|
||||
<ha-yaml-editor
|
||||
read-only
|
||||
auto-update
|
||||
.hass=${this.hass}
|
||||
.value=${this.pipelineRun}
|
||||
></ha-yaml-editor>
|
||||
</ha-expansion-panel>
|
||||
|
||||
@@ -70,6 +70,7 @@ class HaPanelDevEvent extends LitElement {
|
||||
</div>
|
||||
<div class="code-editor">
|
||||
<ha-yaml-editor
|
||||
.hass=${this.hass}
|
||||
.value=${this._eventData}
|
||||
.error=${!this._isValid}
|
||||
@value-changed=${this._yamlChanged}
|
||||
|
||||
@@ -103,6 +103,7 @@ class EventSubscribeCard extends LitElement {
|
||||
this.hass!.config
|
||||
)}:
|
||||
<ha-yaml-editor
|
||||
.hass=${this.hass}
|
||||
.defaultValue=${event.event}
|
||||
read-only
|
||||
></ha-yaml-editor>
|
||||
|
||||
@@ -180,6 +180,7 @@ class HaPanelDevState extends LitElement {
|
||||
)}
|
||||
</p>
|
||||
<ha-yaml-editor
|
||||
.hass=${this.hass}
|
||||
.value=${this._stateAttributes}
|
||||
.error=${!this._validJSON}
|
||||
@value-changed=${this._yamlChanged}
|
||||
|
||||
Reference in New Issue
Block a user