Skip to content

Commit 362fdf8

Browse files
committed
Add force parameter to _convertSchemaElementToSelector
1 parent 59c949e commit 362fdf8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

hassio/src/addon-view/config/hassio-addon-config.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class HassioAddonConfig extends LitElement {
104104
}
105105

106106
private _convertSchemaElement(entry: any): HaFormSchema {
107-
const selector = this._convertSchemaElementToSelector(entry);
107+
const selector = this._convertSchemaElementToSelector(entry, false);
108108
if (selector) {
109109
return {
110110
name: entry.name,
@@ -115,7 +115,10 @@ class HassioAddonConfig extends LitElement {
115115
return entry;
116116
}
117117

118-
private _convertSchemaElementToSelector(entry: any): Selector | null {
118+
private _convertSchemaElementToSelector(
119+
entry: any,
120+
force: boolean
121+
): Selector | null {
119122
if (entry.type === "select") {
120123
return { select: { options: entry.options } };
121124
}
@@ -146,6 +149,9 @@ class HassioAddonConfig extends LitElement {
146149
},
147150
};
148151
}
152+
if (force) {
153+
return { object: {} };
154+
}
149155
return null;
150156
}
151157

0 commit comments

Comments
 (0)