From 11a8e3e4be1242d4e3a7000439f720461841a794 Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Wed, 9 Jul 2025 10:07:58 +0200 Subject: [PATCH] fix consumption counter --- .../modules/devices/openwb/openwb_flex/consumption_counter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/modules/devices/openwb/openwb_flex/consumption_counter.py b/packages/modules/devices/openwb/openwb_flex/consumption_counter.py index aa6f0eb748..01ec98933e 100644 --- a/packages/modules/devices/openwb/openwb_flex/consumption_counter.py +++ b/packages/modules/devices/openwb/openwb_flex/consumption_counter.py @@ -26,7 +26,8 @@ def initialize(self) -> None: self.__device_id: int = self.kwargs['device_id'] self.__tcp_client: modbus.ModbusTcpClient_ = self.kwargs['client'] factory = consumption_counter_factory(self.component_config.configuration.type) - self.__client = factory(self.component_config.configuration.id, self.__tcp_client) + self.fault_state = FaultState(ComponentInfo.from_component_config(self.component_config)) + self.__client = factory(self.component_config.configuration.id, self.__tcp_client, self.fault_state) self.sim_counter = SimCounter(self.__device_id, self.component_config.id, prefix="bezug") self.store = get_counter_value_store(self.component_config.id) self.fault_state = FaultState(ComponentInfo.from_component_config(self.component_config))