Skip to content

Commit

Permalink
Hinzufügen von sw_ok
Browse files Browse the repository at this point in the history
sw_ok-Eigenschaft wird der dimm_kit-Konfiguration mit dem Default-Wert "CLOSED" hinzugefügt. DATASTORE_VERSION wird hochgezählt. 
Sollte dieser Pull-Request später gemergt werden, müssen die Versionsnummern zwingend angepasst werden.
  • Loading branch information
andlem74 authored Oct 18, 2024
1 parent 7c27d23 commit cef67e1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/helpermodules/update_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


class UpdateConfig:
DATASTORE_VERSION = 65
DATASTORE_VERSION = 66
valid_topic = [
"^openWB/bat/config/configured$",
"^openWB/bat/config/power_limit_mode$",
Expand Down Expand Up @@ -1839,3 +1839,16 @@ def upgrade_datastore_64(self) -> None:
'<a href="https://wb-solution.de/shop/">https://wb-solution.de/shop/</a>',
MessageType.INFO)
self.__update_topic("openWB/system/datastore_version", 65)

def upgrade_datastore_65(self) -> None:
def upgrade(topic: str, payload) -> Optional[dict]:
if "openWB/general/ripple_control_receiver/module" == topic:
configuration_payload = decode_payload(payload)
if configuration_payload.get("type") == "dimm_kit":
if configuration_payload["configuration"].get("sw_ok") is None:
configuration_payload["configuration"].update({
"sw_ok": "CLOSED",
})
return {topic: configuration_payload}
self._loop_all_received_topics(upgrade)
self.__update_topic("openWB/system/datastore_version", 66)

0 comments on commit cef67e1

Please sign in to comment.