mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Remove aliases configuration from alexa cloud page (#15003)
This commit is contained in:
parent
f2a67a5fa9
commit
d1caeed05e
@ -40,17 +40,12 @@ import {
|
|||||||
updateCloudAlexaEntityConfig,
|
updateCloudAlexaEntityConfig,
|
||||||
updateCloudPref,
|
updateCloudPref,
|
||||||
} from "../../../../data/cloud";
|
} from "../../../../data/cloud";
|
||||||
import {
|
import { EntityRegistryEntry } from "../../../../data/entity_registry";
|
||||||
EntityRegistryEntry,
|
|
||||||
getExtendedEntityRegistryEntry,
|
|
||||||
updateEntityRegistryEntry,
|
|
||||||
} from "../../../../data/entity_registry";
|
|
||||||
import { showDomainTogglerDialog } from "../../../../dialogs/domain-toggler/show-dialog-domain-toggler";
|
import { showDomainTogglerDialog } from "../../../../dialogs/domain-toggler/show-dialog-domain-toggler";
|
||||||
import "../../../../layouts/hass-loading-screen";
|
import "../../../../layouts/hass-loading-screen";
|
||||||
import "../../../../layouts/hass-subpage";
|
import "../../../../layouts/hass-subpage";
|
||||||
import { haStyle } from "../../../../resources/styles";
|
import { haStyle } from "../../../../resources/styles";
|
||||||
import type { HomeAssistant } from "../../../../types";
|
import type { HomeAssistant } from "../../../../types";
|
||||||
import { showEntityAliasesDialog } from "../../entities/entity-aliases/show-dialog-entity-aliases";
|
|
||||||
|
|
||||||
const DEFAULT_CONFIG_EXPOSE = true;
|
const DEFAULT_CONFIG_EXPOSE = true;
|
||||||
|
|
||||||
@ -167,20 +162,8 @@ class CloudAlexa extends LitElement {
|
|||||||
<state-info
|
<state-info
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.stateObj=${stateObj}
|
.stateObj=${stateObj}
|
||||||
secondary-line
|
|
||||||
@click=${this._showMoreInfo}
|
@click=${this._showMoreInfo}
|
||||||
>
|
>
|
||||||
${entity.entity_id in this.hass.entities
|
|
||||||
? html`<button
|
|
||||||
class="link"
|
|
||||||
.entityId=${entity.entity_id}
|
|
||||||
@click=${this._openAliasesSettings}
|
|
||||||
>
|
|
||||||
${this.hass.localize(
|
|
||||||
"ui.panel.config.cloud.alexa.manage_aliases"
|
|
||||||
)}
|
|
||||||
</button>`
|
|
||||||
: ""}
|
|
||||||
</state-info>
|
</state-info>
|
||||||
${!emptyFilter
|
${!emptyFilter
|
||||||
? html`${iconButton}`
|
? html`${iconButton}`
|
||||||
@ -343,21 +326,6 @@ class CloudAlexa extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _openAliasesSettings(ev) {
|
|
||||||
ev.stopPropagation();
|
|
||||||
const entityId = ev.target.entityId;
|
|
||||||
const entry = await getExtendedEntityRegistryEntry(this.hass, entityId);
|
|
||||||
if (!entry) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
showEntityAliasesDialog(this, {
|
|
||||||
entity: entry,
|
|
||||||
updateEntry: async (updates) => {
|
|
||||||
await updateEntityRegistryEntry(this.hass, entry.entity_id, updates);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private async _fetchData() {
|
private async _fetchData() {
|
||||||
const entities = await fetchCloudAlexaEntities(this.hass);
|
const entities = await fetchCloudAlexaEntities(this.hass);
|
||||||
entities.sort((a, b) => {
|
entities.sort((a, b) => {
|
||||||
@ -558,6 +526,7 @@ class CloudAlexa extends LitElement {
|
|||||||
}
|
}
|
||||||
state-info {
|
state-info {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
height: 40px;
|
||||||
}
|
}
|
||||||
ha-switch {
|
ha-switch {
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user