This commit is contained in:
MichaelDvP
2022-12-16 11:10:58 +01:00
16 changed files with 167 additions and 144 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,41 +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 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,7 +249,9 @@ const de: Translation = {
MQTT_INT_HEARTBEAT: 'Heartbeat',
MQTT_QUEUE: 'MQTT Queue',
DEFAULT: 'Standard',
MQTT_MULTIPLE_INSTANCES: 'Erlaube EMS-ESP Mehrfachinstanzen',
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,7 +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_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,7 +248,9 @@ const fr: Translation = {
MQTT_INT_HEARTBEAT: 'Battements',
MQTT_QUEUE: 'Queue MQTT',
DEFAULT: 'Défaut',
MQTT_MULTIPLE_INSTANCES: 'Activer plusieurs instances de EMS-ESP',
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: 'Flag Clean Session',
MQTT_RETAIN_FLAG: 'Toujours activer le Retain Flag',
INACTIVE: 'Inactif',

View File

@@ -248,7 +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_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,7 +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_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,7 +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_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,7 +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_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',