File tree 1 file changed +1
-4
lines changed
1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,8 @@ def __init__(self):
14
14
self .device = None
15
15
16
16
self .hostname = EnvironmentVariableGetter .get ("INVERTER_HOSTNAME" )
17
-
18
17
self .battery_capacity = EnergyAmount (float (EnvironmentVariableGetter .get ("INVERTER_BATTERY_CAPACITY" )))
19
18
20
- self .dry_run = EnvironmentVariableGetter .get (name_of_variable = "DRY_RUN" , default_value = True )
21
-
22
19
def connect (self ) -> None :
23
20
"""
24
21
Connects to the inverter using the configured hostname.
@@ -56,7 +53,7 @@ def set_operation_mode(self, mode: OperationMode) -> None:
56
53
Raises:
57
54
RuntimeError: If the operation mode could not be set successfully.
58
55
"""
59
- if self . dry_run :
56
+ if EnvironmentVariableGetter . get ( name_of_variable = "DRY_RUN" , default_value = True ) :
60
57
self .log .info (f"Would set the inverter to { mode .name } but dry run is enabled" )
61
58
return
62
59
You can’t perform that action at this time.
0 commit comments