From 252aa1410bb86331526cee672f74f4f3bb02e95c Mon Sep 17 00:00:00 2001 From: tronikos Date: Fri, 11 Oct 2024 03:37:23 -0700 Subject: [PATCH] Remove some redundant code in Opower's coordinator from the fix in #128141 (#128150) --- homeassistant/components/opower/coordinator.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/homeassistant/components/opower/coordinator.py b/homeassistant/components/opower/coordinator.py index 3b4cd07590c..629dce0823c 100644 --- a/homeassistant/components/opower/coordinator.py +++ b/homeassistant/components/opower/coordinator.py @@ -156,16 +156,6 @@ class OpowerCoordinator(DataUpdateCoordinator[dict[str, Forecast]]): cost_sum = cast(float, stats[cost_statistic_id][0]["sum"]) consumption_sum = cast(float, stats[consumption_statistic_id][0]["sum"]) last_stats_time = stats[consumption_statistic_id][0]["start"] - if end is None: - # If there was no statistic at the start of the cost reads, - # ignore cost reads past the last_stats_time. - cost_reads = [ - cost_read - for cost_read in cost_reads - if cost_read.start_time.timestamp() >= last_stats_time - ] - start = cost_reads[0].start_time - assert last_stats_time == start.timestamp() cost_statistics = [] consumption_statistics = []