mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
clean up boolean, move to MQTT screen
This commit is contained in:
@@ -151,6 +151,17 @@ class MqttSettingsForm extends React.Component<MqttSettingsFormProps> {
|
||||
<MenuItem value={1}>by Sensor ID</MenuItem>
|
||||
<MenuItem value={2}>by Number</MenuItem>
|
||||
</SelectValidator>
|
||||
<SelectValidator name="bool_format"
|
||||
label="Boolean Format"
|
||||
value={data.bool_format}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
onChange={handleValueChange('bool_format')}
|
||||
margin="normal">
|
||||
<MenuItem value={1}>on/off</MenuItem>
|
||||
<MenuItem value={2}>true/false</MenuItem>
|
||||
<MenuItem value={3}>1/0</MenuItem>
|
||||
</SelectValidator>
|
||||
<BlockFormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
|
||||
@@ -35,6 +35,7 @@ export interface MqttSettings {
|
||||
publish_time_other: number;
|
||||
publish_time_sensor: number;
|
||||
dallas_format: number;
|
||||
bool_format: number;
|
||||
mqtt_qos: number;
|
||||
mqtt_retain: boolean;
|
||||
ha_enabled: boolean;
|
||||
|
||||
@@ -282,21 +282,6 @@ function EMSESPSettingsControllerForm(props: EMSESPSettingsControllerFormProps)
|
||||
label="Enable ADC"
|
||||
/>
|
||||
<br></br>
|
||||
<Typography variant="h6" color="primary" >
|
||||
Other
|
||||
</Typography>
|
||||
<SelectValidator name="bool_format"
|
||||
label="Boolean Format"
|
||||
value={data.bool_format}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
onChange={handleValueChange('bool_format')}
|
||||
margin="normal">
|
||||
<MenuItem value={1}>on/off</MenuItem>
|
||||
<MenuItem value={2}>true/false</MenuItem>
|
||||
<MenuItem value={3}>1/0</MenuItem>
|
||||
</SelectValidator>
|
||||
<br></br>
|
||||
<FormActions>
|
||||
<FormButton startIcon={<SaveIcon />} variant="contained" color="primary" type="submit">
|
||||
Save
|
||||
|
||||
@@ -16,7 +16,6 @@ export interface EMSESPSettings {
|
||||
led_gpio: number;
|
||||
hide_led: boolean;
|
||||
api_enabled: boolean;
|
||||
bool_format: number;
|
||||
analog_enabled: boolean;
|
||||
trace_raw: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user