diff --git a/src/panels/todo/ha-panel-todo.ts b/src/panels/todo/ha-panel-todo.ts index f3fc794247..e100f6606b 100644 --- a/src/panels/todo/ha-panel-todo.ts +++ b/src/panels/todo/ha-panel-todo.ts @@ -1,6 +1,11 @@ import { ResizeController } from "@lit-labs/observers/resize-controller"; import "@material/mwc-list"; -import { mdiChevronDown, mdiDotsVertical, mdiMicrophone } from "@mdi/js"; +import { + mdiChevronDown, + mdiDotsVertical, + mdiMicrophone, + mdiPlus, +} from "@mdi/js"; import { CSSResultGroup, LitElement, @@ -29,6 +34,8 @@ import { HomeAssistant } from "../../types"; import { HuiErrorCard } from "../lovelace/cards/hui-error-card"; import { createCardElement } from "../lovelace/create-element/create-card-element"; import { LovelaceCard } from "../lovelace/types"; +import { fetchIntegrationManifest } from "../../data/integration"; +import { showConfigFlowDialog } from "../../dialogs/config-flow/show-dialog-config-flow"; @customElement("ha-panel-todo") class PanelTodo extends LitElement { @@ -131,7 +138,7 @@ class PanelTodo extends LitElement { ` ); return html` - + ${listItems}
  • + + + ${this.hass.localize("ui.panel.todo.create_list")} + ` : "Lists"} ${listItems} + + + ${this.hass.localize("ui.panel.todo.create_list")} + { + showConfigFlowDialog(this, { + startFlowHandler: "local_todo", + showAdvanced: this.hass.userData?.showAdvanced, + manifest: await fetchIntegrationManifest(this.hass, "local_todo"), + }); + } + private _showVoiceCommandDialog(): void { showVoiceCommandDialog(this, this.hass, { pipeline_id: "last_used" }); } diff --git a/src/translations/en.json b/src/translations/en.json index e2a37d7c16..4b7444cb2d 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5511,7 +5511,8 @@ } }, "todo": { - "start_conversation": "Start conversation" + "start_conversation": "Start conversation", + "create_list": "Create list" }, "page-authorize": { "initializing": "Initializing",