mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
bitmask for bool custom entities as hex value
This commit is contained in:
@@ -61,7 +61,8 @@ const CustomEntitiesDialog = ({
|
||||
setEditItem({
|
||||
...selectedItem,
|
||||
device_id: selectedItem.device_id.toString(16).toUpperCase(),
|
||||
type_id: selectedItem.type_id.toString(16).toUpperCase()
|
||||
type_id: selectedItem.type_id.toString(16).toUpperCase(),
|
||||
factor: selectedItem.value_type === DeviceValueType.BOOL ? selectedItem.factor.toString(16).toUpperCase() : selectedItem.factor
|
||||
});
|
||||
}
|
||||
}, [open, selectedItem]);
|
||||
@@ -82,6 +83,9 @@ const CustomEntitiesDialog = ({
|
||||
if (typeof editItem.type_id === 'string') {
|
||||
editItem.type_id = parseInt(editItem.type_id, 16);
|
||||
}
|
||||
if (editItem.value_type === DeviceValueType.BOOL && typeof editItem.factor === 'string') {
|
||||
editItem.factor = parseInt(editItem.factor, 16);
|
||||
}
|
||||
onSave(editItem);
|
||||
} catch (error) {
|
||||
setFieldErrors(error as ValidateFieldsError);
|
||||
@@ -315,7 +319,7 @@ const CustomEntitiesDialog = ({
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="factor"
|
||||
label="Bytes"
|
||||
label={LL.BYTES()}
|
||||
value={numberValue(editItem.factor as number)}
|
||||
sx={{ width: '11ch' }}
|
||||
variant="outlined"
|
||||
@@ -333,7 +337,7 @@ const CustomEntitiesDialog = ({
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="factor"
|
||||
label="Mask"
|
||||
label={LL.BITMASK()}
|
||||
value={editItem.factor as string}
|
||||
sx={{ width: '11ch' }}
|
||||
variant="outlined"
|
||||
|
||||
@@ -340,6 +340,8 @@ const cz: Translation = {
|
||||
AUTO_SCROLL: 'Automatické rolování',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Režim vývojáře',
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplikát',
|
||||
UPGRADE: 'Upgrade',
|
||||
DASHBOARD_1: 'Všechny aktivní entity EMS jsou označené jako oblíbené. Všechny vlastní entity, harmonogramy a externí sensory jsou zobrazeny níže.',
|
||||
|
||||
@@ -340,6 +340,8 @@ const de: Translation = {
|
||||
AUTO_SCROLL: 'Automatisches Scrollen',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Entwicklermodus',
|
||||
BYTES: 'Bytes',
|
||||
BITMASK: 'Bit Maske',
|
||||
DUPLICATE: 'Kopieren',
|
||||
UPGRADE: 'Aktualisieren',
|
||||
DASHBOARD_1: 'Alle EMS-Entitäten, die aktiv und als Favorit markiert sind, sowie alle benutzerdefinierten Entitäten, Zeitpläne und externen Sensordaten werden unten angezeigt.',
|
||||
|
||||
@@ -341,6 +341,8 @@ const en: Translation = {
|
||||
DASHBOARD: 'Dashboard',
|
||||
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.',
|
||||
DEVELOPER_MODE: 'Developer Mode',
|
||||
BYTES: 'Bytes',
|
||||
BITMASK: 'Bit Mask',
|
||||
DUPLICATE: 'Duplicate',
|
||||
UPGRADE: 'Upgrade',
|
||||
NO_DATA_1: 'No favorite EMS entities found yet. Use the',
|
||||
|
||||
@@ -340,6 +340,8 @@ const fr: Translation = {
|
||||
AUTO_SCROLL: 'Auto Scroll', // TODO translate
|
||||
DASHBOARD: 'Dashboard', // TODO translate
|
||||
DEVELOPER_MODE: 'Developer Mode', // TODO translate
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplicate', // TODO translate
|
||||
UPGRADE: 'Upgrade', // TODO translate
|
||||
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.', // TODO translate
|
||||
|
||||
@@ -340,6 +340,8 @@ const it: Translation = {
|
||||
AUTO_SCROLL: 'Auto Scroll', // TODO translate
|
||||
DASHBOARD: 'Dashboard', // TODO translate
|
||||
DEVELOPER_MODE: 'Developer Mode', // TODO translate
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplicate', // TODO translate
|
||||
UPGRADE: 'Upgrade', // TODO translate
|
||||
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.', // TODO translate
|
||||
|
||||
@@ -340,6 +340,8 @@ const nl: Translation = {
|
||||
AUTO_SCROLL: 'Automatisch Scrollen',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Ontwikkelaarsmodus',
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplicaat',
|
||||
UPGRADE: 'Upgraden',
|
||||
DASHBOARD_1: 'Alle EMS-entiteiten die actief zijn en als favoriet zijn gemarkeerd, plus alle aangepaste entiteiten en externe sensorgegevens worden hieronder weergegeven.',
|
||||
|
||||
@@ -340,6 +340,8 @@ const no: Translation = {
|
||||
AUTO_SCROLL: 'Auto Scroll', // TODO translate
|
||||
DASHBOARD: 'Dashboard', // TODO translate
|
||||
DEVELOPER_MODE: 'Developer Mode', // TODO translate
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplicate', // TODO translate
|
||||
UPGRADE: 'Upgrade', // TODO translate
|
||||
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.', // TODO translate
|
||||
|
||||
@@ -340,6 +340,8 @@ const pl: BaseTranslation = {
|
||||
AUTO_SCROLL: 'Auto Scroll', // TODO translate
|
||||
DASHBOARD: 'Dashboard', // TODO translate
|
||||
DEVELOPER_MODE: 'Developer Mode', // TODO translate
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplicate', // TODO translate
|
||||
UPGRADE: 'Upgrade', // TODO translate
|
||||
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.', // TODO translate
|
||||
|
||||
@@ -340,6 +340,8 @@ const sk: Translation = {
|
||||
AUTO_SCROLL: 'Automatické rolovanie',
|
||||
DASHBOARD: 'Panel',
|
||||
DEVELOPER_MODE: 'Režim vývojára',
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplicitné',
|
||||
UPGRADE: 'Inovovať',
|
||||
DASHBOARD_1: 'Všetky entity EMS, ktoré sú aktívne a označené ako obľúbené, plus všetky vlastné entity, plány a údaje externých senzorov sú zobrazené nižšie.',
|
||||
|
||||
@@ -340,6 +340,8 @@ const sv: Translation = {
|
||||
AUTO_SCROLL: 'Autoskrolla',
|
||||
DASHBOARD: 'Kontrollpanel',
|
||||
DEVELOPER_MODE: 'Utvecklarläge',
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Dublett',
|
||||
UPGRADE: 'Uppgradera',
|
||||
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.', // TODO translate
|
||||
|
||||
@@ -340,6 +340,8 @@ const tr: Translation = {
|
||||
AUTO_SCROLL: 'Auto Scroll', // TODO translate
|
||||
DASHBOARD: 'Dashboard', // TODO translate
|
||||
DEVELOPER_MODE: 'Developer Mode', // TODO translate
|
||||
BYTES: 'Bytes', // TODO translate
|
||||
BITMASK: 'Bit Mask',// TODO translate
|
||||
DUPLICATE: 'Duplicate', // TODO translate
|
||||
UPGRADE: 'Upgrade', // TODO translate
|
||||
DASHBOARD_1: 'All EMS entities that are active and marked as Favorite, plus all Custom Entities, Schedules and external Sensors data are displayed below.', // TODO translate
|
||||
|
||||
Reference in New Issue
Block a user