Update expose mobile view (#16302)

This commit is contained in:
Bram Kragten 2023-04-25 15:33:21 +02:00 committed by GitHub
parent ce8fc17ef8
commit 327927baa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 12 deletions

View File

@ -44,7 +44,7 @@ class DialogVoiceSettings extends LitElement {
.heading=${createCloseHeading(
this.hass,
computeEntityRegistryName(this.hass, this._extEntityReg) ||
"Unnamed entity"
this.hass.localize("ui.panel.config.entities.picker.unnamed_entity")
)}
>
<div>

View File

@ -103,6 +103,7 @@ export class VoiceAssistantsExpose extends SubscribeMixin(LitElement) {
icon: {
title: "",
type: "icon",
hidden: narrow,
template: (_, entry) => html`
<ha-state-icon
title=${ifDefined(entry.entity?.state)}
@ -119,13 +120,11 @@ export class VoiceAssistantsExpose extends SubscribeMixin(LitElement) {
filterable: true,
direction: "asc",
grows: true,
template: narrow
? (name, entry) =>
html`
${name}<br />
<div class="secondary">${entry.entity_id}</div>
`
: undefined,
template: (name, entry) =>
html`
${name}<br />
<div class="secondary">${entry.entity_id}</div>
`,
},
area: {
title: this.hass.localize(
@ -181,6 +180,7 @@ export class VoiceAssistantsExpose extends SubscribeMixin(LitElement) {
),
sortable: true,
filterable: true,
hidden: narrow,
width: "15%",
template: (aliases) =>
aliases.length === 0
@ -195,6 +195,7 @@ export class VoiceAssistantsExpose extends SubscribeMixin(LitElement) {
remove: {
title: "",
type: "icon-button",
hidden: narrow,
template: () =>
html`<ha-icon-button
@click=${this._removeEntity}
@ -298,10 +299,14 @@ export class VoiceAssistantsExpose extends SubscribeMixin(LitElement) {
result[entry.entity_id] = {
entity_id: entry.entity_id,
entity,
name: computeEntityRegistryName(
this.hass!,
entry as EntityRegistryEntry
),
name:
computeEntityRegistryName(
this.hass!,
entry as EntityRegistryEntry
) ||
this.hass.localize(
"ui.panel.config.entities.picker.unnamed_entity"
),
area: area ? area.name : "—",
assistants: Object.keys(
extEntities![entry.entity_id].options!

View File

@ -3014,6 +3014,7 @@
"introduction": "Home Assistant keeps a registry of every entity it has ever seen that can be uniquely identified. Each of these entities will have an entity ID assigned which will be reserved for just this entity.",
"introduction2": "Use the entity registry to override the name, change the entity ID or remove the entry from Home Assistant.",
"search": "Search entities",
"unnamed_entity": "Unnamed entity",
"filter": {
"filter": "Filter",
"show_hidden": "Show hidden entities",