updated function for registration of machines

This commit is contained in:
znetsixe
2025-09-04 17:07:18 +02:00
parent dc1fb500c0
commit 078a0d80dc

View File

@@ -81,7 +81,14 @@ class MachineGroup {
this.dynamicTotals = this.calcDynamicTotals();
}
registerOnChildEvents(){}
registerChild(child,softwareType) {
this.logger.debug('Setting up childs specific for this class');
if(softwareType == "machine"){
// Check if the machine is already registered
this.machines[child.config.general.id] === undefined ? this.machines[child.config.general.id] = child : this.logger.warn(`Machine ${child.config.general.id} is already registered.`);
}
}
calcAbsoluteTotals() {