Skip to content

Commit 4497ce4

Browse files
committed
Don't create net_electricity_interval
1 parent cf2f551 commit 4497ce4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugwise/helper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)