${this.hass.localize(
"ui.panel.config.devices.picker.bulk_actions.add_area"
@@ -977,10 +977,10 @@ class HaScriptPicker extends SubscribeMixin(LitElement) {
this._selected = ev.detail.value;
}
- private async _handleBulkCategory(ev) {
- const category = ev.currentTarget.value;
+ private _handleBulkCategory = (item) => {
+ const category = item.value;
this._bulkAddCategory(category);
- }
+ };
private async _bulkAddCategory(category: string) {
const promises: Promise[] = [];
@@ -1185,7 +1185,7 @@ ${rejected
}
}
- private async _bulkCreateCategory() {
+ private _bulkCreateCategory = () => {
showCategoryRegistryDetailDialog(this, {
scope: "script",
createEntry: async (values) => {
@@ -1198,9 +1198,9 @@ ${rejected
return category;
},
});
- }
+ };
- private _bulkCreateLabel() {
+ private _bulkCreateLabel = () => {
showLabelDetailDialog(this, {
createEntry: async (values) => {
const label = await createLabelRegistryEntry(this.hass, values);
@@ -1208,12 +1208,12 @@ ${rejected
return label;
},
});
- }
+ };
- 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[] = [];
@@ -1240,7 +1240,7 @@ ${rejected
}
}
- private async _bulkCreateArea() {
+ private _bulkCreateArea = () => {
showAreaRegistryDetailDialog(this, {
createEntry: async (values) => {
const area = await createAreaRegistryEntry(this.hass, values);
@@ -1248,7 +1248,7 @@ ${rejected
return area;
},
});
- }
+ };
private _handleSortingChanged(ev: CustomEvent) {
this._activeSorting = ev.detail;