Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions packages/control/counter_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,15 @@ def check_and_add(type_name: ComponentType, data_structure):

# Falls EVU-Zähler fehlt, zuerst hinzufügen.
check_and_add(ComponentType.COUNTER, data.data.counter_data)
check_and_add(ComponentType.BAT, data.data.bat_data)
check_and_add(ComponentType.CHARGEPOINT, data.data.cp_data)
check_and_add(ComponentType.INVERTER, data.data.pv_data)
try:
self.get_id_evu_counter()
check_and_add(ComponentType.BAT, data.data.bat_data)
check_and_add(ComponentType.CHARGEPOINT, data.data.cp_data)
check_and_add(ComponentType.INVERTER, data.data.pv_data)
except TypeError:
pub_system_message({}, ("Es konnte kein Zähler gefunden werden, der als EVU-Zähler an die Spitze des "
"Lastmanagements gesetzt werden kann. Bitte zuerst einen EVU-Zähler hinzufügen."),
MessageType.ERROR)


def get_max_id_in_hierarchy(current_entry: List, max_id: int) -> int:
Expand Down