def METHOD_NAME(self, state: CounterState) -> CounterState:
    if self.add_child_values:
        self.currents = state.currents if state.currents else [0.0]*3
        self.power = state.power
        self.imported = state.imported
        self.exported = state.exported
        self.incomplete_currents = False
        def add_current_power(element):
            if element.data.get.currents is not None:
                if sum(element.data.get.currents) == 0 and element.data.get.power != 0:
                    self.currents = [0, 0, 0]
                    self.incomplete_currents = True
                else:
                    self.currents = list(map(add, self.currents, element.data.get.currents))
            else:
                self.currents = [0, 0, 0]
                self.incomplete_currents = True
            self.power += element.data.get.power
        def add_imported_exported(element):
            self.imported += element.data.get.imported
            self.exported += element.data.get.exported
        def add_exported(element):
            self.exported += element.data.get.exported
        counter_all = data.data.counter_all_data
        elements = counter_all.get_entry_of_element(self.delegate.delegate.num)["children"]
        for element in elements:
            if element["type"] == ComponentType.CHARGEPOINT.value:
                chargepoint = data.data.cp_data[f"cp{element['id']}"]
                try:
                    self.currents = list(map(add,
                                             self.currents,
                                             convert_cp_currents_to_evu_currents(
                                                 chargepoint.data.config.phase_1,
                                                 chargepoint.data.get.currents)))
                except KeyError:
                    raise FaultState.error(f"Für den virtuellen Zähler muss der Anschluss der Phasen von Ladepunkt"
                                           f" {chargepoint.data.config.name} an die Phasen der EVU angegeben "
                                           "werden.")
                self.power += chargepoint.data.get.power
                self.imported += chargepoint.data.get.imported
            elif element["type"] == ComponentType.BAT.value:
                add_current_power(data.data.bat_data[f"bat{element['id']}"])
                add_imported_exported(data.data.bat_data[f"bat{element['id']}"])
            elif element["type"] == ComponentType.COUNTER.value:
                add_current_power(data.data.counter_data[f"counter{element['id']}"])
                add_imported_exported(data.data.counter_data[f"counter{element['id']}"])
            elif element["type"] == ComponentType.INVERTER.value:
                add_current_power(data.data.pv_data[f"pv{element['id']}"])
                add_exported(data.data.pv_data[f"pv{element['id']}"])
        if self.incomplete_currents:
            self.currents = None
        return CounterState(currents=self.currents,
                            power=self.power,
                            exported=self.exported,
                            imported=self.imported)
    else:
        return state