merge multiple_instances with entity_format

This commit is contained in:
Proddy
2022-12-15 21:51:11 +01:00
parent ccbb56d403
commit ba90ebda4c
15 changed files with 52 additions and 74 deletions

View File

@@ -170,6 +170,7 @@ const MqttSettingsForm: FC = () => {
control={<Checkbox name="mqtt_retain" checked={data.mqtt_retain} onChange={updateFormValue} />}
label={LL.MQTT_RETAIN_FLAG()}
/>
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
{LL.FORMATTING()}
</Typography>
@@ -214,49 +215,46 @@ const MqttSettingsForm: FC = () => {
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item>
<BlockFormControlLabel
sx={{ pb: 2 }}
sx={{ pb: 1 }}
control={<Checkbox name="ha_enabled" checked={data.ha_enabled} onChange={updateFormValue} />}
label={LL.MQTT_PUBLISH_TEXT_3()}
/>
</Grid>
{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>
<BlockFormControlLabel
control={
<Checkbox name="entity_fullname" checked={data.entity_fullname} onChange={updateFormValue} />
}
label={LL.MQTT_ENTITY_FULLNAME()}
/>
</Grid>
<Grid item sx={{ pb: 3 }}>
<ValidatedTextField
name="discovery_prefix"
label={LL.MQTT_PUBLISH_TEXT_4()}
fullWidth
variant="outlined"
value={data.discovery_prefix}
onChange={updateFormValue}
size="small"
/>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item>
<ValidatedTextField
name="discovery_prefix"
label={LL.MQTT_PUBLISH_TEXT_4()}
fullWidth
variant="outlined"
value={data.discovery_prefix}
onChange={updateFormValue}
margin="normal"
/>
</Grid>
<Grid item>
<ValidatedTextField
name="multiple_instances"
label={LL.MQTT_ENTITY_FORMAT()}
value={data.multiple_instances}
fullWidth
variant="outlined"
onChange={updateFormValue}
margin="normal"
select
>
<MenuItem value="false">{LL.MQTT_ENTITY_FORMAT_0()}</MenuItem>
<MenuItem value="true">{LL.MQTT_ENTITY_FORMAT_1()}</MenuItem>
</ValidatedTextField>
</Grid>
</Grid>
</>
)}
</Grid>
)}
<Typography variant="h6" color="primary">
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
{LL.MQTT_PUBLISH_INTERVALS()}&nbsp;(0=auto)
</Typography>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">

View File

@@ -249,8 +249,9 @@ const de: Translation = {
MQTT_INT_HEARTBEAT: 'Heartbeat',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Standard',
MQTT_MULTIPLE_INSTANCES: 'Erlaube EMS-ESP Mehrfachinstanzen',
MQTT_ENTITY_FULLNAME: 'Use v3.4 style Entity IDs',
MQTT_ENTITY_FORMAT: 'Entity ID format',
MQTT_ENTITY_FORMAT_0: 'Single instance, long name',
MQTT_ENTITY_FORMAT_1: 'Multiple instances, short name',
MQTT_CLEAN_SESSION: 'Setze `Clean Session`',
MQTT_RETAIN_FLAG: 'Setze `Retain flag` immer',
INACTIVE: 'Inaktiv',

View File

@@ -248,8 +248,9 @@ const en: Translation = {
MQTT_INT_HEARTBEAT: 'Heartbeat',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Default',
MQTT_MULTIPLE_INSTANCES: 'Enable Multiple Instances of EMS-ESP',
MQTT_ENTITY_FULLNAME: 'Use v3.4 style Entity IDs',
MQTT_ENTITY_FORMAT: 'Entity ID format',
MQTT_ENTITY_FORMAT_0: 'Single instance, long name',
MQTT_ENTITY_FORMAT_1: 'Multiple instances, short name',
MQTT_CLEAN_SESSION: 'Set Clean Session',
MQTT_RETAIN_FLAG: 'Always set Retain flag',
INACTIVE: 'Inactive',

View File

@@ -248,8 +248,9 @@ const nl: Translation = {
MQTT_INT_HEARTBEAT: 'Heartbeat',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Default',
MQTT_MULTIPLE_INSTANCES: 'Enable Multiple Instances of EMS-ESP',
MQTT_ENTITY_FULLNAME: 'Use v3.4 style Entity IDs',
MQTT_ENTITY_FORMAT: 'Entity ID format',
MQTT_ENTITY_FORMAT_0: 'Single instance, long name',
MQTT_ENTITY_FORMAT_1: 'Multiple instances, short name',
MQTT_CLEAN_SESSION: 'Clean Session aan',
MQTT_RETAIN_FLAG: 'Retain flag aan',
INACTIVE: 'Inactief',

View File

@@ -248,8 +248,9 @@ const no: Translation = {
MQTT_INT_HEARTBEAT: 'Heartbeat',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Standard',
MQTT_MULTIPLE_INSTANCES: 'Enable Multiple Instances of EMS-ESP',
MQTT_ENTITY_FULLNAME: 'Use v3.4 style Entity IDs',
MQTT_ENTITY_FORMAT: 'Entity ID format',
MQTT_ENTITY_FORMAT_0: 'Single instance, long name',
MQTT_ENTITY_FORMAT_1: 'Multiple instances, short name',
MQTT_CLEAN_SESSION: 'Benytt Clean Session',
MQTT_RETAIN_FLAG: 'Alltid sett Retain flag',
INACTIVE: 'Innaktiv',

View File

@@ -248,8 +248,9 @@ const pl: BaseTranslation = {
MQTT_INT_HEARTBEAT: 'Heartbeat',
MQTT_QUEUE: 'Kolejka MQTT',
DEFAULT: '{{Pozostałe|Domyślna|}}',
MQTT_MULTIPLE_INSTANCES: 'Enable Multiple Instances of EMS-ESP',
MQTT_ENTITY_FULLNAME: 'Use v3.4 style Entity IDs',
MQTT_ENTITY_FORMAT: 'Entity ID format',
MQTT_ENTITY_FORMAT_0: 'Single instance, long name',
MQTT_ENTITY_FORMAT_1: 'Multiple instances, short name',
MQTT_CLEAN_SESSION: 'Ustawiaj flagę "Clean session"',
MQTT_RETAIN_FLAG: 'Ustawiaj flagę "Retain"',
INACTIVE: 'nieaktywny',

View File

@@ -248,8 +248,9 @@ const se: Translation = {
MQTT_INT_HEARTBEAT: 'Heartbeat',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Standard',
MQTT_MULTIPLE_INSTANCES: 'Enable Multiple Instances of EMS-ESP',
MQTT_ENTITY_FULLNAME: 'Use v3.4 style Entity IDs',
MQTT_ENTITY_FORMAT: 'Entity ID format',
MQTT_ENTITY_FORMAT_0: 'Single instance, long name',
MQTT_ENTITY_FORMAT_1: 'Multiple instances, short name',
MQTT_CLEAN_SESSION: 'Använd "Clean Session"-flaggan',
MQTT_RETAIN_FLAG: 'Använd "Always Retain"-flaggan',
INACTIVE: 'Inaktiv',

View File

@@ -30,7 +30,6 @@ export interface MqttSettings {
keep_alive: number;
clean_session: boolean;
multiple_instances: boolean;
entity_fullname: boolean;
publish_time_boiler: number;
publish_time_thermostat: number;
publish_time_solar: number;