I’ve built a GUI for a custom component, and wish to use this component (or something similar) to let the user change which entity it displays data for. However when I create one, I get the following error:
Uncaught (in promise) TypeError: this._comboBox is null
This is my code:
const entityPicker = document.createElement('ha-entity-picker');
Object.assign(entityPicker, {
label: "Entity",
name: "entity",
required: true,
value: this.config.entity,
onchange: this.updateSetting.bind(card)
});
outerDiv.append(entityPicker);
Having looked at the core code, I can’t see public fields with which to declare a combo box, I’d appreciate any pointers