mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
picture entity editor fix (#3783)
* forgot to push commit * resolve broken build
This commit is contained in:
parent
37129adfab
commit
9a92ed31f6
@ -7,12 +7,12 @@ import {
|
|||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
|
import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
|
||||||
import "@polymer/paper-toggle-button/paper-toggle-button";
|
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-item";
|
||||||
import "@polymer/paper-listbox/paper-listbox";
|
import "@polymer/paper-listbox/paper-listbox";
|
||||||
|
|
||||||
import "../../components/hui-action-editor";
|
import "../../components/hui-action-editor";
|
||||||
import "../../components/hui-entity-editor";
|
import "../../components/hui-entity-editor";
|
||||||
|
import "../../../../components/ha-switch";
|
||||||
|
|
||||||
import { struct } from "../../common/structs/struct";
|
import { struct } from "../../common/structs/struct";
|
||||||
import {
|
import {
|
||||||
@ -104,9 +104,9 @@ export class HuiPictureEntityCardEditor extends LitElement
|
|||||||
${configElementStyle}
|
${configElementStyle}
|
||||||
<div class="card-config">
|
<div class="card-config">
|
||||||
<ha-entity-picker
|
<ha-entity-picker
|
||||||
label="${this.hass.localize(
|
.label="${this.hass.localize(
|
||||||
"ui.panel.lovelace.editor.card.entity_required"
|
"ui.panel.lovelace.editor.card.entity"
|
||||||
)}"
|
)} (${this.hass.localize("ui.panel.lovelace.editor.card.required")})"
|
||||||
.hass="${this.hass}"
|
.hass="${this.hass}"
|
||||||
.value="${this._entity}"
|
.value="${this._entity}"
|
||||||
.configValue=${"entity"}
|
.configValue=${"entity"}
|
||||||
@ -114,19 +114,25 @@ export class HuiPictureEntityCardEditor extends LitElement
|
|||||||
allow-custom-entity
|
allow-custom-entity
|
||||||
></ha-entity-picker>
|
></ha-entity-picker>
|
||||||
<paper-input
|
<paper-input
|
||||||
label="Name (Optional)"
|
.label="${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.name"
|
||||||
|
)} (${this.hass.localize("ui.panel.lovelace.editor.card.optional")})"
|
||||||
.value="${this._name}"
|
.value="${this._name}"
|
||||||
.configValue="${"name"}"
|
.configValue="${"name"}"
|
||||||
@value-changed="${this._valueChanged}"
|
@value-changed="${this._valueChanged}"
|
||||||
></paper-input>
|
></paper-input>
|
||||||
<paper-input
|
<paper-input
|
||||||
label="Image Url (Optional)"
|
.label="${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.image"
|
||||||
|
)} (${this.hass.localize("ui.panel.lovelace.editor.card.optional")})"
|
||||||
.value="${this._image}"
|
.value="${this._image}"
|
||||||
.configValue="${"image"}"
|
.configValue="${"image"}"
|
||||||
@value-changed="${this._valueChanged}"
|
@value-changed="${this._valueChanged}"
|
||||||
></paper-input>
|
></paper-input>
|
||||||
<ha-entity-picker
|
<ha-entity-picker
|
||||||
label="Camera Image (Optional)"
|
.label="${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.camera_image"
|
||||||
|
)} (${this.hass.localize("ui.panel.lovelace.editor.card.optional")})"
|
||||||
.hass="${this.hass}"
|
.hass="${this.hass}"
|
||||||
.value="${this._camera_image}"
|
.value="${this._camera_image}"
|
||||||
.configValue=${"camera_image"}
|
.configValue=${"camera_image"}
|
||||||
@ -136,7 +142,11 @@ export class HuiPictureEntityCardEditor extends LitElement
|
|||||||
></ha-entity-picker>
|
></ha-entity-picker>
|
||||||
<div class="side-by-side">
|
<div class="side-by-side">
|
||||||
<paper-dropdown-menu
|
<paper-dropdown-menu
|
||||||
label="Camera View (Optional)"
|
.label="${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.camera_view"
|
||||||
|
)} (${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.optional"
|
||||||
|
)})"
|
||||||
.configValue="${"camera_view"}"
|
.configValue="${"camera_view"}"
|
||||||
@value-changed="${this._valueChanged}"
|
@value-changed="${this._valueChanged}"
|
||||||
>
|
>
|
||||||
@ -152,7 +162,11 @@ export class HuiPictureEntityCardEditor extends LitElement
|
|||||||
</paper-listbox>
|
</paper-listbox>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
<paper-input
|
<paper-input
|
||||||
label="Aspect Ratio (Optional)"
|
.label="${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.aspect_ratio"
|
||||||
|
)} (${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.optional"
|
||||||
|
)})"
|
||||||
type="number"
|
type="number"
|
||||||
.value="${Number(this._aspect_ratio.replace("%", ""))}"
|
.value="${Number(this._aspect_ratio.replace("%", ""))}"
|
||||||
.configValue="${"aspect_ratio"}"
|
.configValue="${"aspect_ratio"}"
|
||||||
@ -160,22 +174,30 @@ export class HuiPictureEntityCardEditor extends LitElement
|
|||||||
></paper-input>
|
></paper-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="side-by-side">
|
<div class="side-by-side">
|
||||||
<paper-toggle-button
|
<ha-switch
|
||||||
?checked="${this._show_name !== false}"
|
?checked="${this._show_name !== false}"
|
||||||
.configValue="${"show_name"}"
|
.configValue="${"show_name"}"
|
||||||
@change="${this._valueChanged}"
|
@change="${this._valueChanged}"
|
||||||
>Show Name?</paper-toggle-button
|
>${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.show_name"
|
||||||
|
)}</ha-switch
|
||||||
>
|
>
|
||||||
<paper-toggle-button
|
<ha-switch
|
||||||
?checked="${this._show_state !== false}"
|
?checked="${this._show_state !== false}"
|
||||||
.configValue="${"show_state"}"
|
.configValue="${"show_state"}"
|
||||||
@change="${this._valueChanged}"
|
@change="${this._valueChanged}"
|
||||||
>Show State?</paper-toggle-button
|
>${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.show_state"
|
||||||
|
)}</ha-switch
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="side-by-side">
|
<div class="side-by-side">
|
||||||
<hui-action-editor
|
<hui-action-editor
|
||||||
label="Tap Action (Optional)"
|
.label="${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.tap_action"
|
||||||
|
)} (${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.optional"
|
||||||
|
)})"
|
||||||
.hass="${this.hass}"
|
.hass="${this.hass}"
|
||||||
.config="${this._tap_action}"
|
.config="${this._tap_action}"
|
||||||
.actions="${actions}"
|
.actions="${actions}"
|
||||||
@ -183,7 +205,11 @@ export class HuiPictureEntityCardEditor extends LitElement
|
|||||||
@action-changed="${this._valueChanged}"
|
@action-changed="${this._valueChanged}"
|
||||||
></hui-action-editor>
|
></hui-action-editor>
|
||||||
<hui-action-editor
|
<hui-action-editor
|
||||||
label="Hold Action (Optional)"
|
.label="${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.hold_action"
|
||||||
|
)} (${this.hass.localize(
|
||||||
|
"ui.panel.lovelace.editor.card.optional"
|
||||||
|
)})"
|
||||||
.hass="${this.hass}"
|
.hass="${this.hass}"
|
||||||
.config="${this._hold_action}"
|
.config="${this._hold_action}"
|
||||||
.actions="${actions}"
|
.actions="${actions}"
|
||||||
|
@ -1111,14 +1111,20 @@
|
|||||||
"para_migrate": "Home Assistant can add ID's to all your cards and views automatically for you by pressing the 'Migrate config' button.",
|
"para_migrate": "Home Assistant can add ID's to all your cards and views automatically for you by pressing the 'Migrate config' button.",
|
||||||
"migrate": "Migrate config"
|
"migrate": "Migrate config"
|
||||||
},
|
},
|
||||||
"theme": {
|
|
||||||
"theme": "Theme (Optional)"
|
|
||||||
},
|
|
||||||
"card": {
|
"card": {
|
||||||
"entity": {
|
"required": "Required",
|
||||||
"required": "Entity (Required)",
|
"optional": "Optional",
|
||||||
"optitional": "Entity (Optional)"
|
"aspect_ratio": "Aspect Ratio",
|
||||||
}
|
"camera_image": "Camera Entity",
|
||||||
|
"camera_view": "Camera View",
|
||||||
|
"entity": "Entity",
|
||||||
|
"hold_action": "Hold Action",
|
||||||
|
"image": "Image Path",
|
||||||
|
"name": "Name",
|
||||||
|
"show_name": "Show Name?",
|
||||||
|
"show_state": "Show State?",
|
||||||
|
"tap_action": "Tap Action",
|
||||||
|
"theme": "Theme"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user