Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 12 additions & 1 deletion packages/helpermodules/update_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@


class UpdateConfig:
DATASTORE_VERSION = 73
DATASTORE_VERSION = 74
valid_topic = [
"^openWB/bat/config/configured$",
"^openWB/bat/config/power_limit_mode$",
Expand Down Expand Up @@ -1934,3 +1934,14 @@ def upgrade(topic: str, payload) -> None:
Pub().pub(topic, payload)
self._loop_all_received_topics(upgrade)
self.__update_topic("openWB/system/datastore_version", 73)

def upgrade_datastore_73(self) -> None:
def upgrade(topic: str, payload) -> Optional[dict]:
# add manufacturer and model to components
if re.search("openWB/system/device/[0-9]+/component/[0-9]+/config", topic) is not None:
config_payload = decode_payload(payload)
if "info" not in config_payload:
config_payload.update({"info": {"manufacturer": None, "model": None}})
return {topic: config_payload}
self._loop_all_received_topics(upgrade)
self.__update_topic("openWB/system/datastore_version", 74)
7 changes: 6 additions & 1 deletion packages/modules/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,12 @@ def create_chargepoints_list(path_list):
return chargepoints

path_list = Path(_get_packages_path()/"modules"/"chargepoints").glob('**/chargepoint_module.py')
Pub().pub("openWB/set/system/configurable/chargepoints", create_chargepoints_list(path_list))
cp_list = create_chargepoints_list(path_list)
# Nach Umbennnung der "Externen openWB" zu "Secondary openWB" soll der Eintrag weiterhin an zweiter Stelle
# stehen
cp_list.remove({'value': 'external_openwb', 'text': 'Secondary openWB'})
cp_list.insert(1, {'value': 'external_openwb', 'text': 'Secondary openWB'})
Pub().pub("openWB/set/system/configurable/chargepoints", cp_list)

path_list = Path(_get_packages_path()/"modules" /
"chargepoints/internal_openwb").glob('**/chargepoint_module.py')
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/kostal/kostal_sem/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def __init__(self,
self.name = name
self.type = type
self.id = id
self.configuration = configuration or KostalSemCounterConfiguration()
super().__init__(name, type, id, configuration or KostalSemCounterConfiguration())