mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-28 23:37:20 +00:00
Update text around updating cloud entity exposed defaults (#12954)
This commit is contained in:
parent
9a3b4d6df2
commit
e765d7749c
@ -47,10 +47,14 @@ class DomainTogglerDialog
|
|||||||
hideActions
|
hideActions
|
||||||
.heading=${createCloseHeading(
|
.heading=${createCloseHeading(
|
||||||
this.hass,
|
this.hass,
|
||||||
|
this._params.title ||
|
||||||
this.hass.localize("ui.dialogs.domain_toggler.title")
|
this.hass.localize("ui.dialogs.domain_toggler.title")
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div>
|
${this._params.description
|
||||||
|
? html`<div class="description">${this._params.description}</div>`
|
||||||
|
: ""}
|
||||||
|
<div class="domains">
|
||||||
${domains.map(
|
${domains.map(
|
||||||
(domain) =>
|
(domain) =>
|
||||||
html`
|
html`
|
||||||
@ -92,7 +96,10 @@ class DomainTogglerDialog
|
|||||||
ha-dialog {
|
ha-dialog {
|
||||||
--mdc-dialog-max-width: 500px;
|
--mdc-dialog-max-width: 500px;
|
||||||
}
|
}
|
||||||
div {
|
.description {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.domains {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto auto;
|
grid-template-columns: auto auto;
|
||||||
grid-row-gap: 8px;
|
grid-row-gap: 8px;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
|
||||||
export interface HaDomainTogglerDialogParams {
|
export interface HaDomainTogglerDialogParams {
|
||||||
|
title?: string;
|
||||||
|
description?: string;
|
||||||
domains: string[];
|
domains: string[];
|
||||||
exposedDomains: string[] | null;
|
exposedDomains: string[] | null;
|
||||||
toggleDomain: (domain: string, turnOn: boolean) => void;
|
toggleDomain: (domain: string, turnOn: boolean) => void;
|
||||||
|
@ -232,7 +232,7 @@ class CloudAlexa extends SubscribeMixin(LitElement) {
|
|||||||
slot="toolbar-icon"
|
slot="toolbar-icon"
|
||||||
@click=${this._openDomainToggler}
|
@click=${this._openDomainToggler}
|
||||||
>${this.hass!.localize(
|
>${this.hass!.localize(
|
||||||
"ui.panel.config.cloud.alexa.manage_domains"
|
"ui.panel.config.cloud.alexa.manage_defaults"
|
||||||
)}</mwc-button
|
)}</mwc-button
|
||||||
>
|
>
|
||||||
`
|
`
|
||||||
@ -402,6 +402,10 @@ class CloudAlexa extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
private _openDomainToggler() {
|
private _openDomainToggler() {
|
||||||
showDomainTogglerDialog(this, {
|
showDomainTogglerDialog(this, {
|
||||||
|
title: this.hass!.localize("ui.panel.config.cloud.alexa.manage_defaults"),
|
||||||
|
description: this.hass!.localize(
|
||||||
|
"ui.panel.config.cloud.alexa.manage_defaults_dialog_description"
|
||||||
|
),
|
||||||
domains: this._entities!.map((entity) =>
|
domains: this._entities!.map((entity) =>
|
||||||
computeDomain(entity.entity_id)
|
computeDomain(entity.entity_id)
|
||||||
).filter((value, idx, self) => self.indexOf(value) === idx),
|
).filter((value, idx, self) => self.indexOf(value) === idx),
|
||||||
|
@ -256,7 +256,7 @@ class CloudGoogleAssistant extends SubscribeMixin(LitElement) {
|
|||||||
slot="toolbar-icon"
|
slot="toolbar-icon"
|
||||||
@click=${this._openDomainToggler}
|
@click=${this._openDomainToggler}
|
||||||
>${this.hass!.localize(
|
>${this.hass!.localize(
|
||||||
"ui.panel.config.cloud.google.manage_domains"
|
"ui.panel.config.cloud.google.manage_defaults"
|
||||||
)}</mwc-button
|
)}</mwc-button
|
||||||
>
|
>
|
||||||
`
|
`
|
||||||
@ -442,6 +442,12 @@ class CloudGoogleAssistant extends SubscribeMixin(LitElement) {
|
|||||||
|
|
||||||
private _openDomainToggler() {
|
private _openDomainToggler() {
|
||||||
showDomainTogglerDialog(this, {
|
showDomainTogglerDialog(this, {
|
||||||
|
title: this.hass!.localize(
|
||||||
|
"ui.panel.config.cloud.google.manage_defaults"
|
||||||
|
),
|
||||||
|
description: this.hass!.localize(
|
||||||
|
"ui.panel.config.cloud.google.manage_defaults_dialog_description"
|
||||||
|
),
|
||||||
domains: this._entities!.map((entity) =>
|
domains: this._entities!.map((entity) =>
|
||||||
computeDomain(entity.entity_id)
|
computeDomain(entity.entity_id)
|
||||||
).filter((value, idx, self) => self.indexOf(value) === idx),
|
).filter((value, idx, self) => self.indexOf(value) === idx),
|
||||||
|
@ -1010,7 +1010,7 @@
|
|||||||
},
|
},
|
||||||
"domain_toggler": {
|
"domain_toggler": {
|
||||||
"title": "Toggle Domains",
|
"title": "Toggle Domains",
|
||||||
"reset_entities": "Reset Entities"
|
"reset_entities": "Reset Entity overrides"
|
||||||
},
|
},
|
||||||
"mqtt_device_debug_info": {
|
"mqtt_device_debug_info": {
|
||||||
"title": "{device} debug info",
|
"title": "{device} debug info",
|
||||||
@ -2431,15 +2431,16 @@
|
|||||||
},
|
},
|
||||||
"alexa": {
|
"alexa": {
|
||||||
"title": "Alexa",
|
"title": "Alexa",
|
||||||
"banner": "Editing which entities are exposed via this UI is disabled because you have configured entity filters in configuration.yaml.",
|
"banner": "[%key:ui::panel::config::cloud::google::banner%]",
|
||||||
"exposed_entities": "Exposed entities",
|
"exposed_entities": "[%key:ui::panel::config::cloud::google::exposed_entities%]",
|
||||||
"not_exposed_entities": "Not exposed entities",
|
"not_exposed_entities": "[%key:ui::panel::config::cloud::google::not_exposed_entities%]",
|
||||||
"manage_domains": "Manage domains",
|
"manage_defaults": "[%key:ui::panel::config::cloud::google::manage_defaults%]",
|
||||||
"expose_entity": "Expose entity",
|
"manage_defaults_dialog_description": "[%key:ui::panel::config::cloud::google::manage_defaults_dialog_description%]",
|
||||||
"dont_expose_entity": "Don't expose entity",
|
"expose_entity": "[%key:ui::panel::config::cloud::google::expose_entity%]",
|
||||||
"follow_domain": "Follow domain",
|
"dont_expose_entity": "[%key:ui::panel::config::cloud::google::dont_expose_entity%]",
|
||||||
"exposed": "{selected} exposed",
|
"follow_domain": "[%key:ui::panel::config::cloud::google::follow_domain%]",
|
||||||
"not_exposed": "{selected} not exposed",
|
"exposed": "[%key:ui::panel::config::cloud::google::exposed%]",
|
||||||
|
"not_exposed": "[%key:ui::panel::config::cloud::google::not_exposed%]",
|
||||||
"expose": "Expose to Alexa"
|
"expose": "Expose to Alexa"
|
||||||
},
|
},
|
||||||
"dialog_certificate": {
|
"dialog_certificate": {
|
||||||
@ -2456,7 +2457,8 @@
|
|||||||
"banner": "Editing which entities are exposed via this UI is disabled because you have configured entity filters in configuration.yaml.",
|
"banner": "Editing which entities are exposed via this UI is disabled because you have configured entity filters in configuration.yaml.",
|
||||||
"exposed_entities": "Exposed entities",
|
"exposed_entities": "Exposed entities",
|
||||||
"not_exposed_entities": "Not exposed entities",
|
"not_exposed_entities": "Not exposed entities",
|
||||||
"manage_domains": "Manage domains",
|
"manage_defaults": "Manage defaults",
|
||||||
|
"manage_defaults_dialog_description": "Entities can be exposed by default based on their type.",
|
||||||
"expose_entity": "Expose entity",
|
"expose_entity": "Expose entity",
|
||||||
"dont_expose_entity": "Don't expose entity",
|
"dont_expose_entity": "Don't expose entity",
|
||||||
"follow_domain": "Follow domain",
|
"follow_domain": "Follow domain",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user