diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts index 06fd009c2d..75e4240afb 100644 --- a/src/panels/config/automation/ha-automation-picker.ts +++ b/src/panels/config/automation/ha-automation-picker.ts @@ -403,7 +403,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { (category) => html` ${category.icon ? html`` @@ -411,7 +411,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
${category.name}
` )} - +
${this.hass.localize( "ui.panel.config.automation.picker.bulk_actions.no_category" @@ -419,7 +419,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
- +
${this.hass.localize("ui.panel.config.category.editor.add")}
@@ -456,7 +456,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
`; })} - +
${this.hass.localize("ui.panel.config.labels.add_label")}
html` ${area.icon ? html`` @@ -477,7 +477,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
${area.name}
` )} - +
${this.hass.localize( "ui.panel.config.devices.picker.bulk_actions.no_area" @@ -485,7 +485,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
- +
${this.hass.localize( "ui.panel.config.devices.picker.bulk_actions.add_area" @@ -760,7 +760,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { ` : nothing } - +
${this.hass.localize( @@ -768,7 +768,7 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) { )}
- + { + const category = item.value; this._bulkAddCategory(category); - } + }; private async _bulkAddCategory(category: string) { const promises: Promise[] = []; @@ -1309,10 +1309,10 @@ ${rejected } } - private async _handleBulkArea(ev) { - const area = ev.currentTarget.value; + private _handleBulkArea = (item) => { + const area = item.value; this._bulkAddArea(area); - } + }; private async _bulkAddArea(area: string) { const promises: Promise[] = []; @@ -1339,7 +1339,7 @@ ${rejected } } - private async _bulkCreateArea() { + private _bulkCreateArea = async () => { showAreaRegistryDetailDialog(this, { createEntry: async (values) => { const area = await createAreaRegistryEntry(this.hass, values); @@ -1347,9 +1347,9 @@ ${rejected return area; }, }); - } + }; - private async _handleBulkEnable() { + private _handleBulkEnable = async () => { const promises: Promise[] = []; this._selected.forEach((entityId) => { promises.push(turnOnOffEntity(this.hass, entityId, true)); @@ -1368,9 +1368,9 @@ ${rejected >`, }); } - } + }; - private async _handleBulkDisable() { + private _handleBulkDisable = async () => { const promises: Promise[] = []; this._selected.forEach((entityId) => { promises.push(turnOnOffEntity(this.hass, entityId, false)); @@ -1389,9 +1389,9 @@ ${rejected >`, }); } - } + }; - private async _bulkCreateCategory() { + private _bulkCreateCategory = async () => { showCategoryRegistryDetailDialog(this, { scope: "automation", createEntry: async (values) => { @@ -1404,9 +1404,9 @@ ${rejected return category; }, }); - } + }; - private _bulkCreateLabel() { + private _bulkCreateLabel = () => { showLabelDetailDialog(this, { createEntry: async (values) => { const label = await createLabelRegistryEntry(this.hass, values); @@ -1414,7 +1414,7 @@ ${rejected return label; }, }); - } + }; private _handleSortingChanged(ev: CustomEvent) { this._activeSorting = ev.detail;