From cc0515c217d563da1063e65198396320e5227846 Mon Sep 17 00:00:00 2001
From: Villhellm
Date: Sat, 10 Oct 2020 23:14:22 -0700
Subject: [PATCH] Add help link on automations picker and updated links for
scripts and scenes (#7129)
Co-authored-by: Zack Barett
---
.../config/automation/ha-automation-picker.ts | 29 +++++++++++++++++--
src/panels/config/scene/ha-scene-dashboard.ts | 11 ++++---
src/panels/config/script/ha-script-picker.ts | 11 ++++---
3 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts
index 6f617ad2b9..02cdf95a45 100644
--- a/src/panels/config/automation/ha-automation-picker.ts
+++ b/src/panels/config/automation/ha-automation-picker.ts
@@ -1,5 +1,6 @@
import "@material/mwc-fab";
-import { mdiPlus } from "@mdi/js";
+import "@material/mwc-icon-button";
+import { mdiPlus, mdiHelpCircle } from "@mdi/js";
import "@polymer/paper-tooltip/paper-tooltip";
import {
CSSResult,
@@ -16,8 +17,8 @@ import { formatDateTime } from "../../../common/datetime/format_date_time";
import { fireEvent } from "../../../common/dom/fire_event";
import { computeStateName } from "../../../common/entity/compute_state_name";
import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table";
+import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
import "../../../components/entity/ha-entity-toggle";
-import "../../../components/ha-icon-button";
import "../../../components/ha-svg-icon";
import {
AutomationConfig,
@@ -31,6 +32,7 @@ import { haStyle } from "../../../resources/styles";
import { HomeAssistant, Route } from "../../../types";
import { configSections } from "../ha-panel-config";
import { showThingtalkDialog } from "./show-dialog-thingtalk";
+import { documentationUrl } from "../../../util/documentation-url";
@customElement("ha-automation-picker")
class HaAutomationPicker extends LitElement {
@@ -169,6 +171,9 @@ class HaAutomationPicker extends LitElement {
)}
hasFab
>
+
+
+
+
+ ${this.hass.localize(
+ "ui.panel.config.automation.picker.learn_more"
+ )}
+
+
+ `,
+ });
+ }
+
private _execute(ev) {
const entityId = ev.currentTarget.automation.entity_id;
triggerAutomation(this.hass, entityId);
diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts
index d9b81bb317..18666ee10c 100644
--- a/src/panels/config/scene/ha-scene-dashboard.ts
+++ b/src/panels/config/scene/ha-scene-dashboard.ts
@@ -1,5 +1,6 @@
import "@material/mwc-fab";
-import { mdiPlus } from "@mdi/js";
+import "@material/mwc-icon-button";
+import { mdiPlus, mdiHelpCircle } from "@mdi/js";
import "@polymer/paper-tooltip/paper-tooltip";
import {
css,
@@ -147,11 +148,9 @@ class HaSceneDashboard extends LitElement {
)}
hasFab
>
-
+
+
+
-
+
+
+