mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-29 01:52:51 +00:00
add connect to device list
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user