Skip to content

Commit 6a43f46

Browse files
committed
Filter extra when creating net_elec sensors
1 parent 5a6e0b1 commit 6a43f46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugwise/helper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,9 +950,10 @@ def _power_data_peak_value(self, loc):
950950
loc.key_string = f"{loc.measurement}_{peak}_{log_found}"
951951
if "gas" in loc.measurement:
952952
loc.key_string = f"{loc.measurement}_{log_found}"
953-
if "interval" not in log_found:
953+
# Don't create net_elec_interval sensor!
954+
if "electricity" in log_found and "interval" not in log_found:
954955
loc.net_string = (
955-
f"net_electricity_{log_found}" # Don't create net_elec_interval sensor!
956+
f"net_electricity_{log_found}"
956957
)
957958
val = loc.logs.find(loc.locator).text
958959
log_date = parse(loc.logs.find(loc.locator).get("log_date"))

0 commit comments

Comments
 (0)