File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -925,6 +925,7 @@ def _heating_valves(self):
925925 def _power_data_peak_value (self , loc ):
926926 """Helper-function for _power_data_from_location()."""
927927 loc .found = True
928+ loc .net_string = None
928929
929930 # Only once try to find P1 Legacy values
930931 if loc .logs .find (loc .locator ) is None and self .smile_type == "power" :
@@ -949,7 +950,10 @@ def _power_data_peak_value(self, loc):
949950 loc .key_string = f"{ loc .measurement } _{ peak } _{ log_found } "
950951 if "gas" in loc .measurement :
951952 loc .key_string = f"{ loc .measurement } _{ log_found } "
952- loc .net_string = f"net_electricity_{ log_found } "
953+ if "interval" not in log_found :
954+ loc .net_string = (
955+ f"net_electricity_{ log_found } " # Don't create net_elec_interval sensor!
956+ )
953957 val = loc .logs .find (loc .locator ).text
954958 log_date = parse (loc .logs .find (loc .locator ).get ("log_date" ))
955959 loc .log_date = log_date .astimezone (tz .gettz ("UTC" )).replace (tzinfo = None )
You can’t perform that action at this time.
0 commit comments