|
57 | 57 |
|
58 | 58 | class UpdateConfig: |
59 | 59 |
|
60 | | - DATASTORE_VERSION = 96 |
| 60 | + DATASTORE_VERSION = 97 |
61 | 61 |
|
62 | 62 | valid_topic = [ |
63 | 63 | "^openWB/bat/config/bat_control_permitted$", |
@@ -215,6 +215,7 @@ class UpdateConfig: |
215 | 215 | "^openWB/general/grid_protection_timestamp$", |
216 | 216 | "^openWB/general/grid_protection_random_stop$", |
217 | 217 | "^openWB/general/range_unit$", |
| 218 | + "^openWB/general/temporary_charge_templates_active$", |
218 | 219 | "^openWB/general/notifications/selected$", |
219 | 220 | "^openWB/general/notifications/configuration$", |
220 | 221 | "^openWB/general/notifications/start_charging$", |
@@ -565,6 +566,7 @@ class UpdateConfig: |
565 | 566 | ("openWB/general/prices/grid", Prices().grid), |
566 | 567 | ("openWB/general/prices/pv", Prices().pv), |
567 | 568 | ("openWB/general/range_unit", "km"), |
| 569 | + ("openWB/general/temporary_charge_templates_active", False), |
568 | 570 | ("openWB/general/web_theme", dataclass_utils.asdict(StandardLegacyWebTheme())), |
569 | 571 | ("openWB/graph/config/duration", 120), |
570 | 572 | ("openWB/internal_chargepoint/0/data/parent_cp", None), |
@@ -2350,9 +2352,6 @@ def upgrade(topic: str, payload) -> None: |
2350 | 2352 | self.__update_topic("openWB/system/datastore_version", 88) |
2351 | 2353 |
|
2352 | 2354 | def upgrade_datastore_88(self) -> None: |
2353 | | - pub_system_message({}, "Änderungen, die du auf der Hauptseite vornimmst, gelten nur vorübergehend, bis das " |
2354 | | - "Fahrzeug abgesteckt wird. \nDie dauerhaften Einstellungen aus dem Einstellungsmenü werden " |
2355 | | - "danach automatisch wieder aktiviert.", MessageType.INFO) |
2356 | 2355 | pub_system_message({}, "Es gibt ein neues Theme: das Koala-Theme! Smarthpone-optimiert und mit " |
2357 | 2356 | "Energiefluss-Diagramm & Karten-Ansicht der Ladepunkte", MessageType.INFO) |
2358 | 2357 | self.__update_topic("openWB/system/datastore_version", 89) |
@@ -2560,3 +2559,16 @@ def upgrade(topic: str, payload) -> Optional[dict]: |
2560 | 2559 | return {topic: payload} |
2561 | 2560 | self._loop_all_received_topics(upgrade) |
2562 | 2561 | self.__update_topic("openWB/system/datastore_version", 96) |
| 2562 | + |
| 2563 | + def upgrade_datastore_96(self) -> None: |
| 2564 | + version = decode_payload(self.all_received_topics.get("openWB/system/version", "2.1.9")).split("-")[0] |
| 2565 | + major, minor, feature = (int(x) for x in version.split(".")) |
| 2566 | + if (2, 1, 7) <= (major, minor, feature) <= (2, 1, 8): |
| 2567 | + self.__update_topic("openWB/general/temporary_charge_templates_active", True) |
| 2568 | + pub_system_message( |
| 2569 | + {}, |
| 2570 | + "Die temporären Ladeeinstellungen können ab jetzt benutzerdefiniert unter Einstellungen -> Allgemein" |
| 2571 | + " -> Darstellung & Bedienung angewendet werden.", |
| 2572 | + MessageType.INFO, |
| 2573 | + ) |
| 2574 | + self.__update_topic("openWB/system/datastore_version", 97) |
0 commit comments