File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -937,6 +937,8 @@ def _power_data_peak_value(self, loc):
937937 loc .key_string = f"{ loc .measurement } _{ log_found } "
938938 loc .net_string = f"net_electricity_{ log_found } "
939939 val = loc .logs .find (loc .locator ).text
940+ log_date = parse (loc .logs .find (loc .locator ).get ("log_date" ))
941+ loc .log_date = log_date .astimezone (tz .gettz ("UTC" )).replace (tzinfo = None )
940942 loc .f_val = power_data_local_format (loc .attrs , loc .key_string , val )
941943
942944 return loc
@@ -979,6 +981,8 @@ def _power_data_from_location(self, loc_id):
979981 )
980982
981983 direct_data [loc .key_string ] = loc .f_val
984+ if "interval" in loc .key_string :
985+ direct_data [loc .key_string ] = [loc .f_val , loc .log_date ]
982986
983987 if direct_data != {}:
984988 return direct_data
You can’t perform that action at this time.
0 commit comments