@@ -18,6 +18,8 @@ class HaInputNumberForm extends LitElement {
1818
1919 @property ( { type : Boolean } ) public new = false ;
2020
21+ @property ( { type : Boolean } ) public disabled = false ;
22+
2123 private _item ?: Partial < InputNumber > ;
2224
2325 @state ( ) private _name ! : string ;
@@ -89,6 +91,7 @@ class HaInputNumberForm extends LitElement {
8991 "ui.dialogs.helper_settings.required_error_msg"
9092 ) }
9193 dialogInitialFocus
94+ .disabled = ${ this . disabled }
9295 > </ ha- textfield>
9396 <ha- icon- picker
9497 .hass = ${ this . hass }
@@ -98,6 +101,7 @@ class HaInputNumberForm extends LitElement {
98101 .label = ${ this . hass ! . localize (
99102 "ui.dialogs.helper_settings.generic.icon"
100103 ) }
104+ .disabled = ${ this . disabled }
101105 > </ ha- icon- picker>
102106 <ha- textfield
103107 .value = ${ this . _min }
@@ -108,6 +112,7 @@ class HaInputNumberForm extends LitElement {
108112 .label = ${ this . hass ! . localize (
109113 "ui.dialogs.helper_settings.input_number.min"
110114 ) }
115+ .disabled = ${ this . disabled }
111116 > </ ha- textfield>
112117 <ha- textfield
113118 .value = ${ this . _max }
@@ -118,6 +123,7 @@ class HaInputNumberForm extends LitElement {
118123 .label = ${ this . hass ! . localize (
119124 "ui.dialogs.helper_settings.input_number.max"
120125 ) }
126+ .disabled = ${ this . disabled }
121127 > </ ha- textfield>
122128 <ha- expansion- panel
123129 header= ${ this . hass . localize (
@@ -139,6 +145,7 @@ class HaInputNumberForm extends LitElement {
139145 value = "slider"
140146 .checked = ${ this . _mode === "slider" }
141147 @change = ${ this . _modeChanged }
148+ .disabled = ${ this . disabled }
142149 > </ ha- radio>
143150 </ ha- for mfield>
144151 <ha- for mfield
@@ -151,6 +158,7 @@ class HaInputNumberForm extends LitElement {
151158 value = "box"
152159 .checked = ${ this . _mode === "box" }
153160 @change = ${ this . _modeChanged }
161+ .disabled = ${ this . disabled }
154162 > </ ha- radio>
155163 </ ha- for mfield>
156164 </ div>
@@ -163,6 +171,7 @@ class HaInputNumberForm extends LitElement {
163171 .label = ${ this . hass ! . localize (
164172 "ui.dialogs.helper_settings.input_number.step"
165173 ) }
174+ .disabled = ${ this . disabled }
166175 > </ ha- textfield>
167176
168177 <ha- textfield
@@ -172,6 +181,7 @@ class HaInputNumberForm extends LitElement {
172181 .label = ${ this . hass ! . localize (
173182 "ui.dialogs.helper_settings.input_number.unit_of_measurement"
174183 ) }
184+ .disabled = ${ this . disabled }
175185 > </ ha- textfield>
176186 </ ha- expansion- panel>
177187 </ div>
0 commit comments