mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
formatting
This commit is contained in:
@@ -34,7 +34,10 @@ export function formatValue(
|
|||||||
if (value === undefined || typeof value === 'boolean') {
|
if (value === undefined || typeof value === 'boolean') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return (value as string) + (uom === undefined || uom === 0 ? '' : ' ' + DeviceValueUOM_s[uom]);
|
return (
|
||||||
|
(value as string) +
|
||||||
|
(uom === undefined || uom === 0 ? '' : ' ' + DeviceValueUOM_s[uom])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (uom) {
|
switch (uom) {
|
||||||
|
|||||||
@@ -382,9 +382,7 @@ export const entityItemValidation = (entity: EntityItem[], entityItem: EntityIte
|
|||||||
{ required: true, message: 'Offset is required' },
|
{ required: true, message: 'Offset is required' },
|
||||||
{ type: 'number', min: 0, max: 255, message: 'Must be between 0 and 255' }
|
{ type: 'number', min: 0, max: 255, message: 'Must be between 0 and 255' }
|
||||||
],
|
],
|
||||||
factor: [
|
factor: [{ required: true, message: 'is required' }]
|
||||||
{ required: true, message: 'is required' }
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const uniqueTemperatureNameValidator = (
|
export const uniqueTemperatureNameValidator = (
|
||||||
|
|||||||
@@ -4938,7 +4938,7 @@ router
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
port: 3080,
|
port: 3080,
|
||||||
fetch: router.fetch,
|
fetch: router.fetch
|
||||||
// missing: () => error(404, 'Error, endpoint not found'),
|
// missing: () => error(404, 'Error, endpoint not found'),
|
||||||
// finally: [logger]
|
// finally: [logger]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user