standalone compile issues

This commit is contained in:
proddy
2023-04-06 21:19:24 +02:00
parent 0c8a7d51a8
commit 825e33c3ea
5 changed files with 6568 additions and 23 deletions

View File

@@ -22,8 +22,8 @@
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@msgpack/msgpack": "^3.0.0-beta2",
"@mui/icons-material": "^5.11.11",
"@mui/material": "^5.11.15",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.11.16",
"@remix-run/router": "^1.5.0",
"@table-library/react-table-library": "4.1.0",
"@types/lodash-es": "^4.17.7",

View File

@@ -138,7 +138,8 @@ const GeneralFileUpload: FC<UploadFileProps> = ({ uploadGeneralFile }) => {
>
{LL.CUSTOMIZATIONS()}
</Button>
<Button sx={{ ml: 2 }}
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"

View File

@@ -101,17 +101,17 @@ export const schedulerItemValidation = (schedule: ScheduleItem[], scheduleItem:
]
});
export const uniqueNameValidator = (schedule: ScheduleItem[], o_name?: string) => ({
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
if (name && o_name && o_name !== name && schedule.find((si) => si.name === name)) {
callback('Name already in use');
} else {
callback();
}
export const uniqueNameValidator = (schedule: ScheduleItem[], o_name?: string) => ({
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
if (name && o_name && o_name !== name && schedule.find((si) => si.name === name)) {
callback('Name already in use');
} else {
callback();
}
});
}
});
export const entityItemValidation = (entity: EntityItem[], entityItem: EntityItem) =>
export const entityItemValidation = (entity: EntityItem[], entityItem: EntityItem) =>
new Schema({
name: [
{ required: true, message: 'Name is required' },
@@ -136,12 +136,12 @@ export const schedulerItemValidation = (schedule: ScheduleItem[], scheduleItem:
]
});
export const uniqueEntityNameValidator = (entity: EntityItem[], o_name?: string) => ({
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
if (name && o_name && o_name !== name && entity.find((ei) => ei.name === name)) {
callback('Name already in use');
} else {
callback();
}
export const uniqueEntityNameValidator = (entity: EntityItem[], o_name?: string) => ({
validator(rule: InternalRuleItem, name: string, callback: (error?: string) => void) {
if (name && o_name && o_name !== name && entity.find((ei) => ei.name === name)) {
callback('Name already in use');
} else {
callback();
}
});
}
});

File diff suppressed because it is too large Load Diff

View File

@@ -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);
// print line
uint8_t id = 0;
for (JsonPair p : json) {
const char * key = p.key().c_str();
shell.printf(" %s: ", key);
@@ -402,7 +401,6 @@ void EMSESP::show_device_values(uuid::console::Shell & shell) {
shell.print(COLOR_RESET);
shell.println();
id++;
}
shell.println();
}
@@ -961,12 +959,14 @@ void EMSESP::show_devices(uuid::console::Shell & shell) {
shell.println();
// count the number of thermostats
/*
uint8_t num_thermostats = 0;
for (const auto & emsdevice : emsdevices) {
if (emsdevice && (emsdevice->device_type() == DeviceType::THERMOSTAT)) {
num_thermostats++;
}
}
*/
// for all device objects from emsdevice.h
// so we keep a consistent order