diff --git a/src/components/ha-form/compute-initial-ha-form-data.ts b/src/components/ha-form/compute-initial-ha-form-data.ts index b83835ad70..6d24bbe531 100644 --- a/src/components/ha-form/compute-initial-ha-form-data.ts +++ b/src/components/ha-form/compute-initial-ha-form-data.ts @@ -6,7 +6,10 @@ export const computeInitialHaFormData = ( ): Record => { const data = {}; schema.forEach((field) => { - if (field.description?.suggested_value !== undefined) { + if ( + field.description?.suggested_value !== undefined && + field.description?.suggested_value !== null + ) { data[field.name] = field.description.suggested_value; } else if ("default" in field) { data[field.name] = field.default; diff --git a/src/components/ha-form/ha-form-integer.ts b/src/components/ha-form/ha-form-integer.ts index e71425ba27..3fe7389ab6 100644 --- a/src/components/ha-form/ha-form-integer.ts +++ b/src/components/ha-form/ha-form-integer.ts @@ -105,7 +105,8 @@ export class HaFormInteger extends LitElement implements HaFormElement { } return ( - this.schema.description?.suggested_value !== undefined || + (this.schema.description?.suggested_value !== undefined && + this.schema.description?.suggested_value !== null) || this.schema.default || this.schema.valueMin || 0