move multiple instances setting to HA section

This commit is contained in:
MichaelDvP
2022-12-07 13:10:31 +01:00
parent fa703db41e
commit 1735c036cc

View File

@@ -162,10 +162,6 @@ const MqttSettingsForm: FC = () => {
</ValidatedTextField> </ValidatedTextField>
</Grid> </Grid>
</Grid> </Grid>
<BlockFormControlLabel
control={<Checkbox name="multiple_instances" checked={data.multiple_instances} onChange={updateFormValue} />}
label={LL.MQTT_MULTIPLE_INSTANCES()}
/>
<BlockFormControlLabel <BlockFormControlLabel
control={<Checkbox name="clean_session" checked={data.clean_session} onChange={updateFormValue} />} control={<Checkbox name="clean_session" checked={data.clean_session} onChange={updateFormValue} />}
label={LL.MQTT_CLEAN_SESSION()} label={LL.MQTT_CLEAN_SESSION()}
@@ -224,6 +220,13 @@ const MqttSettingsForm: FC = () => {
/> />
</Grid> </Grid>
{data.ha_enabled && ( {data.ha_enabled && (
<>
<Grid item>
<BlockFormControlLabel
control={<Checkbox name="multiple_instances" checked={data.multiple_instances} onChange={updateFormValue} />}
label={LL.MQTT_MULTIPLE_INSTANCES()}
/>
</Grid>
<Grid item sx={{ pb: 3 }}> <Grid item sx={{ pb: 3 }}>
<ValidatedTextField <ValidatedTextField
name="discovery_prefix" name="discovery_prefix"
@@ -235,6 +238,7 @@ const MqttSettingsForm: FC = () => {
size="small" size="small"
/> />
</Grid> </Grid>
</>
)} )}
</Grid> </Grid>
)} )}