File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ def update_wh(self, used_wH: float) -> None:
7171 self .used_kWh = round (used_wH / 1000 , 2 )
7272 self .last_update = datetime .now (timezone .utc ).astimezone ()
7373
74+ def update_allowed_wh (self , allowed_wH : float ) -> None :
75+ """This function is used to update the allowed_kWh attribute during a Hilo Challenge Event"""
76+ LOG .debug ("Updating allowed Wh: %s" , allowed_wH )
77+ self .allowed_kWh = round (allowed_wH / 1000 , 2 )
78+ self .last_update = datetime .now (timezone .utc ).astimezone ()
79+
7480 def should_check_for_allowed_wh (self ) -> bool :
7581 """This function is used to authorize subscribing to a specific event in Hilo to receive the allowed_kWh
7682 that is made available in the pre_heat phase"""
You can’t perform that action at this time.
0 commit comments