From 326db5c6aa26098d1b69a5740116b605d997b8b2 Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Wed, 17 Jun 2026 10:01:22 +0200 Subject: [PATCH 1/2] westfalen wind: set update hour to 0:00 --- .../flexible_tariffs/westfalen_wind/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/modules/electricity_pricing/flexible_tariffs/westfalen_wind/config.py b/packages/modules/electricity_pricing/flexible_tariffs/westfalen_wind/config.py index 78e1d4817e..92080a1ca8 100644 --- a/packages/modules/electricity_pricing/flexible_tariffs/westfalen_wind/config.py +++ b/packages/modules/electricity_pricing/flexible_tariffs/westfalen_wind/config.py @@ -17,6 +17,7 @@ class WestfalenWindTariffConfiguration: password: Optional[str] = None contract_id: Optional[str] = None token: WestfalenWindToken = field(default_factory=WestfalenWindToken, compare=False) + update_hours: list[int] = field(default_factory=lambda: [0]) # letzter Preis für 23:45 @dataclass From d07a957fa3e29dce0c6106e19d5a651a2fcaca8c Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Wed, 17 Jun 2026 10:08:43 +0200 Subject: [PATCH 2/2] update config --- packages/helpermodules/update_config.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/helpermodules/update_config.py b/packages/helpermodules/update_config.py index 4d7e1407cb..1b47c24931 100644 --- a/packages/helpermodules/update_config.py +++ b/packages/helpermodules/update_config.py @@ -57,7 +57,7 @@ class UpdateConfig: - DATASTORE_VERSION = 129 + DATASTORE_VERSION = 130 valid_topic = [ "^openWB/bat/config/bat_control_activated$", @@ -3288,3 +3288,14 @@ def upgrade(topic: str, payload) -> None: return None self._loop_all_received_topics(upgrade) self._append_datastore_version(129) + + def upgrade_datastore_130(self) -> None: + def upgrade(topic: str, payload) -> None: + if "openWB/optional/ep/flexible_tariff/provider" == topic: + provider = decode_payload(payload) + if provider["type"] == "westfalen_wind" and provider["configuration"].get("update_hours") is None: + provider["configuration"]["update_hours"] = [0] + return {topic: provider} + return None + self._loop_all_received_topics(upgrade) + self._append_datastore_version(130)