mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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,
|
||||
updateCloudPref,
|
||||
} from "../../../../data/cloud";
|
||||
import {
|
||||
EntityRegistryEntry,
|
||||
getExtendedEntityRegistryEntry,
|
||||
updateEntityRegistryEntry,
|
||||
} from "../../../../data/entity_registry";
|
||||
import { EntityRegistryEntry } from "../../../../data/entity_registry";
|
||||
import { showDomainTogglerDialog } from "../../../../dialogs/domain-toggler/show-dialog-domain-toggler";
|
||||
import "../../../../layouts/hass-loading-screen";
|
||||
import "../../../../layouts/hass-subpage";
|
||||
import { haStyle } from "../../../../resources/styles";
|
||||
import type { HomeAssistant } from "../../../../types";
|
||||
import { showEntityAliasesDialog } from "../../entities/entity-aliases/show-dialog-entity-aliases";
|
||||
|
||||
const DEFAULT_CONFIG_EXPOSE = true;
|
||||
|
||||
@ -167,20 +162,8 @@ class CloudAlexa extends LitElement {
|
||||
<state-info
|
||||
.hass=${this.hass}
|
||||
.stateObj=${stateObj}
|
||||
secondary-line
|
||||
@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>
|
||||
${!emptyFilter
|
||||
? 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() {
|
||||
const entities = await fetchCloudAlexaEntities(this.hass);
|
||||
entities.sort((a, b) => {
|
||||
@ -558,6 +526,7 @@ class CloudAlexa extends LitElement {
|
||||
}
|
||||
state-info {
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
}
|
||||
ha-switch {
|
||||
padding: 8px 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user