Allow automation/script delete (#3194)

This commit is contained in:
Paulus Schoutsen
2019-05-16 17:44:46 +02:00
committed by GitHub
parent 087c3b9c0e
commit be0bef3f1b
6 changed files with 55 additions and 8 deletions

View File

@@ -25,6 +25,7 @@ import { haStyle } from "../../../resources/styles";
import { HomeAssistant } from "../../../types";
import { triggerScript } from "../../../data/script";
import { showToast } from "../../../util/toast";
import { repeat } from "lit-html/directives/repeat";
@customElement("ha-script-picker")
class HaScriptPicker extends LitElement {
@@ -56,7 +57,9 @@ class HaScriptPicker extends LitElement {
<p>We couldn't find any scripts.</p>
</div>
`
: this.scripts.map(
: repeat(
this.scripts,
(script) => script.entity_id,
(script) => html`
<div class="script">
<paper-icon-button