Remove optional field from ha-form schema type (#11538)

This commit is contained in:
Paulus Schoutsen
2022-02-03 16:30:37 -08:00
committed by GitHub
parent 890ad9a1c8
commit deba6a0db4
6 changed files with 11 additions and 22 deletions

View File

@@ -89,7 +89,7 @@ export class HaFormString extends LitElement implements HaFormElement {
if (this.data === value) {
return;
}
if (value === "" && this.schema.optional) {
if (value === "" && !this.schema.required) {
value = undefined;
}
fireEvent(this, "value-changed", {