mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 15:56:35 +00:00
Use min value instead of hard coded 0 (#10443)
This commit is contained in:
parent
c30453a86f
commit
7cadaf1dc3
@ -100,10 +100,15 @@ export class HaFormInteger extends LitElement implements HaFormElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.schema.optional) {
|
if (this.schema.optional) {
|
||||||
return 0;
|
return this.schema.valueMin || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.schema.description?.suggested_value || this.schema.default || 0;
|
return (
|
||||||
|
this.schema.description?.suggested_value ||
|
||||||
|
this.schema.default ||
|
||||||
|
this.schema.valueMin ||
|
||||||
|
0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleCheckboxChange(ev: Event) {
|
private _handleCheckboxChange(ev: Event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user