diff --git a/src/components/ha-filter-labels.ts b/src/components/ha-filter-labels.ts index 43c3c10098..c28b3fabe1 100644 --- a/src/components/ha-filter-labels.ts +++ b/src/components/ha-filter-labels.ts @@ -1,19 +1,18 @@ import { SelectedDetail } from "@material/mwc-list"; import "@material/mwc-menu/mwc-menu-surface"; -import { mdiPlus } from "@mdi/js"; +import { mdiCog } from "@mdi/js"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { CSSResultGroup, LitElement, css, html, nothing } from "lit"; import { customElement, property, state } from "lit/decorators"; import { repeat } from "lit/directives/repeat"; import { computeCssColor } from "../common/color/compute-color"; import { fireEvent } from "../common/dom/fire_event"; +import { navigate } from "../common/navigate"; import { LabelRegistryEntry, - createLabelRegistryEntry, subscribeLabelRegistry, } from "../data/label_registry"; import { SubscribeMixin } from "../mixins/subscribe-mixin"; -import { showLabelDetailDialog } from "../panels/config/labels/show-dialog-label-detail"; import { haStyleScrollbar } from "../resources/styles"; import type { HomeAssistant } from "../types"; import "./ha-check-list-item"; @@ -95,11 +94,11 @@ export class HaFilterLabels extends SubscribeMixin(LitElement) { ${this.expanded ? html` - - ${this.hass.localize("ui.panel.config.labels.add_label")} + + ${this.hass.localize("ui.panel.config.labels.manage_labels")} ` : nothing} `; @@ -115,10 +114,8 @@ export class HaFilterLabels extends SubscribeMixin(LitElement) { } } - private _addLabel() { - showLabelDetailDialog(this, { - createEntry: (values) => createLabelRegistryEntry(this.hass, values), - }); + private _manageLabels() { + navigate("/config/labels"); } private _expandedWillChange(ev) { diff --git a/src/translations/en.json b/src/translations/en.json index 2f0ed5d46c..f41492dce9 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1962,6 +1962,7 @@ "color": "Color" }, "add_label": "Add label", + "manage_labels": "Manage labels", "no_labels": "You don't have any labels", "introduction": "Labels can help you organize your areas, devices and entities. They can be used to filter in the UI, or use them as a target in automations.", "introduction2": "Go to the area, device or entity you want to add a label to, and click on the edit button to assign labels to them.",