diff --git a/docs/samples/sample_modbus/sample_modbus/device.py b/docs/samples/sample_modbus/sample_modbus/device.py index 013cd34159..f78bc2f76a 100644 --- a/docs/samples/sample_modbus/sample_modbus/device.py +++ b/docs/samples/sample_modbus/sample_modbus/device.py @@ -32,7 +32,7 @@ def create_inverter_component(component_config: SampleInverterSetup): def update_components(components: Iterable[Union[SampleBat, SampleCounter, SampleInverter]]): with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/docs/samples/sample_request_by_device/sample_request_by_device/device.py b/docs/samples/sample_request_by_device/sample_request_by_device/device.py index db9cd40f2a..0a0f912dde 100644 --- a/docs/samples/sample_request_by_device/sample_request_by_device/device.py +++ b/docs/samples/sample_request_by_device/sample_request_by_device/device.py @@ -27,7 +27,7 @@ def create_inverter_component(component_config: SampleInverterSetup): def update_components(components: Iterable[Union[SampleBat, SampleCounter, SampleInverter]]): response = req.get_http_session().get(device_config.configuration.ip_address, timeout=5).json() for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) return ConfigurableDevice( diff --git a/packages/modules/devices/algodue/algodue/device.py b/packages/modules/devices/algodue/algodue/device.py index d8358719bc..8b3ff704b6 100644 --- a/packages/modules/devices/algodue/algodue/device.py +++ b/packages/modules/devices/algodue/algodue/device.py @@ -23,7 +23,7 @@ def create_counter_component(component_config: AlgodueCounterSetup): def update_components(components: Iterable[counter.AlgodueCounter]): with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/alpha_ess/alpha_ess/device.py b/packages/modules/devices/alpha_ess/alpha_ess/device.py index 705e0cbf06..693a2edc12 100644 --- a/packages/modules/devices/alpha_ess/alpha_ess/device.py +++ b/packages/modules/devices/alpha_ess/alpha_ess/device.py @@ -49,7 +49,7 @@ def update_components(components: Iterable[Union[alpha_ess_component_classes]]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/ampere/ampere/device.py b/packages/modules/devices/ampere/ampere/device.py index fda58066b1..42310bc708 100644 --- a/packages/modules/devices/ampere/ampere/device.py +++ b/packages/modules/devices/ampere/ampere/device.py @@ -41,7 +41,7 @@ def create_inverter_component(component_config: AmpereInverterSetup): def update_components(components: Iterable[Union[AmpereBat, AmpereCounter, AmpereInverter]]): with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/avm/avm/device.py b/packages/modules/devices/avm/avm/device.py index 8dc89fbce6..942c39e5da 100644 --- a/packages/modules/devices/avm/avm/device.py +++ b/packages/modules/devices/avm/avm/device.py @@ -37,7 +37,7 @@ def update_components(components: Iterable[AvmCounter]): deviceListElementTree = ET.fromstring(response.text.strip()) for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(deviceListElementTree) def get_session_id(): diff --git a/packages/modules/devices/azzurro_zcs/azzurro_zcs/device.py b/packages/modules/devices/azzurro_zcs/azzurro_zcs/device.py index 92530a8716..126d40f774 100644 --- a/packages/modules/devices/azzurro_zcs/azzurro_zcs/device.py +++ b/packages/modules/devices/azzurro_zcs/azzurro_zcs/device.py @@ -37,7 +37,7 @@ def update_components(components: Iterable[Union[ZCSBat, ZCSCounter, ZCSInverter nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/batterx/batterx/device.py b/packages/modules/devices/batterx/batterx/device.py index 1a33689836..d015deb74b 100644 --- a/packages/modules/devices/batterx/batterx/device.py +++ b/packages/modules/devices/batterx/batterx/device.py @@ -39,7 +39,7 @@ def update_components(components: Iterable[batterx_component_classes]): 'http://' + device_config.configuration.ip_address + '/api.php?get=currentstate', timeout=5).json() for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(resp_json) return ConfigurableDevice( diff --git a/packages/modules/devices/carlo_gavazzi/carlo_gavazzi/device.py b/packages/modules/devices/carlo_gavazzi/carlo_gavazzi/device.py index e7ee9fcdf6..341b49772f 100644 --- a/packages/modules/devices/carlo_gavazzi/carlo_gavazzi/device.py +++ b/packages/modules/devices/carlo_gavazzi/carlo_gavazzi/device.py @@ -24,7 +24,7 @@ def update_components(components: Iterable[counter.CarloGavazziCounter]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/deye/deye/device.py b/packages/modules/devices/deye/deye/device.py index f746726d47..cf401a4aca 100644 --- a/packages/modules/devices/deye/deye/device.py +++ b/packages/modules/devices/deye/deye/device.py @@ -35,7 +35,7 @@ def update_components(components: Iterable[Union[DeyeBat, DeyeCounter, DeyeInver nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/e3dc/e3dc/device.py b/packages/modules/devices/e3dc/e3dc/device.py index 5e0b63ca2b..1e1992e658 100644 --- a/packages/modules/devices/e3dc/e3dc/device.py +++ b/packages/modules/devices/e3dc/e3dc/device.py @@ -60,7 +60,7 @@ def update_components(components: Iterable[Union[E3dcBat, E3dcCounter, E3dcInver nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/enphase/enphase/device.py b/packages/modules/devices/enphase/enphase/device.py index ad0dab03bf..2928afe599 100644 --- a/packages/modules/devices/enphase/enphase/device.py +++ b/packages/modules/devices/enphase/enphase/device.py @@ -144,7 +144,7 @@ def update_components(components: Iterable[Union[EnphaseBat, EnphaseCounter, Enp log.error(f"unknown version: {device_config.configuration.version}") return for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(json_response, json_live_data) read_live_data = False diff --git a/packages/modules/devices/fox_ess/fox_ess/device.py b/packages/modules/devices/fox_ess/fox_ess/device.py index 96d9985e95..8505073342 100644 --- a/packages/modules/devices/fox_ess/fox_ess/device.py +++ b/packages/modules/devices/fox_ess/fox_ess/device.py @@ -33,7 +33,7 @@ def update_components(components: Iterable[Union[FoxEssBat, FoxEssCounter, FoxEs nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/generic/json/device.py b/packages/modules/devices/generic/json/device.py index 554d559fd0..a02c5c8012 100644 --- a/packages/modules/devices/generic/json/device.py +++ b/packages/modules/devices/generic/json/device.py @@ -37,7 +37,7 @@ def create_inverter(component_config: JsonInverterSetup) -> JsonInverter: def update_components(components: Iterable[JsonComponent]): response = req.get_http_session().get(device_config.configuration.url, timeout=5).json() for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) return ConfigurableDevice( diff --git a/packages/modules/devices/generic/mqtt/device.py b/packages/modules/devices/generic/mqtt/device.py index 001aed7e25..af862f342f 100644 --- a/packages/modules/devices/generic/mqtt/device.py +++ b/packages/modules/devices/generic/mqtt/device.py @@ -39,7 +39,7 @@ def on_message(client, userdata, message): if received_topics: log.debug(f"Empfange MQTT Daten für Gerät {device_config.id}: {received_topics}") for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): try: component.update(received_topics) except KeyError: diff --git a/packages/modules/devices/good_we/good_we/device.py b/packages/modules/devices/good_we/good_we/device.py index 861759abd2..3c7e9b4e63 100644 --- a/packages/modules/devices/good_we/good_we/device.py +++ b/packages/modules/devices/good_we/good_we/device.py @@ -50,7 +50,7 @@ def update_components(components: Iterable[good_we_component_classes]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/growatt/growatt/device.py b/packages/modules/devices/growatt/growatt/device.py index 475cc3f452..139c168b4b 100644 --- a/packages/modules/devices/growatt/growatt/device.py +++ b/packages/modules/devices/growatt/growatt/device.py @@ -45,7 +45,7 @@ def update_components(components: Iterable[Union[GrowattBat, GrowattCounter, Gro nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/huawei/huawei/device.py b/packages/modules/devices/huawei/huawei/device.py index c22533e457..df77e1702a 100644 --- a/packages/modules/devices/huawei/huawei/device.py +++ b/packages/modules/devices/huawei/huawei/device.py @@ -48,7 +48,7 @@ def update_components(components: Iterable[Union[HuaweiBat, HuaweiCounter, Huawe nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/huawei/huawei_smartlogger/device.py b/packages/modules/devices/huawei/huawei_smartlogger/device.py index aac2c9a2d8..92ad36aff2 100644 --- a/packages/modules/devices/huawei/huawei_smartlogger/device.py +++ b/packages/modules/devices/huawei/huawei_smartlogger/device.py @@ -41,7 +41,7 @@ def update_components(components: Iterable[huawei_smartlogger_component_classes] nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/janitza/janitza/device.py b/packages/modules/devices/janitza/janitza/device.py index b5182e273f..0a0cda0501 100644 --- a/packages/modules/devices/janitza/janitza/device.py +++ b/packages/modules/devices/janitza/janitza/device.py @@ -35,7 +35,7 @@ def update_components(components: Iterable[Union[counter.JanitzaCounter, inverte nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/kaco/kaco_tx/device.py b/packages/modules/devices/kaco/kaco_tx/device.py index 1744f5b25d..60e917b3b9 100644 --- a/packages/modules/devices/kaco/kaco_tx/device.py +++ b/packages/modules/devices/kaco/kaco_tx/device.py @@ -25,7 +25,7 @@ def update_components(components: Iterable[KacoInverter]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/kostal/kostal_piko_old/device.py b/packages/modules/devices/kostal/kostal_piko_old/device.py index 7e77a92724..79c92daa0a 100644 --- a/packages/modules/devices/kostal/kostal_piko_old/device.py +++ b/packages/modules/devices/kostal/kostal_piko_old/device.py @@ -25,7 +25,7 @@ def update_components(components: Iterable[KostalPikoOldInverter]): response = req.get_http_session().get(device_config.configuration.url, verify=False, auth=( device_config.configuration.user, device_config.configuration.password), timeout=5).text for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) return ConfigurableDevice( diff --git a/packages/modules/devices/lg/lg/device.py b/packages/modules/devices/lg/lg/device.py index 41f650b158..9ebed79b6b 100644 --- a/packages/modules/devices/lg/lg/device.py +++ b/packages/modules/devices/lg/lg/device.py @@ -59,7 +59,7 @@ def update_components(components: Iterable[Union[LgBat, LgCounter, LgInverter]]) response = _request_data(session, session_key, device_config.configuration.ip_address) for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) session_key = " " diff --git a/packages/modules/devices/mtec/mtec/device.py b/packages/modules/devices/mtec/mtec/device.py index 4afc17d4ff..47581ff939 100644 --- a/packages/modules/devices/mtec/mtec/device.py +++ b/packages/modules/devices/mtec/mtec/device.py @@ -33,7 +33,7 @@ def update_components(components: Iterable[Union[MTecBat, MTecCounter, MTecInver nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/nibe/nibe/device.py b/packages/modules/devices/nibe/nibe/device.py index 5fcd534046..6a03378060 100644 --- a/packages/modules/devices/nibe/nibe/device.py +++ b/packages/modules/devices/nibe/nibe/device.py @@ -22,7 +22,7 @@ def create_counter_component(component_config: NibeCounterSetup): def update_components(components: Iterable[NibeCounter]): with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/openwb/openwb_bat_kit/device.py b/packages/modules/devices/openwb/openwb_bat_kit/device.py index e1c93b8152..f1cf0f1f4f 100644 --- a/packages/modules/devices/openwb/openwb_bat_kit/device.py +++ b/packages/modules/devices/openwb/openwb_bat_kit/device.py @@ -24,7 +24,7 @@ def update_components(components: Iterable[BatKit]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/openwb/openwb_evu_kit/device.py b/packages/modules/devices/openwb/openwb_evu_kit/device.py index 3f34139d4b..5e99c22d33 100644 --- a/packages/modules/devices/openwb/openwb_evu_kit/device.py +++ b/packages/modules/devices/openwb/openwb_evu_kit/device.py @@ -35,7 +35,7 @@ def update_components(components: Iterable[Union[BatKit, EvuKit, PvKit]]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/openwb/openwb_flex/device.py b/packages/modules/devices/openwb/openwb_flex/device.py index 8c77a08dd6..351b019a14 100644 --- a/packages/modules/devices/openwb/openwb_flex/device.py +++ b/packages/modules/devices/openwb/openwb_flex/device.py @@ -42,7 +42,7 @@ def create_inverter_component(component_config: PvKitFlexSetup): def update_components(components: Iterable[Union[BatKitFlex, ConsumptionCounterFlex, EvuKitFlex, PvKitFlex]]): for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/openwb/openwb_pv_kit/device.py b/packages/modules/devices/openwb/openwb_pv_kit/device.py index a81b493abf..f2cd8cf71b 100644 --- a/packages/modules/devices/openwb/openwb_pv_kit/device.py +++ b/packages/modules/devices/openwb/openwb_pv_kit/device.py @@ -24,7 +24,7 @@ def update_components(components: Iterable[inverter.PvKit]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/orno/orno/device.py b/packages/modules/devices/orno/orno/device.py index 5de83aff00..169bc971fd 100644 --- a/packages/modules/devices/orno/orno/device.py +++ b/packages/modules/devices/orno/orno/device.py @@ -23,7 +23,7 @@ def create_counter_component(component_config: OrnoCounterSetup): def update_components(components: Iterable[OrnoCounter]): with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/qcells/qcells/device.py b/packages/modules/devices/qcells/qcells/device.py index f0329315a4..a5c9b8eb18 100644 --- a/packages/modules/devices/qcells/qcells/device.py +++ b/packages/modules/devices/qcells/qcells/device.py @@ -33,7 +33,7 @@ def update_components(components: Iterable[Union[QCellsBat, QCellsCounter, QCell nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/saxpower/saxpower/device.py b/packages/modules/devices/saxpower/saxpower/device.py index f34a5653ea..6914ac931a 100644 --- a/packages/modules/devices/saxpower/saxpower/device.py +++ b/packages/modules/devices/saxpower/saxpower/device.py @@ -26,7 +26,7 @@ def update_components(components: Iterable[SaxpowerBat]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/siemens/siemens/device.py b/packages/modules/devices/siemens/siemens/device.py index 329df3b2dc..667af3607e 100644 --- a/packages/modules/devices/siemens/siemens/device.py +++ b/packages/modules/devices/siemens/siemens/device.py @@ -45,7 +45,7 @@ def update_components(components: Iterable[siemens_component_classes]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/siemens/siemens_sentron/device.py b/packages/modules/devices/siemens/siemens_sentron/device.py index 7282051ecd..354ccbe274 100644 --- a/packages/modules/devices/siemens/siemens_sentron/device.py +++ b/packages/modules/devices/siemens/siemens_sentron/device.py @@ -36,7 +36,7 @@ def update_components(components: Iterable[Union[counter.SiemensSentronCounter, nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/sigenergy/sigenergy/device.py b/packages/modules/devices/sigenergy/sigenergy/device.py index 5b4402fc4c..4667401cec 100644 --- a/packages/modules/devices/sigenergy/sigenergy/device.py +++ b/packages/modules/devices/sigenergy/sigenergy/device.py @@ -38,7 +38,7 @@ def update_components(components: Iterable[Union[SigenergyBat, SigenergyCounter, nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/sma/sma_sunny_boy/device.py b/packages/modules/devices/sma/sma_sunny_boy/device.py index 232991715d..f793b3f229 100644 --- a/packages/modules/devices/sma/sma_sunny_boy/device.py +++ b/packages/modules/devices/sma/sma_sunny_boy/device.py @@ -53,7 +53,7 @@ def update_components(components: Iterable[sma_modbus_tcp_component_classes]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/sma/sma_sunny_island/device.py b/packages/modules/devices/sma/sma_sunny_island/device.py index 346ff52346..6629eadcfa 100644 --- a/packages/modules/devices/sma/sma_sunny_island/device.py +++ b/packages/modules/devices/sma/sma_sunny_island/device.py @@ -23,7 +23,7 @@ def update_components(components: Iterable[SunnyIslandBat]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/sofar/sofar/device.py b/packages/modules/devices/sofar/sofar/device.py index ef5937810b..3ab2b80c69 100644 --- a/packages/modules/devices/sofar/sofar/device.py +++ b/packages/modules/devices/sofar/sofar/device.py @@ -33,7 +33,7 @@ def update_components(components: Iterable[Union[SofarBat, SofarCounter, SofarIn nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/solar_log/solar_log/device.py b/packages/modules/devices/solar_log/solar_log/device.py index 81ae7c2f45..ab84095125 100644 --- a/packages/modules/devices/solar_log/solar_log/device.py +++ b/packages/modules/devices/solar_log/solar_log/device.py @@ -25,7 +25,7 @@ def update_components(components: Iterable[Union[SolarLogCounter, SolarLogInvert response = req.get_http_session().post('http://'+device_config.configuration.ip_address+'/getjp', data=json.dumps({"801": {"170": None}}), timeout=5).json() for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) return ConfigurableDevice( diff --git a/packages/modules/devices/solar_world/solar_world/device.py b/packages/modules/devices/solar_world/solar_world/device.py index dd21d9b87f..0dc7f812d2 100644 --- a/packages/modules/devices/solar_world/solar_world/device.py +++ b/packages/modules/devices/solar_world/solar_world/device.py @@ -27,7 +27,7 @@ def update_components(components: Iterable[Union[SolarWorldCounter, SolarWorldIn response = req.get_http_session().get("http://"+str(device_config.configuration.ip_address) + "/rest/solarworld/lpvm/powerAndBatteryData", timeout=5).json() for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) return ConfigurableDevice( diff --git a/packages/modules/devices/solaredge/solaredge/device.py b/packages/modules/devices/solaredge/solaredge/device.py index 91821b29b8..6b4bb205e4 100644 --- a/packages/modules/devices/solaredge/solaredge/device.py +++ b/packages/modules/devices/solaredge/solaredge/device.py @@ -42,7 +42,7 @@ def update_components(components: Iterable[Union[SolaredgeBat, SolaredgeCounter, nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/solarmax/solarmax/device.py b/packages/modules/devices/solarmax/solarmax/device.py index c3cb235ab6..3fb514d09d 100644 --- a/packages/modules/devices/solarmax/solarmax/device.py +++ b/packages/modules/devices/solarmax/solarmax/device.py @@ -30,7 +30,7 @@ def update_components(components: Iterable[Union[SolarmaxBat, inverter.SolarmaxI nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/solax/solax/device.py b/packages/modules/devices/solax/solax/device.py index 73539fdadd..09a0d76940 100644 --- a/packages/modules/devices/solax/solax/device.py +++ b/packages/modules/devices/solax/solax/device.py @@ -30,7 +30,7 @@ def update_components(components: Iterable[Union[SolaxBat, SolaxCounter, SolaxIn nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/solis/solis/device.py b/packages/modules/devices/solis/solis/device.py index 9e8fcf8dc1..6b52c6a3cc 100644 --- a/packages/modules/devices/solis/solis/device.py +++ b/packages/modules/devices/solis/solis/device.py @@ -36,7 +36,7 @@ def update_components(components: Iterable[Union[SolisBat, SolisCounter, SolisIn nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/studer/studer/device.py b/packages/modules/devices/studer/studer/device.py index de887b0dc5..ae0d85fb4b 100644 --- a/packages/modules/devices/studer/studer/device.py +++ b/packages/modules/devices/studer/studer/device.py @@ -28,7 +28,7 @@ def update_components(components: Iterable[Union[StuderBat, StuderInverter]]): nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/tesla/tesla/device.py b/packages/modules/devices/tesla/tesla/device.py index c7f5e8be88..1bc1703084 100644 --- a/packages/modules/devices/tesla/tesla/device.py +++ b/packages/modules/devices/tesla/tesla/device.py @@ -21,7 +21,7 @@ def __update_components(client: PowerwallHttpClient, components: Iterable[Union[TeslaBat, TeslaCounter, TeslaInverter]]): aggregate = client.get_json("/api/meters/aggregates") for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(client, aggregate) diff --git a/packages/modules/devices/thermia/thermia/device.py b/packages/modules/devices/thermia/thermia/device.py index 20f94c3c2e..019d2966ab 100644 --- a/packages/modules/devices/thermia/thermia/device.py +++ b/packages/modules/devices/thermia/thermia/device.py @@ -23,7 +23,7 @@ def create_counter_component(component_config: ThermiaCounterSetup): def update_components(components: Iterable[Union[ThermiaCounter]]): with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/upower/upower/device.py b/packages/modules/devices/upower/upower/device.py index f4242b0722..4637d1922d 100644 --- a/packages/modules/devices/upower/upower/device.py +++ b/packages/modules/devices/upower/upower/device.py @@ -39,7 +39,7 @@ def create_inverter_component(component_config: UPowerInverterSetup): def update_components(components: Iterable[Union[UPowerBat, UPowerCounter, UPowerInverter]]): with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/varta/varta/device.py b/packages/modules/devices/varta/varta/device.py index b991ac3935..e22d64ac72 100644 --- a/packages/modules/devices/varta/varta/device.py +++ b/packages/modules/devices/varta/varta/device.py @@ -54,11 +54,11 @@ def update_components(components: Iterable[Union[VartaBatApi, VartaBatModbus, Va with client: for component in components: if isinstance(component, (VartaBatModbus, VartaCounter, VartaInverter)): - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() for component in components: if isinstance(component, (VartaBatApi)): - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/victron/victron/device.py b/packages/modules/devices/victron/victron/device.py index 6c4f1e84a0..5f346f400e 100644 --- a/packages/modules/devices/victron/victron/device.py +++ b/packages/modules/devices/victron/victron/device.py @@ -33,7 +33,7 @@ def update_components(components: Iterable[Union[VictronBat, VictronCounter, Vic nonlocal client with client: for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update() def initializer(): diff --git a/packages/modules/devices/vzlogger/vzlogger/device.py b/packages/modules/devices/vzlogger/vzlogger/device.py index 66f82fbca5..b292fac278 100644 --- a/packages/modules/devices/vzlogger/vzlogger/device.py +++ b/packages/modules/devices/vzlogger/vzlogger/device.py @@ -23,7 +23,7 @@ def create_inverter_component(component_config: VZLoggerInverterSetup): def update_components(components: Iterable[Union[VZLoggerCounter, VZLoggerInverter]]): response = req.get_http_session().get(device_config.configuration.ip_address, timeout=5).json() for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) return ConfigurableDevice( diff --git a/packages/modules/devices/youless/youless/device.py b/packages/modules/devices/youless/youless/device.py index 3cf064a7cf..026b4c8026 100644 --- a/packages/modules/devices/youless/youless/device.py +++ b/packages/modules/devices/youless/youless/device.py @@ -23,7 +23,7 @@ def update_components(components: Iterable[YoulessInverter]): params=(('f', 'j'),), timeout=5).json() for component in components: - with SingleComponentUpdateContext(component.fault_state, update_always=False): + with SingleComponentUpdateContext(component.fault_state): component.update(response) return ConfigurableDevice(