mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
standalone compile issues
This commit is contained in:
@@ -22,8 +22,8 @@
|
|||||||
"@emotion/react": "^11.10.6",
|
"@emotion/react": "^11.10.6",
|
||||||
"@emotion/styled": "^11.10.6",
|
"@emotion/styled": "^11.10.6",
|
||||||
"@msgpack/msgpack": "^3.0.0-beta2",
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
||||||
"@mui/icons-material": "^5.11.11",
|
"@mui/icons-material": "^5.11.16",
|
||||||
"@mui/material": "^5.11.15",
|
"@mui/material": "^5.11.16",
|
||||||
"@remix-run/router": "^1.5.0",
|
"@remix-run/router": "^1.5.0",
|
||||||
"@table-library/react-table-library": "4.1.0",
|
"@table-library/react-table-library": "4.1.0",
|
||||||
"@types/lodash-es": "^4.17.7",
|
"@types/lodash-es": "^4.17.7",
|
||||||
|
|||||||
@@ -138,7 +138,8 @@ const GeneralFileUpload: FC<UploadFileProps> = ({ uploadGeneralFile }) => {
|
|||||||
>
|
>
|
||||||
{LL.CUSTOMIZATIONS()}
|
{LL.CUSTOMIZATIONS()}
|
||||||
</Button>
|
</Button>
|
||||||
<Button sx={{ ml: 2 }}
|
<Button
|
||||||
|
sx={{ ml: 2 }}
|
||||||
startIcon={<DownloadIcon />}
|
startIcon={<DownloadIcon />}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
@@ -101,17 +101,17 @@ export const schedulerItemValidation = (schedule: ScheduleItem[], scheduleItem:
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
export const uniqueNameValidator = (schedule: ScheduleItem[], o_name?: string) => ({
|
export const uniqueNameValidator = (schedule: ScheduleItem[], o_name?: string) => ({
|
||||||
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
|
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
|
||||||
if (name && o_name && o_name !== name && schedule.find((si) => si.name === name)) {
|
if (name && o_name && o_name !== name && schedule.find((si) => si.name === name)) {
|
||||||
callback('Name already in use');
|
callback('Name already in use');
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
export const entityItemValidation = (entity: EntityItem[], entityItem: EntityItem) =>
|
export const entityItemValidation = (entity: EntityItem[], entityItem: EntityItem) =>
|
||||||
new Schema({
|
new Schema({
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: 'Name is required' },
|
{ required: true, message: 'Name is required' },
|
||||||
@@ -129,19 +129,19 @@ export const schedulerItemValidation = (schedule: ScheduleItem[], scheduleItem:
|
|||||||
type_id: [
|
type_id: [
|
||||||
{ required: true, message: 'Type_id is required' },
|
{ required: true, message: 'Type_id is required' },
|
||||||
{ type: 'string', pattern: /^[A-F0-9]{1,4}$/, message: 'Must be a hex number' }
|
{ type: 'string', pattern: /^[A-F0-9]{1,4}$/, message: 'Must be a hex number' }
|
||||||
],
|
],
|
||||||
offset: [
|
offset: [
|
||||||
{ 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' }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
export const uniqueEntityNameValidator = (entity: EntityItem[], o_name?: string) => ({
|
export const uniqueEntityNameValidator = (entity: EntityItem[], o_name?: string) => ({
|
||||||
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
|
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
|
||||||
if (name && o_name && o_name !== name && entity.find((ei) => ei.name === name)) {
|
if (name && o_name && o_name !== name && entity.find((ei) => ei.name === name)) {
|
||||||
callback('Name already in use');
|
callback('Name already in use');
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|||||||
6544
interface/yarn.lock
6544
interface/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -383,7 +383,6 @@ void EMSESP::show_device_values(uuid::console::Shell & shell) {
|
|||||||
emsdevice->generate_values(json, DeviceValueTAG::TAG_NONE, true, EMSdevice::OUTPUT_TARGET::CONSOLE);
|
emsdevice->generate_values(json, DeviceValueTAG::TAG_NONE, true, EMSdevice::OUTPUT_TARGET::CONSOLE);
|
||||||
|
|
||||||
// print line
|
// print line
|
||||||
uint8_t id = 0;
|
|
||||||
for (JsonPair p : json) {
|
for (JsonPair p : json) {
|
||||||
const char * key = p.key().c_str();
|
const char * key = p.key().c_str();
|
||||||
shell.printf(" %s: ", key);
|
shell.printf(" %s: ", key);
|
||||||
@@ -402,7 +401,6 @@ void EMSESP::show_device_values(uuid::console::Shell & shell) {
|
|||||||
|
|
||||||
shell.print(COLOR_RESET);
|
shell.print(COLOR_RESET);
|
||||||
shell.println();
|
shell.println();
|
||||||
id++;
|
|
||||||
}
|
}
|
||||||
shell.println();
|
shell.println();
|
||||||
}
|
}
|
||||||
@@ -961,12 +959,14 @@ void EMSESP::show_devices(uuid::console::Shell & shell) {
|
|||||||
shell.println();
|
shell.println();
|
||||||
|
|
||||||
// count the number of thermostats
|
// count the number of thermostats
|
||||||
|
/*
|
||||||
uint8_t num_thermostats = 0;
|
uint8_t num_thermostats = 0;
|
||||||
for (const auto & emsdevice : emsdevices) {
|
for (const auto & emsdevice : emsdevices) {
|
||||||
if (emsdevice && (emsdevice->device_type() == DeviceType::THERMOSTAT)) {
|
if (emsdevice && (emsdevice->device_type() == DeviceType::THERMOSTAT)) {
|
||||||
num_thermostats++;
|
num_thermostats++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// for all device objects from emsdevice.h
|
// for all device objects from emsdevice.h
|
||||||
// so we keep a consistent order
|
// so we keep a consistent order
|
||||||
|
|||||||
Reference in New Issue
Block a user