add connect to device list

This commit is contained in:
proddy
2026-07-26 10:49:20 +02:00
parent d6fcf16257
commit 0a66991902

View File

@@ -1063,6 +1063,18 @@ const emsesp_coredata = {
v: '01.20', v: '01.20',
e: 0, e: 0,
url: 'gateway' url: 'gateway'
},
{
id: 13,
tn: 'Connect',
t: 12,
b: '',
n: 'Easy Connect',
d: 2,
p: 206,
v: '12.34',
e: 0,
url: 'connect'
} }
] ]
}; };
@@ -4716,9 +4728,9 @@ router
// Device Data // Device Data
.get(EMSESP_CORE_DATA_ENDPOINT, () => { .get(EMSESP_CORE_DATA_ENDPOINT, () => {
// remove gateway and connect devices // remove gateway and connect devices
emsesp_coredata.devices = emsesp_coredata.devices.filter( // emsesp_coredata.devices = emsesp_coredata.devices.filter(
(item) => item.t !== 11 && item.t !== 12 // (item) => item.t !== 11 && item.t !== 12
); // );
// sort by type, like its done in the C++ code // sort by type, like its done in the C++ code
let sorted_devices = [...emsesp_coredata.devices].sort((a, b) => a.t - b.t); let sorted_devices = [...emsesp_coredata.devices].sort((a, b) => a.t - b.t);
// append emsesp_coredata to sorted_devices so Custom is always at the end of the list // append emsesp_coredata to sorted_devices so Custom is always at the end of the list