mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Update expose for entities not in the entity registry (#16377)
This commit is contained in:
parent
6c0011fb45
commit
e766c277f5
@ -15,6 +15,8 @@ class AliasesEditor extends LitElement {
|
|||||||
|
|
||||||
@property() public aliases!: string[];
|
@property() public aliases!: string[];
|
||||||
|
|
||||||
|
@property({ type: Boolean }) public disabled = false;
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
if (!this.aliases) {
|
if (!this.aliases) {
|
||||||
return nothing;
|
return nothing;
|
||||||
@ -25,6 +27,7 @@ class AliasesEditor extends LitElement {
|
|||||||
(alias, index) => html`
|
(alias, index) => html`
|
||||||
<div class="layout horizontal center-center row">
|
<div class="layout horizontal center-center row">
|
||||||
<ha-textfield
|
<ha-textfield
|
||||||
|
.disabled=${this.disabled}
|
||||||
dialogInitialFocus=${index}
|
dialogInitialFocus=${index}
|
||||||
.index=${index}
|
.index=${index}
|
||||||
class="flex-auto"
|
class="flex-auto"
|
||||||
@ -37,6 +40,7 @@ class AliasesEditor extends LitElement {
|
|||||||
@keydown=${this._keyDownAlias}
|
@keydown=${this._keyDownAlias}
|
||||||
></ha-textfield>
|
></ha-textfield>
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
|
.disabled=${this.disabled}
|
||||||
.index=${index}
|
.index=${index}
|
||||||
slot="navigationIcon"
|
slot="navigationIcon"
|
||||||
label=${this.hass!.localize("ui.dialogs.aliases.remove_alias", {
|
label=${this.hass!.localize("ui.dialogs.aliases.remove_alias", {
|
||||||
@ -49,7 +53,7 @@ class AliasesEditor extends LitElement {
|
|||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
<div class="layout horizontal center-center">
|
<div class="layout horizontal center-center">
|
||||||
<mwc-button @click=${this._addAlias}>
|
<mwc-button @click=${this._addAlias} .disabled=${this.disabled}>
|
||||||
${this.hass!.localize("ui.dialogs.aliases.add_alias")}
|
${this.hass!.localize("ui.dialogs.aliases.add_alias")}
|
||||||
<ha-svg-icon slot="icon" .path=${mdiPlus}></ha-svg-icon>
|
<ha-svg-icon slot="icon" .path=${mdiPlus}></ha-svg-icon>
|
||||||
</mwc-button>
|
</mwc-button>
|
||||||
|
@ -12,6 +12,12 @@ export const voiceAssistants = {
|
|||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
export interface ExposeEntitySettings {
|
||||||
|
conversation?: boolean;
|
||||||
|
"cloud.alexa"?: boolean;
|
||||||
|
"cloud.google_assistant"?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export const setExposeNewEntities = (
|
export const setExposeNewEntities = (
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
assistant: string,
|
assistant: string,
|
||||||
@ -41,3 +47,8 @@ export const exposeEntities = (
|
|||||||
entity_ids,
|
entity_ids,
|
||||||
should_expose,
|
should_expose,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const listExposedEntities = (hass: HomeAssistant) =>
|
||||||
|
hass.callWS<{ exposed_entities: Record<string, ExposeEntitySettings> }>({
|
||||||
|
type: "homeassistant/expose_entity/list",
|
||||||
|
});
|
@ -1,6 +1,8 @@
|
|||||||
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
|
import memoizeOne from "memoize-one";
|
||||||
import { ExtEntityRegistryEntry } from "../../../../data/entity_registry";
|
import { ExtEntityRegistryEntry } from "../../../../data/entity_registry";
|
||||||
|
import { ExposeEntitySettings, voiceAssistants } from "../../../../data/expose";
|
||||||
import "../../../../panels/config/voice-assistants/entity-voice-settings";
|
import "../../../../panels/config/voice-assistants/entity-voice-settings";
|
||||||
import { HomeAssistant } from "../../../../types";
|
import { HomeAssistant } from "../../../../types";
|
||||||
|
|
||||||
@ -12,13 +14,23 @@ class MoreInfoViewVoiceAssistants extends LitElement {
|
|||||||
|
|
||||||
@property() public params?;
|
@property() public params?;
|
||||||
|
|
||||||
|
private _calculateExposed = memoizeOne((entry: ExtEntityRegistryEntry) => {
|
||||||
|
const exposed: ExposeEntitySettings = {};
|
||||||
|
Object.keys(voiceAssistants).forEach((key) => {
|
||||||
|
exposed[key] = entry.options?.[key]?.should_expose;
|
||||||
|
});
|
||||||
|
return exposed;
|
||||||
|
});
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
if (!this.params) {
|
if (!this.params) {
|
||||||
return nothing;
|
return nothing;
|
||||||
}
|
}
|
||||||
return html`<entity-voice-settings
|
return html`<entity-voice-settings
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
|
.entityId=${this.entry.entity_id}
|
||||||
.entry=${this.entry}
|
.entry=${this.entry}
|
||||||
|
.exposed=${this._calculateExposed(this.entry)}
|
||||||
></entity-voice-settings>`;
|
></entity-voice-settings>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,11 +5,12 @@ import {
|
|||||||
CSSResultGroup,
|
CSSResultGroup,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
PropertyValues,
|
|
||||||
nothing,
|
nothing,
|
||||||
|
PropertyValues,
|
||||||
} from "lit";
|
} from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { dynamicElement } from "../../common/dom/dynamic-element-directive";
|
import { dynamicElement } from "../../common/dom/dynamic-element-directive";
|
||||||
|
import "../../components/ha-alert";
|
||||||
import {
|
import {
|
||||||
EntityRegistryEntry,
|
EntityRegistryEntry,
|
||||||
ExtEntityRegistryEntry,
|
ExtEntityRegistryEntry,
|
||||||
@ -39,18 +40,17 @@ export class HaMoreInfoSettings extends LitElement {
|
|||||||
if (this.entry === null) {
|
if (this.entry === null) {
|
||||||
return html`
|
return html`
|
||||||
<div class="content">
|
<div class="content">
|
||||||
${this.hass.localize(
|
<ha-alert alert-type="warning">
|
||||||
"ui.dialogs.entity_registry.no_unique_id",
|
${this.hass.localize("ui.dialogs.entity_registry.no_unique_id", {
|
||||||
"entity_id",
|
entity_id: this.entityId,
|
||||||
this.entityId,
|
faq_link: html`<a
|
||||||
"faq_link",
|
href=${documentationUrl(this.hass, "/faq/unique_id")}
|
||||||
html`<a
|
target="_blank"
|
||||||
href=${documentationUrl(this.hass, "/faq/unique_id")}
|
rel="noreferrer"
|
||||||
target="_blank"
|
>${this.hass.localize("ui.dialogs.entity_registry.faq")}</a
|
||||||
rel="noreferrer"
|
>`,
|
||||||
>${this.hass.localize("ui.dialogs.entity_registry.faq")}</a
|
})}
|
||||||
>`
|
</ha-alert>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ import {
|
|||||||
updateAssistPipeline,
|
updateAssistPipeline,
|
||||||
} from "../../../data/assist_pipeline";
|
} from "../../../data/assist_pipeline";
|
||||||
import { CloudStatus } from "../../../data/cloud";
|
import { CloudStatus } from "../../../data/cloud";
|
||||||
import { ExtEntityRegistryEntry } from "../../../data/entity_registry";
|
import { ExposeEntitySettings } from "../../../data/expose";
|
||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
import { brandsUrl } from "../../../util/brands-url";
|
import { brandsUrl } from "../../../util/brands-url";
|
||||||
@ -29,7 +29,10 @@ import { showVoiceAssistantPipelineDetailDialog } from "./show-dialog-voice-assi
|
|||||||
export class AssistPref extends LitElement {
|
export class AssistPref extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() private extEntities?: Record<string, ExtEntityRegistryEntry>;
|
@property({ attribute: false }) public exposedEntities?: Record<
|
||||||
|
string,
|
||||||
|
ExposeEntitySettings
|
||||||
|
>;
|
||||||
|
|
||||||
@state() private _pipelines: AssistPipeline[] = [];
|
@state() private _pipelines: AssistPipeline[] = [];
|
||||||
|
|
||||||
@ -46,11 +49,10 @@ export class AssistPref extends LitElement {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private _exposedEntities = memoizeOne(
|
private _exposedEntitiesCount = memoizeOne(
|
||||||
(extEntities: Record<string, ExtEntityRegistryEntry>) =>
|
(exposedEntities: Record<string, ExposeEntitySettings>) =>
|
||||||
Object.values(extEntities).filter(
|
Object.values(exposedEntities).filter((expose) => expose.conversation)
|
||||||
(entity) => entity.options?.conversation?.should_expose
|
.length
|
||||||
).length
|
|
||||||
);
|
);
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
@ -119,8 +121,8 @@ export class AssistPref extends LitElement {
|
|||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.voice_assistants.assistants.pipeline.exposed_entities",
|
"ui.panel.config.voice_assistants.assistants.pipeline.exposed_entities",
|
||||||
{
|
{
|
||||||
number: this.extEntities
|
number: this.exposedEntities
|
||||||
? this._exposedEntities(this.extEntities)
|
? this._exposedEntitiesCount(this.exposedEntities)
|
||||||
: 0,
|
: 0,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
@ -11,28 +11,30 @@ import "../../../components/ha-settings-row";
|
|||||||
import "../../../components/ha-switch";
|
import "../../../components/ha-switch";
|
||||||
import type { HaSwitch } from "../../../components/ha-switch";
|
import type { HaSwitch } from "../../../components/ha-switch";
|
||||||
import { CloudStatusLoggedIn, updateCloudPref } from "../../../data/cloud";
|
import { CloudStatusLoggedIn, updateCloudPref } from "../../../data/cloud";
|
||||||
import { ExtEntityRegistryEntry } from "../../../data/entity_registry";
|
|
||||||
import {
|
import {
|
||||||
|
ExposeEntitySettings,
|
||||||
getExposeNewEntities,
|
getExposeNewEntities,
|
||||||
setExposeNewEntities,
|
setExposeNewEntities,
|
||||||
} from "../../../data/voice";
|
} from "../../../data/expose";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
import { brandsUrl } from "../../../util/brands-url";
|
import { brandsUrl } from "../../../util/brands-url";
|
||||||
|
|
||||||
export class CloudAlexaPref extends LitElement {
|
export class CloudAlexaPref extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() private extEntities?: Record<string, ExtEntityRegistryEntry>;
|
@property({ attribute: false }) public exposedEntities?: Record<
|
||||||
|
string,
|
||||||
|
ExposeEntitySettings
|
||||||
|
>;
|
||||||
|
|
||||||
@property() public cloudStatus?: CloudStatusLoggedIn;
|
@property() public cloudStatus?: CloudStatusLoggedIn;
|
||||||
|
|
||||||
@state() private _exposeNew?: boolean;
|
@state() private _exposeNew?: boolean;
|
||||||
|
|
||||||
private _exposedEntities = memoizeOne(
|
private _exposedEntitiesCount = memoizeOne(
|
||||||
(extEntities: Record<string, ExtEntityRegistryEntry>) =>
|
(exposedEntities: Record<string, ExposeEntitySettings>) =>
|
||||||
Object.values(extEntities).filter(
|
Object.values(exposedEntities).filter((expose) => expose["cloud.alexa"])
|
||||||
(entity) => entity.options?.["cloud.alexa"]?.should_expose
|
.length
|
||||||
).length
|
|
||||||
);
|
);
|
||||||
|
|
||||||
protected willUpdate() {
|
protected willUpdate() {
|
||||||
@ -183,8 +185,8 @@ export class CloudAlexaPref extends LitElement {
|
|||||||
: this.hass.localize(
|
: this.hass.localize(
|
||||||
"ui.panel.config.cloud.account.alexa.exposed_entities",
|
"ui.panel.config.cloud.account.alexa.exposed_entities",
|
||||||
{
|
{
|
||||||
number: this.extEntities
|
number: this.exposedEntities
|
||||||
? this._exposedEntities(this.extEntities)
|
? this._exposedEntitiesCount(this.exposedEntities)
|
||||||
: 0,
|
: 0,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
@ -4,6 +4,7 @@ import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
|||||||
import { property, state } from "lit/decorators";
|
import { property, state } from "lit/decorators";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
|
import { isEmptyFilter } from "../../../common/entity/entity_filter";
|
||||||
import "../../../components/ha-alert";
|
import "../../../components/ha-alert";
|
||||||
import "../../../components/ha-card";
|
import "../../../components/ha-card";
|
||||||
import "../../../components/ha-settings-row";
|
import "../../../components/ha-settings-row";
|
||||||
@ -11,20 +12,22 @@ import type { HaSwitch } from "../../../components/ha-switch";
|
|||||||
import "../../../components/ha-textfield";
|
import "../../../components/ha-textfield";
|
||||||
import type { HaTextField } from "../../../components/ha-textfield";
|
import type { HaTextField } from "../../../components/ha-textfield";
|
||||||
import { CloudStatusLoggedIn, updateCloudPref } from "../../../data/cloud";
|
import { CloudStatusLoggedIn, updateCloudPref } from "../../../data/cloud";
|
||||||
import { showSaveSuccessToast } from "../../../util/toast-saved-success";
|
|
||||||
import { HomeAssistant } from "../../../types";
|
|
||||||
import { brandsUrl } from "../../../util/brands-url";
|
|
||||||
import { isEmptyFilter } from "../../../common/entity/entity_filter";
|
|
||||||
import {
|
import {
|
||||||
|
ExposeEntitySettings,
|
||||||
getExposeNewEntities,
|
getExposeNewEntities,
|
||||||
setExposeNewEntities,
|
setExposeNewEntities,
|
||||||
} from "../../../data/voice";
|
} from "../../../data/expose";
|
||||||
import { ExtEntityRegistryEntry } from "../../../data/entity_registry";
|
import { HomeAssistant } from "../../../types";
|
||||||
|
import { brandsUrl } from "../../../util/brands-url";
|
||||||
|
import { showSaveSuccessToast } from "../../../util/toast-saved-success";
|
||||||
|
|
||||||
export class CloudGooglePref extends LitElement {
|
export class CloudGooglePref extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() private extEntities?: Record<string, ExtEntityRegistryEntry>;
|
@property({ attribute: false }) public exposedEntities?: Record<
|
||||||
|
string,
|
||||||
|
ExposeEntitySettings
|
||||||
|
>;
|
||||||
|
|
||||||
@property({ attribute: false }) public cloudStatus?: CloudStatusLoggedIn;
|
@property({ attribute: false }) public cloudStatus?: CloudStatusLoggedIn;
|
||||||
|
|
||||||
@ -40,10 +43,10 @@ export class CloudGooglePref extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _exposedEntities = memoizeOne(
|
private _exposedEntitiesCount = memoizeOne(
|
||||||
(extEntities: Record<string, ExtEntityRegistryEntry>) =>
|
(exposedEntities: Record<string, ExposeEntitySettings>) =>
|
||||||
Object.values(extEntities).filter(
|
Object.values(exposedEntities).filter(
|
||||||
(entity) => entity.options?.["cloud.google_assistant"]?.should_expose
|
(expose) => expose["cloud.google_assistant"]
|
||||||
).length
|
).length
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -239,8 +242,8 @@ export class CloudGooglePref extends LitElement {
|
|||||||
: this.hass.localize(
|
: this.hass.localize(
|
||||||
"ui.panel.config.cloud.account.google.exposed_entities",
|
"ui.panel.config.cloud.account.google.exposed_entities",
|
||||||
{
|
{
|
||||||
number: this.extEntities
|
number: this.exposedEntities
|
||||||
? this._exposedEntities(this.extEntities)
|
? this._exposedEntitiesCount(this.exposedEntities)
|
||||||
: 0,
|
: 0,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
import "@material/mwc-button";
|
import "@material/mwc-button";
|
||||||
import "@material/mwc-list";
|
import "@material/mwc-list";
|
||||||
import { mdiClose } from "@mdi/js";
|
import { mdiClose } from "@mdi/js";
|
||||||
|
import { HassEntity } from "home-assistant-js-websocket";
|
||||||
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { ifDefined } from "lit/directives/if-defined";
|
import { ifDefined } from "lit/directives/if-defined";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
|
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||||
import "../../../components/ha-check-list-item";
|
import "../../../components/ha-check-list-item";
|
||||||
import "../../../components/search-input";
|
import "../../../components/search-input";
|
||||||
import {
|
import { ExposeEntitySettings, voiceAssistants } from "../../../data/expose";
|
||||||
computeEntityRegistryName,
|
|
||||||
ExtEntityRegistryEntry,
|
|
||||||
} from "../../../data/entity_registry";
|
|
||||||
import { voiceAssistants } from "../../../data/voice";
|
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
import "./entity-voice-settings";
|
import "./entity-voice-settings";
|
||||||
@ -49,7 +47,7 @@ class DialogExposeEntity extends LitElement {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const entities = this._filterEntities(
|
const entities = this._filterEntities(
|
||||||
this._params.extendedEntities,
|
this._params.exposedEntities,
|
||||||
this._filter
|
this._filter
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -126,42 +124,40 @@ class DialogExposeEntity extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _filterEntities = memoizeOne(
|
private _filterEntities = memoizeOne(
|
||||||
(RegEntries: Record<string, ExtEntityRegistryEntry>, filter?: string) => {
|
(
|
||||||
|
exposedEntities: Record<string, ExposeEntitySettings>,
|
||||||
|
filter?: string
|
||||||
|
) => {
|
||||||
const lowerFilter = filter?.toLowerCase();
|
const lowerFilter = filter?.toLowerCase();
|
||||||
return Object.values(RegEntries).filter(
|
return Object.values(this.hass.states).filter(
|
||||||
(entity) =>
|
(entity) =>
|
||||||
this._params!.filterAssistants.some(
|
this._params!.filterAssistants.some(
|
||||||
(ass) => !entity.options?.[ass]?.should_expose
|
(ass) => !exposedEntities[entity.entity_id]?.[ass]
|
||||||
) &&
|
) &&
|
||||||
(!lowerFilter ||
|
(!lowerFilter ||
|
||||||
entity.entity_id.toLowerCase().includes(lowerFilter) ||
|
entity.entity_id.toLowerCase().includes(lowerFilter) ||
|
||||||
computeEntityRegistryName(this.hass!, entity)
|
computeStateName(entity)?.toLowerCase().includes(lowerFilter))
|
||||||
?.toLowerCase()
|
|
||||||
.includes(lowerFilter))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
private _renderItem = (entity: ExtEntityRegistryEntry) => {
|
private _renderItem = (entityState: HassEntity) => html`
|
||||||
const entityState = this.hass.states[entity.entity_id];
|
<ha-check-list-item
|
||||||
return html`
|
graphic="icon"
|
||||||
<ha-check-list-item
|
twoLine
|
||||||
graphic="icon"
|
.value=${entityState.entity_id}
|
||||||
twoLine
|
.selected=${this._selected.includes(entityState.entity_id)}
|
||||||
.value=${entity.entity_id}
|
@request-selected=${this._handleSelected}
|
||||||
.selected=${this._selected.includes(entity.entity_id)}
|
>
|
||||||
@request-selected=${this._handleSelected}
|
<ha-state-icon
|
||||||
>
|
title=${ifDefined(entityState?.state)}
|
||||||
<ha-state-icon
|
slot="graphic"
|
||||||
title=${ifDefined(entityState?.state)}
|
.state=${entityState}
|
||||||
slot="graphic"
|
></ha-state-icon>
|
||||||
.state=${entityState}
|
${computeStateName(entityState)}
|
||||||
></ha-state-icon>
|
<span slot="secondary">${entityState.entity_id}</span>
|
||||||
${computeEntityRegistryName(this.hass!, entity)}
|
</ha-check-list-item>
|
||||||
<span slot="secondary">${entity.entity_id}</span>
|
`;
|
||||||
</ha-check-list-item>
|
|
||||||
`;
|
|
||||||
};
|
|
||||||
|
|
||||||
private _expose() {
|
private _expose() {
|
||||||
this._params!.exposeEntities(this._selected);
|
this._params!.exposeEntities(this._selected);
|
||||||
|
@ -1,38 +1,31 @@
|
|||||||
import "@material/mwc-button/mwc-button";
|
import "@material/mwc-button/mwc-button";
|
||||||
import { CSSResultGroup, LitElement, css, html, nothing } from "lit";
|
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
import {
|
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||||
ExtEntityRegistryEntry,
|
import { createCloseHeading } from "../../../components/ha-dialog";
|
||||||
computeEntityRegistryName,
|
|
||||||
getExtendedEntityRegistryEntry,
|
|
||||||
} from "../../../data/entity_registry";
|
|
||||||
import { haStyle, haStyleDialog } from "../../../resources/styles";
|
import { haStyle, haStyleDialog } from "../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
import { VoiceSettingsDialogParams } from "./show-dialog-voice-settings";
|
|
||||||
import "./entity-voice-settings";
|
import "./entity-voice-settings";
|
||||||
import { createCloseHeading } from "../../../components/ha-dialog";
|
import { VoiceSettingsDialogParams } from "./show-dialog-voice-settings";
|
||||||
|
|
||||||
@customElement("dialog-voice-settings")
|
@customElement("dialog-voice-settings")
|
||||||
class DialogVoiceSettings extends LitElement {
|
class DialogVoiceSettings extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@state() private _extEntityReg?: ExtEntityRegistryEntry;
|
@state() private _params?: VoiceSettingsDialogParams;
|
||||||
|
|
||||||
public async showDialog(params: VoiceSettingsDialogParams): Promise<void> {
|
public showDialog(params: VoiceSettingsDialogParams): void {
|
||||||
this._extEntityReg = await getExtendedEntityRegistryEntry(
|
this._params = params;
|
||||||
this.hass,
|
|
||||||
params.entityId
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeDialog(): void {
|
public closeDialog(): void {
|
||||||
this._extEntityReg = undefined;
|
this._params = undefined;
|
||||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
if (!this._extEntityReg) {
|
if (!this._params) {
|
||||||
return nothing;
|
return nothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,15 +36,18 @@ class DialogVoiceSettings extends LitElement {
|
|||||||
hideActions
|
hideActions
|
||||||
.heading=${createCloseHeading(
|
.heading=${createCloseHeading(
|
||||||
this.hass,
|
this.hass,
|
||||||
computeEntityRegistryName(this.hass, this._extEntityReg) ||
|
computeStateName(this.hass.states[this._params.entityId]) ||
|
||||||
this.hass.localize("ui.panel.config.entities.picker.unnamed_entity")
|
this.hass.localize("ui.panel.config.entities.picker.unnamed_entity")
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<entity-voice-settings
|
<entity-voice-settings
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.entry=${this._extEntityReg}
|
.entityId=${this._params.entityId}
|
||||||
|
.entry=${this._params.extEntityReg}
|
||||||
|
.exposed=${this._params.exposed}
|
||||||
@entity-entry-updated=${this._entityEntryUpdated}
|
@entity-entry-updated=${this._entityEntryUpdated}
|
||||||
|
@exposed-entities-changed=${this._exposedEntitiesChanged}
|
||||||
></entity-voice-settings>
|
></entity-voice-settings>
|
||||||
</div>
|
</div>
|
||||||
</ha-dialog>
|
</ha-dialog>
|
||||||
@ -59,7 +55,11 @@ class DialogVoiceSettings extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _entityEntryUpdated(ev: CustomEvent) {
|
private _entityEntryUpdated(ev: CustomEvent) {
|
||||||
this._extEntityReg = ev.detail;
|
this._params!.extEntityReg = ev.detail;
|
||||||
|
}
|
||||||
|
|
||||||
|
private _exposedEntitiesChanged() {
|
||||||
|
this._params!.exposedEntitiesChanged?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
|
@ -36,18 +36,27 @@ import {
|
|||||||
fetchCloudGoogleEntity,
|
fetchCloudGoogleEntity,
|
||||||
GoogleEntity,
|
GoogleEntity,
|
||||||
} from "../../../data/google_assistant";
|
} from "../../../data/google_assistant";
|
||||||
import { exposeEntities, voiceAssistants } from "../../../data/voice";
|
import {
|
||||||
|
exposeEntities,
|
||||||
|
ExposeEntitySettings,
|
||||||
|
voiceAssistants,
|
||||||
|
} from "../../../data/expose";
|
||||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
import { brandsUrl } from "../../../util/brands-url";
|
import { brandsUrl } from "../../../util/brands-url";
|
||||||
import { EntityRegistrySettings } from "../entities/entity-registry-settings";
|
import { EntityRegistrySettings } from "../entities/entity-registry-settings";
|
||||||
|
import { documentationUrl } from "../../../util/documentation-url";
|
||||||
|
|
||||||
@customElement("entity-voice-settings")
|
@customElement("entity-voice-settings")
|
||||||
export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property({ type: Object }) public entry!: ExtEntityRegistryEntry;
|
@property() public entityId!: string;
|
||||||
|
|
||||||
|
@property({ attribute: false }) public exposed!: ExposeEntitySettings;
|
||||||
|
|
||||||
|
@property({ attribute: false }) public entry?: ExtEntityRegistryEntry;
|
||||||
|
|
||||||
@state() private _cloudStatus?: CloudStatus;
|
@state() private _cloudStatus?: CloudStatus;
|
||||||
|
|
||||||
@ -63,7 +72,7 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
if (!isComponentLoaded(this.hass, "cloud")) {
|
if (!isComponentLoaded(this.hass, "cloud")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (changedProps.has("entry") && this.entry) {
|
if (changedProps.has("entityId") && this.entityId) {
|
||||||
this._fetchEntities();
|
this._fetchEntities();
|
||||||
}
|
}
|
||||||
if (!this.hasUpdated) {
|
if (!this.hasUpdated) {
|
||||||
@ -77,7 +86,7 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
try {
|
try {
|
||||||
const googleEntity = await fetchCloudGoogleEntity(
|
const googleEntity = await fetchCloudGoogleEntity(
|
||||||
this.hass,
|
this.hass,
|
||||||
this.entry.entity_id
|
this.entityId
|
||||||
);
|
);
|
||||||
this._googleEntity = googleEntity;
|
this._googleEntity = googleEntity;
|
||||||
this.requestUpdate("_googleEntity");
|
this.requestUpdate("_googleEntity");
|
||||||
@ -89,7 +98,7 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await fetchCloudAlexaEntity(this.hass, this.entry.entity_id);
|
await fetchCloudAlexaEntity(this.hass, this.entityId);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err.code === "not_supported") {
|
if (err.code === "not_supported") {
|
||||||
this._unsupported["cloud.alexa"] = true;
|
this._unsupported["cloud.alexa"] = true;
|
||||||
@ -153,9 +162,7 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
uiAssistants.splice(uiAssistants.indexOf("cloud.alexa"), 1);
|
uiAssistants.splice(uiAssistants.indexOf("cloud.alexa"), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uiExposed = uiAssistants.some(
|
const uiExposed = uiAssistants.some((key) => this.exposed[key]);
|
||||||
(key) => this.entry.options?.[key]?.should_expose
|
|
||||||
);
|
|
||||||
|
|
||||||
let manFilterFuncs:
|
let manFilterFuncs:
|
||||||
| {
|
| {
|
||||||
@ -171,10 +178,9 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const manExposedAlexa =
|
const manExposedAlexa = alexaManual && manFilterFuncs!.alexa(this.entityId);
|
||||||
alexaManual && manFilterFuncs!.alexa(this.entry.entity_id);
|
|
||||||
const manExposedGoogle =
|
const manExposedGoogle =
|
||||||
googleManual && manFilterFuncs!.google(this.entry.entity_id);
|
googleManual && manFilterFuncs!.google(this.entityId);
|
||||||
|
|
||||||
const anyExposed = uiExposed || manExposedAlexa || manExposedGoogle;
|
const anyExposed = uiExposed || manExposedAlexa || manExposedGoogle;
|
||||||
|
|
||||||
@ -198,13 +204,14 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
? manExposedAlexa
|
? manExposedAlexa
|
||||||
: googleManual && key === "cloud.google_assistant"
|
: googleManual && key === "cloud.google_assistant"
|
||||||
? manExposedGoogle
|
? manExposedGoogle
|
||||||
: this.entry.options?.[key]?.should_expose;
|
: this.exposed[key];
|
||||||
|
|
||||||
const manualConfig =
|
const manualConfig =
|
||||||
(alexaManual && key === "cloud.alexa") ||
|
(alexaManual && key === "cloud.alexa") ||
|
||||||
(googleManual && key === "cloud.google_assistant");
|
(googleManual && key === "cloud.google_assistant");
|
||||||
|
|
||||||
const support2fa =
|
const support2fa =
|
||||||
|
this.entry &&
|
||||||
key === "cloud.google_assistant" &&
|
key === "cloud.google_assistant" &&
|
||||||
!googleManual &&
|
!googleManual &&
|
||||||
supported &&
|
supported &&
|
||||||
@ -249,7 +256,7 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ha-checkbox
|
<ha-checkbox
|
||||||
.checked=${!this.entry.options?.[key]?.disable_2fa}
|
.checked=${!this.entry!.options?.[key]?.disable_2fa}
|
||||||
@change=${this._2faChanged}
|
@change=${this._2faChanged}
|
||||||
></ha-checkbox>
|
></ha-checkbox>
|
||||||
</ha-formfield>
|
</ha-formfield>
|
||||||
@ -274,12 +281,26 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
${this.hass.localize("ui.dialogs.voice-settings.aliases_description")}
|
${this.hass.localize("ui.dialogs.voice-settings.aliases_description")}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ha-aliases-editor
|
${!this.entry
|
||||||
.hass=${this.hass}
|
? html`<ha-alert alert-type="warning">
|
||||||
.aliases=${this._aliases ?? this.entry.aliases}
|
${this.hass.localize(
|
||||||
@value-changed=${this._aliasesChanged}
|
"ui.dialogs.voice-settings.aliases_no_unique_id",
|
||||||
@blur=${this._saveAliases}
|
{
|
||||||
></ha-aliases-editor>
|
faq_link: html`<a
|
||||||
|
href=${documentationUrl(this.hass, "/faq/unique_id")}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>${this.hass.localize("ui.dialogs.entity_registry.faq")}</a
|
||||||
|
>`,
|
||||||
|
}
|
||||||
|
)}
|
||||||
|
</ha-alert>`
|
||||||
|
: html`<ha-aliases-editor
|
||||||
|
.hass=${this.hass}
|
||||||
|
.aliases=${this._aliases ?? this.entry.aliases}
|
||||||
|
@value-changed=${this._aliasesChanged}
|
||||||
|
@blur=${this._saveAliases}
|
||||||
|
></ha-aliases-editor>`}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +312,7 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
try {
|
try {
|
||||||
await updateCloudGoogleEntityConfig(
|
await updateCloudGoogleEntityConfig(
|
||||||
this.hass,
|
this.hass,
|
||||||
this.entry.entity_id,
|
this.entityId,
|
||||||
!ev.target.checked
|
!ev.target.checked
|
||||||
);
|
);
|
||||||
} catch (_err) {
|
} catch (_err) {
|
||||||
@ -303,15 +324,11 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
if (!this._aliases) {
|
if (!this._aliases) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const result = await updateEntityRegistryEntry(
|
const result = await updateEntityRegistryEntry(this.hass, this.entityId, {
|
||||||
this.hass,
|
aliases: this._aliases
|
||||||
this.entry.entity_id,
|
.map((alias) => alias.trim())
|
||||||
{
|
.filter((alias) => alias),
|
||||||
aliases: this._aliases
|
});
|
||||||
.map((alias) => alias.trim())
|
|
||||||
.filter((alias) => alias),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
fireEvent(this, "entity-entry-updated", result.entity_entry);
|
fireEvent(this, "entity-entry-updated", result.entity_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,14 +336,17 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
exposeEntities(
|
exposeEntities(
|
||||||
this.hass,
|
this.hass,
|
||||||
[ev.target.assistant],
|
[ev.target.assistant],
|
||||||
[this.entry.entity_id],
|
[this.entityId],
|
||||||
ev.target.checked
|
ev.target.checked
|
||||||
);
|
);
|
||||||
const entry = await getExtendedEntityRegistryEntry(
|
if (this.entry) {
|
||||||
this.hass,
|
const entry = await getExtendedEntityRegistryEntry(
|
||||||
this.entry.entity_id
|
this.hass,
|
||||||
);
|
this.entityId
|
||||||
fireEvent(this, "entity-entry-updated", entry);
|
);
|
||||||
|
fireEvent(this, "entity-entry-updated", entry);
|
||||||
|
}
|
||||||
|
fireEvent(this, "exposed-entities-changed");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _toggleAll(ev) {
|
private async _toggleAll(ev) {
|
||||||
@ -336,17 +356,15 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
? ev.target.assistants.filter((key) => !this._unsupported[key])
|
? ev.target.assistants.filter((key) => !this._unsupported[key])
|
||||||
: ev.target.assistants;
|
: ev.target.assistants;
|
||||||
|
|
||||||
exposeEntities(
|
exposeEntities(this.hass, assistants, [this.entityId], ev.target.checked);
|
||||||
this.hass,
|
if (this.entry) {
|
||||||
assistants,
|
const entry = await getExtendedEntityRegistryEntry(
|
||||||
[this.entry.entity_id],
|
this.hass,
|
||||||
ev.target.checked
|
this.entityId
|
||||||
);
|
);
|
||||||
const entry = await getExtendedEntityRegistryEntry(
|
fireEvent(this, "entity-entry-updated", entry);
|
||||||
this.hass,
|
}
|
||||||
this.entry.entity_id
|
fireEvent(this, "exposed-entities-changed");
|
||||||
);
|
|
||||||
fireEvent(this, "entity-entry-updated", entry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
|
@ -3,7 +3,7 @@ import { mdiAlertCircle } from "@mdi/js";
|
|||||||
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import { styleMap } from "lit/directives/style-map";
|
import { styleMap } from "lit/directives/style-map";
|
||||||
import { voiceAssistants } from "../../../../data/voice";
|
import { voiceAssistants } from "../../../../data/expose";
|
||||||
import { HomeAssistant } from "../../../../types";
|
import { HomeAssistant } from "../../../../types";
|
||||||
import { brandsUrl } from "../../../../util/brands-url";
|
import { brandsUrl } from "../../../../util/brands-url";
|
||||||
import "../../../../components/ha-svg-icon";
|
import "../../../../components/ha-svg-icon";
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
import { consume } from "@lit-labs/context";
|
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-item";
|
||||||
import "@polymer/paper-item/paper-item-body";
|
import "@polymer/paper-item/paper-item-body";
|
||||||
import { css, html, LitElement, nothing, PropertyValues } from "lit";
|
import { css, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
||||||
import { computeRTLDirection } from "../../../common/util/compute_rtl";
|
import { computeRTLDirection } from "../../../common/util/compute_rtl";
|
||||||
import { CloudStatus } from "../../../data/cloud";
|
import { CloudStatus } from "../../../data/cloud";
|
||||||
import { entitiesContext } from "../../../data/context";
|
import { ExposeEntitySettings } from "../../../data/expose";
|
||||||
import {
|
|
||||||
ExtEntityRegistryEntry,
|
|
||||||
getExtendedEntityRegistryEntries,
|
|
||||||
} from "../../../data/entity_registry";
|
|
||||||
import "../../../layouts/hass-loading-screen";
|
import "../../../layouts/hass-loading-screen";
|
||||||
import "../../../layouts/hass-tabs-subpage";
|
import "../../../layouts/hass-tabs-subpage";
|
||||||
import { HomeAssistant, Route } from "../../../types";
|
import { HomeAssistant, Route } from "../../../types";
|
||||||
@ -26,18 +22,17 @@ export class HaConfigVoiceAssistantsAssistants extends LitElement {
|
|||||||
|
|
||||||
@property({ attribute: false }) public cloudStatus?: CloudStatus;
|
@property({ attribute: false }) public cloudStatus?: CloudStatus;
|
||||||
|
|
||||||
|
@property({ attribute: false }) public exposedEntities?: Record<
|
||||||
|
string,
|
||||||
|
ExposeEntitySettings
|
||||||
|
>;
|
||||||
|
|
||||||
@property() public isWide!: boolean;
|
@property() public isWide!: boolean;
|
||||||
|
|
||||||
@property() public narrow!: boolean;
|
@property() public narrow!: boolean;
|
||||||
|
|
||||||
@property() public route!: Route;
|
@property() public route!: Route;
|
||||||
|
|
||||||
@state()
|
|
||||||
@consume({ context: entitiesContext, subscribe: true })
|
|
||||||
_entities!: HomeAssistant["entities"];
|
|
||||||
|
|
||||||
@state() private _extEntities?: Record<string, ExtEntityRegistryEntry>;
|
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
if (!this.hass) {
|
if (!this.hass) {
|
||||||
return html`<hass-loading-screen></hass-loading-screen>`;
|
return html`<hass-loading-screen></hass-loading-screen>`;
|
||||||
@ -57,7 +52,7 @@ export class HaConfigVoiceAssistantsAssistants extends LitElement {
|
|||||||
<assist-pref
|
<assist-pref
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.cloudStatus=${this.cloudStatus}
|
.cloudStatus=${this.cloudStatus}
|
||||||
.extEntities=${this._extEntities}
|
.exposedEntities=${this.exposedEntities}
|
||||||
></assist-pref>
|
></assist-pref>
|
||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
@ -65,13 +60,13 @@ export class HaConfigVoiceAssistantsAssistants extends LitElement {
|
|||||||
? html`
|
? html`
|
||||||
<cloud-alexa-pref
|
<cloud-alexa-pref
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.extEntities=${this._extEntities}
|
.exposedEntities=${this.exposedEntities}
|
||||||
.cloudStatus=${this.cloudStatus}
|
.cloudStatus=${this.cloudStatus}
|
||||||
dir=${computeRTLDirection(this.hass)}
|
dir=${computeRTLDirection(this.hass)}
|
||||||
></cloud-alexa-pref>
|
></cloud-alexa-pref>
|
||||||
<cloud-google-pref
|
<cloud-google-pref
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.extEntities=${this._extEntities}
|
.exposedEntities=${this.exposedEntities}
|
||||||
.cloudStatus=${this.cloudStatus}
|
.cloudStatus=${this.cloudStatus}
|
||||||
dir=${computeRTLDirection(this.hass)}
|
dir=${computeRTLDirection(this.hass)}
|
||||||
></cloud-google-pref>
|
></cloud-google-pref>
|
||||||
@ -82,19 +77,6 @@ export class HaConfigVoiceAssistantsAssistants extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public willUpdate(changedProperties: PropertyValues): void {
|
|
||||||
if (changedProperties.has("_entities")) {
|
|
||||||
this._fetchExtendedEntities();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async _fetchExtendedEntities() {
|
|
||||||
this._extEntities = await getExtendedEntityRegistryEntries(
|
|
||||||
this.hass,
|
|
||||||
Object.keys(this._entities)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
.content {
|
.content {
|
||||||
padding: 28px 20px 0;
|
padding: 28px 20px 0;
|
||||||
|
@ -19,7 +19,8 @@ import { customElement, property, query, state } from "lit/decorators";
|
|||||||
import { classMap } from "lit/directives/class-map";
|
import { classMap } from "lit/directives/class-map";
|
||||||
import { ifDefined } from "lit/directives/if-defined";
|
import { ifDefined } from "lit/directives/if-defined";
|
||||||
import memoize from "memoize-one";
|
import memoize from "memoize-one";
|
||||||
import { HASSDomEvent } from "../../../common/dom/fire_event";
|
import { fireEvent, HASSDomEvent } from "../../../common/dom/fire_event";
|
||||||
|
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||||
import {
|
import {
|
||||||
EntityFilter,
|
EntityFilter,
|
||||||
generateFilter,
|
generateFilter,
|
||||||
@ -38,26 +39,28 @@ import { AlexaEntity, fetchCloudAlexaEntities } from "../../../data/alexa";
|
|||||||
import { CloudStatus, CloudStatusLoggedIn } from "../../../data/cloud";
|
import { CloudStatus, CloudStatusLoggedIn } from "../../../data/cloud";
|
||||||
import { entitiesContext } from "../../../data/context";
|
import { entitiesContext } from "../../../data/context";
|
||||||
import {
|
import {
|
||||||
computeEntityRegistryName,
|
|
||||||
EntityRegistryEntry,
|
|
||||||
ExtEntityRegistryEntry,
|
ExtEntityRegistryEntry,
|
||||||
getExtendedEntityRegistryEntries,
|
getExtendedEntityRegistryEntries,
|
||||||
} from "../../../data/entity_registry";
|
} from "../../../data/entity_registry";
|
||||||
|
import {
|
||||||
|
exposeEntities,
|
||||||
|
ExposeEntitySettings,
|
||||||
|
voiceAssistants,
|
||||||
|
} from "../../../data/expose";
|
||||||
import {
|
import {
|
||||||
fetchCloudGoogleEntities,
|
fetchCloudGoogleEntities,
|
||||||
GoogleEntity,
|
GoogleEntity,
|
||||||
} from "../../../data/google_assistant";
|
} from "../../../data/google_assistant";
|
||||||
import { exposeEntities, voiceAssistants } from "../../../data/voice";
|
|
||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import "../../../layouts/hass-loading-screen";
|
import "../../../layouts/hass-loading-screen";
|
||||||
import "../../../layouts/hass-tabs-subpage-data-table";
|
import "../../../layouts/hass-tabs-subpage-data-table";
|
||||||
import type { HaTabsSubpageDataTable } from "../../../layouts/hass-tabs-subpage-data-table";
|
import type { HaTabsSubpageDataTable } from "../../../layouts/hass-tabs-subpage-data-table";
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import { HomeAssistant, Route } from "../../../types";
|
import { HomeAssistant, Route } from "../../../types";
|
||||||
|
import "./expose/expose-assistant-icon";
|
||||||
import { voiceAssistantTabs } from "./ha-config-voice-assistants";
|
import { voiceAssistantTabs } from "./ha-config-voice-assistants";
|
||||||
import { showExposeEntityDialog } from "./show-dialog-expose-entity";
|
import { showExposeEntityDialog } from "./show-dialog-expose-entity";
|
||||||
import { showVoiceSettingsDialog } from "./show-dialog-voice-settings";
|
import { showVoiceSettingsDialog } from "./show-dialog-voice-settings";
|
||||||
import "./expose/expose-assistant-icon";
|
|
||||||
|
|
||||||
@customElement("ha-config-voice-assistants-expose")
|
@customElement("ha-config-voice-assistants-expose")
|
||||||
export class VoiceAssistantsExpose extends LitElement {
|
export class VoiceAssistantsExpose extends LitElement {
|
||||||
@ -71,6 +74,11 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
|
|
||||||
@property({ attribute: false }) public route!: Route;
|
@property({ attribute: false }) public route!: Route;
|
||||||
|
|
||||||
|
@property({ attribute: false }) public exposedEntities?: Record<
|
||||||
|
string,
|
||||||
|
ExposeEntitySettings
|
||||||
|
>;
|
||||||
|
|
||||||
@state()
|
@state()
|
||||||
@consume({ context: entitiesContext, subscribe: true })
|
@consume({ context: entitiesContext, subscribe: true })
|
||||||
_entities!: HomeAssistant["entities"];
|
_entities!: HomeAssistant["entities"];
|
||||||
@ -256,8 +264,8 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
|
|
||||||
private _filteredEntities = memoize(
|
private _filteredEntities = memoize(
|
||||||
(
|
(
|
||||||
entities: HomeAssistant["entities"],
|
entities: Record<string, ExtEntityRegistryEntry>,
|
||||||
extEntities: Record<string, ExtEntityRegistryEntry> | undefined,
|
exposedEntities: Record<string, ExposeEntitySettings>,
|
||||||
devices: HomeAssistant["devices"],
|
devices: HomeAssistant["devices"],
|
||||||
areas: HomeAssistant["areas"],
|
areas: HomeAssistant["areas"],
|
||||||
cloudStatus: CloudStatus | undefined,
|
cloudStatus: CloudStatus | undefined,
|
||||||
@ -296,12 +304,11 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
|
|
||||||
const result: Record<string, DataTableRowData> = {};
|
const result: Record<string, DataTableRowData> = {};
|
||||||
|
|
||||||
let filteredEntities = Object.values(entities);
|
let filteredEntities = Object.values(this.hass.states);
|
||||||
|
|
||||||
filteredEntities = filteredEntities.filter((entity) =>
|
filteredEntities = filteredEntities.filter((entity) =>
|
||||||
showAssistants.some(
|
showAssistants.some(
|
||||||
(assis) =>
|
(assis) => exposedEntities?.[entity.entity_id]?.[assis]
|
||||||
extEntities?.[entity.entity_id].options?.[assis]?.should_expose
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -317,37 +324,38 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
filteredAssistants.some(
|
filteredAssistants.some(
|
||||||
(assis) =>
|
(assis) =>
|
||||||
!(assis === "cloud.alexa" && alexaManual) &&
|
!(assis === "cloud.alexa" && alexaManual) &&
|
||||||
extEntities?.[entity.entity_id].options?.[assis]?.should_expose
|
exposedEntities?.[entity.entity_id]?.[assis]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const entry of filteredEntities) {
|
for (const entityState of filteredEntities) {
|
||||||
const entity = this.hass.states[entry.entity_id];
|
const entry: ExtEntityRegistryEntry | undefined =
|
||||||
const areaId = entry.area_id ?? devices[entry.device_id!]?.area_id;
|
entities[entityState.entity_id];
|
||||||
|
const areaId =
|
||||||
|
entry?.area_id ?? entry?.device_id
|
||||||
|
? devices[entry.device_id!]?.area_id
|
||||||
|
: undefined;
|
||||||
const area = areaId ? areas[areaId] : undefined;
|
const area = areaId ? areas[areaId] : undefined;
|
||||||
|
|
||||||
result[entry.entity_id] = {
|
result[entityState.entity_id] = {
|
||||||
entity_id: entry.entity_id,
|
entity_id: entityState.entity_id,
|
||||||
entity,
|
entity: entityState,
|
||||||
name:
|
name:
|
||||||
computeEntityRegistryName(
|
computeStateName(entityState) ||
|
||||||
this.hass!,
|
|
||||||
entry as EntityRegistryEntry
|
|
||||||
) ||
|
|
||||||
this.hass.localize(
|
this.hass.localize(
|
||||||
"ui.panel.config.entities.picker.unnamed_entity"
|
"ui.panel.config.entities.picker.unnamed_entity"
|
||||||
),
|
),
|
||||||
area: area ? area.name : "—",
|
area: area ? area.name : "—",
|
||||||
assistants: Object.keys(
|
assistants: Object.keys(
|
||||||
extEntities![entry.entity_id].options!
|
exposedEntities?.[entityState.entity_id]
|
||||||
).filter(
|
).filter(
|
||||||
(key) =>
|
(key) =>
|
||||||
showAssistants.includes(key) &&
|
showAssistants.includes(key) &&
|
||||||
extEntities![entry.entity_id].options![key]?.should_expose
|
exposedEntities?.[entityState.entity_id]?.[key]
|
||||||
),
|
),
|
||||||
aliases: extEntities?.[entry.entity_id].aliases,
|
aliases: entry?.aliases || [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +366,7 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
(this.cloudStatus as CloudStatusLoggedIn).google_entities,
|
(this.cloudStatus as CloudStatusLoggedIn).google_entities,
|
||||||
(this.cloudStatus as CloudStatusLoggedIn).alexa_entities
|
(this.cloudStatus as CloudStatusLoggedIn).alexa_entities
|
||||||
);
|
);
|
||||||
Object.keys(entities).forEach((entityId) => {
|
Object.keys(this.hass.states).forEach((entityId) => {
|
||||||
const assistants: string[] = [];
|
const assistants: string[] = [];
|
||||||
if (
|
if (
|
||||||
alexaManual &&
|
alexaManual &&
|
||||||
@ -383,30 +391,33 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
result[entityId].assistants.push(...assistants);
|
result[entityId].assistants.push(...assistants);
|
||||||
result[entityId].manAssistants = assistants;
|
result[entityId].manAssistants = assistants;
|
||||||
} else {
|
} else {
|
||||||
const entry = entities[entityId];
|
const entityState = this.hass.states[entityId];
|
||||||
const areaId = entry.area_id ?? devices[entry.device_id!]?.area_id;
|
const entry: ExtEntityRegistryEntry | undefined =
|
||||||
|
entities[entityId];
|
||||||
|
const areaId =
|
||||||
|
entry?.area_id ?? entry?.device_id
|
||||||
|
? devices[entry.device_id!]?.area_id
|
||||||
|
: undefined;
|
||||||
const area = areaId ? areas[areaId] : undefined;
|
const area = areaId ? areas[areaId] : undefined;
|
||||||
result[entityId] = {
|
result[entityId] = {
|
||||||
entity_id: entry.entity_id,
|
entity_id: entityState.entity_id,
|
||||||
entity: this.hass.states[entityId],
|
entity: entityState,
|
||||||
name: computeEntityRegistryName(
|
name: computeStateName(entityState),
|
||||||
this.hass!,
|
|
||||||
entry as EntityRegistryEntry
|
|
||||||
),
|
|
||||||
area: area ? area.name : "—",
|
area: area ? area.name : "—",
|
||||||
assistants: [
|
assistants: [
|
||||||
...(extEntities
|
...(exposedEntities
|
||||||
? Object.keys(extEntities[entry.entity_id].options!).filter(
|
? Object.keys(
|
||||||
|
exposedEntities?.[entityState.entity_id]
|
||||||
|
).filter(
|
||||||
(key) =>
|
(key) =>
|
||||||
showAssistants.includes(key) &&
|
showAssistants.includes(key) &&
|
||||||
extEntities[entry.entity_id].options![key]
|
exposedEntities?.[entityState.entity_id]?.[key]
|
||||||
?.should_expose
|
|
||||||
)
|
)
|
||||||
: []),
|
: []),
|
||||||
...assistants,
|
...assistants,
|
||||||
],
|
],
|
||||||
manAssistants: assistants,
|
manAssistants: assistants,
|
||||||
aliases: extEntities?.[entityId].aliases,
|
aliases: entry?.aliases || [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -468,14 +479,14 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
if (!this.hass || this.hass.entities === undefined) {
|
if (!this.hass || !this.exposedEntities || !this._extEntities) {
|
||||||
return html`<hass-loading-screen></hass-loading-screen>`;
|
return html`<hass-loading-screen></hass-loading-screen>`;
|
||||||
}
|
}
|
||||||
const activeFilters = this._activeFilters(this._searchParms);
|
const activeFilters = this._activeFilters(this._searchParms);
|
||||||
|
|
||||||
const filteredEntities = this._filteredEntities(
|
const filteredEntities = this._filteredEntities(
|
||||||
this._entities,
|
|
||||||
this._extEntities,
|
this._extEntities,
|
||||||
|
this.exposedEntities,
|
||||||
this.hass.devices,
|
this.hass.devices,
|
||||||
this.hass.areas,
|
this.hass.areas,
|
||||||
this.cloudStatus,
|
this.cloudStatus,
|
||||||
@ -621,9 +632,11 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
: this._availableAssistants(this.cloudStatus);
|
: this._availableAssistants(this.cloudStatus);
|
||||||
showExposeEntityDialog(this, {
|
showExposeEntityDialog(this, {
|
||||||
filterAssistants: assistants,
|
filterAssistants: assistants,
|
||||||
extendedEntities: this._extEntities!,
|
exposedEntities: this.exposedEntities!,
|
||||||
exposeEntities: (entities) => {
|
exposeEntities: (entities) => {
|
||||||
exposeEntities(this.hass, assistants, entities, true);
|
exposeEntities(this.hass, assistants, entities, true).then(() =>
|
||||||
|
fireEvent(this, "exposed-entities-changed")
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -645,7 +658,9 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
const assistants = this._searchParms.has("assistants")
|
const assistants = this._searchParms.has("assistants")
|
||||||
? this._searchParms.get("assistants")!.split(",")
|
? this._searchParms.get("assistants")!.split(",")
|
||||||
: this._availableAssistants(this.cloudStatus);
|
: this._availableAssistants(this.cloudStatus);
|
||||||
exposeEntities(this.hass, assistants, [entityId], false);
|
exposeEntities(this.hass, assistants, [entityId], false).then(() =>
|
||||||
|
fireEvent(this, "exposed-entities-changed")
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
private _unexposeSelected() {
|
private _unexposeSelected() {
|
||||||
@ -670,7 +685,12 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
),
|
),
|
||||||
dismissText: this.hass.localize("ui.common.cancel"),
|
dismissText: this.hass.localize("ui.common.cancel"),
|
||||||
confirm: () => {
|
confirm: () => {
|
||||||
exposeEntities(this.hass, assistants, this._selectedEntities, false);
|
exposeEntities(
|
||||||
|
this.hass,
|
||||||
|
assistants,
|
||||||
|
this._selectedEntities,
|
||||||
|
false
|
||||||
|
).then(() => fireEvent(this, "exposed-entities-changed"));
|
||||||
this._clearSelection();
|
this._clearSelection();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -698,7 +718,12 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
),
|
),
|
||||||
dismissText: this.hass.localize("ui.common.cancel"),
|
dismissText: this.hass.localize("ui.common.cancel"),
|
||||||
confirm: () => {
|
confirm: () => {
|
||||||
exposeEntities(this.hass, assistants, this._selectedEntities, true);
|
exposeEntities(
|
||||||
|
this.hass,
|
||||||
|
assistants,
|
||||||
|
this._selectedEntities,
|
||||||
|
true
|
||||||
|
).then(() => fireEvent(this, "exposed-entities-changed"));
|
||||||
this._clearSelection();
|
this._clearSelection();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -710,7 +735,14 @@ export class VoiceAssistantsExpose extends LitElement {
|
|||||||
|
|
||||||
private _openEditEntry(ev: CustomEvent): void {
|
private _openEditEntry(ev: CustomEvent): void {
|
||||||
const entityId = (ev.detail as RowClickedEvent).id;
|
const entityId = (ev.detail as RowClickedEvent).id;
|
||||||
showVoiceSettingsDialog(this, { entityId });
|
showVoiceSettingsDialog(this, {
|
||||||
|
entityId,
|
||||||
|
exposed: this.exposedEntities![entityId],
|
||||||
|
extEntityReg: this._extEntities?.[entityId],
|
||||||
|
exposedEntitiesChanged: () => {
|
||||||
|
fireEvent(this, "exposed-entities-changed");
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private _clearFilter() {
|
private _clearFilter() {
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
|
import { consume } from "@lit-labs/context";
|
||||||
import { mdiDevices, mdiMicrophone } from "@mdi/js";
|
import { mdiDevices, mdiMicrophone } from "@mdi/js";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { PropertyValues } from "lit";
|
||||||
|
import { customElement, property, state } from "lit/decorators";
|
||||||
|
import { CloudStatus } from "../../../data/cloud";
|
||||||
|
import { entitiesContext } from "../../../data/context";
|
||||||
|
import {
|
||||||
|
ExposeEntitySettings,
|
||||||
|
listExposedEntities,
|
||||||
|
} from "../../../data/expose";
|
||||||
import {
|
import {
|
||||||
HassRouterPage,
|
HassRouterPage,
|
||||||
RouterOptions,
|
RouterOptions,
|
||||||
} from "../../../layouts/hass-router-page";
|
} from "../../../layouts/hass-router-page";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
import { CloudStatus } from "../../../data/cloud";
|
|
||||||
|
|
||||||
export const voiceAssistantTabs = [
|
export const voiceAssistantTabs = [
|
||||||
{
|
{
|
||||||
@ -30,6 +37,28 @@ class HaConfigVoiceAssistants extends HassRouterPage {
|
|||||||
|
|
||||||
@property() public isWide!: boolean;
|
@property() public isWide!: boolean;
|
||||||
|
|
||||||
|
@state()
|
||||||
|
@consume({ context: entitiesContext, subscribe: true })
|
||||||
|
_entities!: HomeAssistant["entities"];
|
||||||
|
|
||||||
|
@state() private _exposedEntities?: Record<string, ExposeEntitySettings>;
|
||||||
|
|
||||||
|
public connectedCallback(): void {
|
||||||
|
super.connectedCallback();
|
||||||
|
this.addEventListener(
|
||||||
|
"exposed-entities-changed",
|
||||||
|
this._fetchExposedEntities
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public disconnectedCallback(): void {
|
||||||
|
super.connectedCallback();
|
||||||
|
this.removeEventListener(
|
||||||
|
"exposed-entities-changed",
|
||||||
|
this._fetchExposedEntities
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
protected routerOptions: RouterOptions = {
|
protected routerOptions: RouterOptions = {
|
||||||
defaultPage: "assistants",
|
defaultPage: "assistants",
|
||||||
routes: {
|
routes: {
|
||||||
@ -55,11 +84,30 @@ class HaConfigVoiceAssistants extends HassRouterPage {
|
|||||||
pageEl.narrow = this.narrow;
|
pageEl.narrow = this.narrow;
|
||||||
pageEl.isWide = this.isWide;
|
pageEl.isWide = this.isWide;
|
||||||
pageEl.route = this.routeTail;
|
pageEl.route = this.routeTail;
|
||||||
|
pageEl.exposedEntities = this._exposedEntities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public willUpdate(changedProperties: PropertyValues): void {
|
||||||
|
if (changedProperties.has("_entities")) {
|
||||||
|
this._fetchExposedEntities();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private _fetchExposedEntities = async () => {
|
||||||
|
this._exposedEntities = (
|
||||||
|
await listExposedEntities(this.hass)
|
||||||
|
).exposed_entities;
|
||||||
|
if (this.lastChild) {
|
||||||
|
(this.lastChild as any).exposedEntities = this._exposedEntities;
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
"ha-config-voice-assistants": HaConfigVoiceAssistants;
|
"ha-config-voice-assistants": HaConfigVoiceAssistants;
|
||||||
}
|
}
|
||||||
|
interface HASSDomEvents {
|
||||||
|
"exposed-entities-changed": undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
import { ExtEntityRegistryEntry } from "../../../data/entity_registry";
|
import { ExposeEntitySettings } from "../../../data/expose";
|
||||||
|
|
||||||
export interface ExposeEntityDialogParams {
|
export interface ExposeEntityDialogParams {
|
||||||
filterAssistants: string[];
|
filterAssistants: string[];
|
||||||
extendedEntities: Record<string, ExtEntityRegistryEntry>;
|
exposedEntities: Record<string, ExposeEntitySettings>;
|
||||||
exposeEntities: (entities: string[]) => void;
|
exposeEntities: (entities: string[]) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
|
import { ExtEntityRegistryEntry } from "../../../data/entity_registry";
|
||||||
|
import { ExposeEntitySettings } from "../../../data/expose";
|
||||||
|
|
||||||
export interface VoiceSettingsDialogParams {
|
export interface VoiceSettingsDialogParams {
|
||||||
entityId: string;
|
entityId: string;
|
||||||
|
exposed: ExposeEntitySettings;
|
||||||
|
extEntityReg?: ExtEntityRegistryEntry;
|
||||||
|
exposedEntitiesChanged?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadVoiceSettingsDialog = () => import("./dialog-voice-settings");
|
export const loadVoiceSettingsDialog = () => import("./dialog-voice-settings");
|
||||||
|
@ -1085,6 +1085,7 @@
|
|||||||
"expose_header": "Expose",
|
"expose_header": "Expose",
|
||||||
"aliases_header": "Aliases",
|
"aliases_header": "Aliases",
|
||||||
"aliases_description": "Aliases are supported by Assist and Google Assistant.",
|
"aliases_description": "Aliases are supported by Assist and Google Assistant.",
|
||||||
|
"aliases_no_unique_id": "Aliases are not supported for entities without an unique id. See the {faq_link} for more detail.",
|
||||||
"ask_pin": "Ask for PIN",
|
"ask_pin": "Ask for PIN",
|
||||||
"manual_config": "Managed in configuration.yaml",
|
"manual_config": "Managed in configuration.yaml",
|
||||||
"unsupported": "Unsupported"
|
"unsupported": "Unsupported"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user