${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;