mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
HP inputs #600, custom entity bool display
This commit is contained in:
@@ -226,13 +226,11 @@ const SettingsEntities: FC = () => {
|
||||
};
|
||||
|
||||
function formatValue(value: any, uom: number) {
|
||||
if (value === undefined) {
|
||||
return '';
|
||||
}
|
||||
if (uom === 0) {
|
||||
return new Intl.NumberFormat().format(value);
|
||||
}
|
||||
return new Intl.NumberFormat().format(value) + ' ' + DeviceValueUOM_s[uom];
|
||||
return value === undefined || uom === undefined
|
||||
? ''
|
||||
: typeof value === 'number'
|
||||
? new Intl.NumberFormat().format(value) + (uom === 0 ? '' : ' ' + DeviceValueUOM_s[uom])
|
||||
: value;
|
||||
}
|
||||
|
||||
function showHex(value: string, digit: number) {
|
||||
|
||||
Reference in New Issue
Block a user