@@ -70,6 +70,7 @@ export class ConfigureComponent implements OnInit {
7070 private router : Router ,
7171 ) {
7272 this . ghPersonalAccessToken = _formBuilder . control ( [ "" ] ) ;
73+ this . debugComponentsFormControl = _formBuilder . control ( [ "" ] ) ;
7374 }
7475 private requiredInNonAddonScenario : ValidatorFn = (
7576 control : AbstractControl ,
@@ -89,6 +90,7 @@ export class ConfigureComponent implements OnInit {
8990 ! this . authStatus . hassiotoken ) ||
9091 ( this . configureMqttFormGroup . pristine &&
9192 this . ghPersonalAccessToken . pristine &&
93+ this . debugComponentsFormControl . pristine &&
9294 this . discoveryLanguageFormControl . pristine )
9395 ) ;
9496 }
@@ -107,6 +109,7 @@ export class ConfigureComponent implements OnInit {
107109 mqttcafile : [ null as string | null ] ,
108110 } ) ;
109111 ghPersonalAccessToken : FormControl ;
112+ debugComponentsFormControl : FormControl ;
110113 discoveryLanguageFormControl = new FormControl < string | null > ( null ) ;
111114 connectMessage : string = "" ;
112115 ngOnInit ( ) : void {
@@ -132,6 +135,12 @@ export class ConfigureComponent implements OnInit {
132135 config . mqttdiscoverylanguage ,
133136 ) ;
134137 }
138+ if ( config . debugComponents ) {
139+ this . debugComponentsFormControl ! . setValue (
140+ config . debugComponents
141+ ) ;
142+ }
143+
135144 this . entityApiService . getSslFiles ( ) . subscribe ( ( rc ) => {
136145 this . sslFiles = rc ;
137146 } ) ;
@@ -196,7 +205,12 @@ export class ConfigureComponent implements OnInit {
196205 this . ghPersonalAccessToken &&
197206 this . ghPersonalAccessToken . value . length > 0
198207 )
199- this . config . githubPersonalToken = this . ghPersonalAccessToken . value ;
208+ this . config . githubPersonalToken = this . ghPersonalAccessToken . value ;
209+ if (
210+ this . debugComponentsFormControl &&
211+ this . debugComponentsFormControl . value . length > 0
212+ )
213+ this . config . debugComponents = this . debugComponentsFormControl . value ;
200214 this . entityApiService . postConfiguration ( this . config ) . subscribe ( ( ) => {
201215 this . close ( ) ;
202216 } ) ;
0 commit comments