fix device types

This commit is contained in:
proddy
2026-07-12 22:01:56 +02:00
parent ddd0c39e4a
commit 7721993937

View File

@@ -923,7 +923,7 @@ const emsesp_coredata = {
devices: [ devices: [
{ {
id: 7, id: 7,
t: 5, t: 6,
tn: 'Boiler', tn: 'Boiler',
b: 'Nefit', b: 'Nefit',
n: 'Nefit Trendline HRC30/Generic Heatronic 3', n: 'Nefit Trendline HRC30/Generic Heatronic 3',
@@ -935,7 +935,7 @@ const emsesp_coredata = {
}, },
{ {
id: 3, id: 3,
t: 5, t: 6,
tn: 'Boiler', tn: 'Boiler',
b: 'Buderus', b: 'Buderus',
n: 'Buderus GB125', n: 'Buderus GB125',
@@ -947,7 +947,7 @@ const emsesp_coredata = {
}, },
{ {
id: 1, id: 1,
t: 6, t: 7,
tn: 'Thermostat', tn: 'Thermostat',
b: 'Buderus', b: 'Buderus',
n: 'RC35', n: 'RC35',
@@ -959,7 +959,7 @@ const emsesp_coredata = {
}, },
{ {
id: 2, id: 2,
t: 6, t: 7,
tn: 'Thermostat', tn: 'Thermostat',
b: '', b: '',
n: 'RC20', n: 'RC20',
@@ -971,7 +971,7 @@ const emsesp_coredata = {
}, },
{ {
id: 4, id: 4,
t: 6, t: 7,
tn: 'Thermostat', tn: 'Thermostat',
b: 'Nefit', b: 'Nefit',
n: 'Moduline 1000', n: 'Moduline 1000',
@@ -983,7 +983,7 @@ const emsesp_coredata = {
}, },
{ {
id: 5, id: 5,
t: 7, t: 8,
tn: 'Mixer Module', tn: 'Mixer Module',
b: 'Buderus', b: 'Buderus',
n: 'MM10', n: 'MM10',
@@ -994,7 +994,7 @@ const emsesp_coredata = {
}, },
{ {
id: 6, id: 6,
t: 8, t: 9,
tn: 'Solar Module', tn: 'Solar Module',
b: 'Buderus', b: 'Buderus',
n: 'SM10', n: 'SM10',
@@ -1007,7 +1007,7 @@ const emsesp_coredata = {
{ {
id: 8, id: 8,
tn: 'Boiler/HP', tn: 'Boiler/HP',
t: 5, t: 10,
b: '', b: '',
n: 'Bosch Compress 7000i AW Heat Pump', n: 'Bosch Compress 7000i AW Heat Pump',
d: 8, d: 8,
@@ -1019,7 +1019,7 @@ const emsesp_coredata = {
{ {
id: 9, id: 9,
tn: 'Thermostat', tn: 'Thermostat',
t: 6, t: 7,
b: '', b: '',
n: 'RC100H', n: 'RC100H',
d: 56, d: 56,
@@ -1031,7 +1031,7 @@ const emsesp_coredata = {
{ {
id: 10, id: 10,
tn: 'Thermostat', tn: 'Thermostat',
t: 6, t: 7,
b: '', b: '',
n: 'RC310', n: 'RC310',
d: 16, d: 16,
@@ -1043,7 +1043,7 @@ const emsesp_coredata = {
{ {
id: 11, id: 11,
tn: 'Ventilation', tn: 'Ventilation',
t: 18, t: 19,
b: '', b: '',
n: 'Vent4000CC', n: 'Vent4000CC',
d: 81, d: 81,
@@ -1051,6 +1051,18 @@ const emsesp_coredata = {
v: '53.02', v: '53.02',
e: 10, e: 10,
url: 'ventilation' url: 'ventilation'
},
{
id: 12,
tn: 'Gateway',
t: 11,
b: '',
n: 'KM300',
d: 72,
p: 231,
v: '01.20',
e: 0,
url: 'gateway'
} }
] ]
}; };
@@ -4703,6 +4715,10 @@ router
// Device Data // Device Data
.get(EMSESP_CORE_DATA_ENDPOINT, () => { .get(EMSESP_CORE_DATA_ENDPOINT, () => {
// remove gateway and connect devices
emsesp_coredata.devices = emsesp_coredata.devices.filter(
(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