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