Picture elements editor minor adjustments (#21512)

* Picture elements editor minor adjustments

* image selector for image element

* revert change to expanded
This commit is contained in:
karwosts 2024-08-01 01:43:08 -07:00 committed by GitHub
parent adceed689b
commit 1ca0b58aca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 5 deletions

View File

@ -45,7 +45,14 @@ export class HaImageSelector extends LitElement {
return html`
<div>
<label>
${this.hass.localize("ui.components.selectors.image.select_image")}
${this.hass.localize(
"ui.components.selectors.image.select_image_with_label",
{
label:
this.label ||
this.hass.localize("ui.components.selectors.image.image"),
}
)}
<ha-formfield
.label=${this.hass.localize("ui.components.selectors.image.upload")}
>

View File

@ -41,7 +41,7 @@ const SCHEMA = [
ui_action: {},
},
},
{ name: "image", selector: { text: {} } },
{ name: "image", selector: { image: {} } },
{ name: "camera_image", selector: { entity: { domain: "camera" } } },
{
name: "camera_view",

View File

@ -74,8 +74,8 @@ export class HuiPictureElementsCardEditor
),
schema: [
{ name: "title", selector: { text: {} } },
{ name: "image", selector: { text: {} } },
{ name: "dark_mode_image", selector: { text: {} } },
{ name: "image", selector: { image: {} } },
{ name: "dark_mode_image", selector: { image: {} } },
{
name: "camera_image",
selector: { entity: { domain: "camera" } },

View File

@ -379,7 +379,8 @@
"unknown_file": "Unknown file"
},
"image": {
"select_image": "Select image",
"image": "image",
"select_image_with_label": "Select {label}",
"upload": "Upload picture",
"url": "Local path or web URL"
},