We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70d48b9 commit b5ba22bCopy full SHA for b5ba22b
custom_components/electric_ireland_insights/sensor_base.py
@@ -127,7 +127,7 @@ async def async_update_historical(self):
127
if not valid_datapoints:
128
LOGGER.error("Found no valid datapoints!")
129
else:
130
- min_dt, max_dt = valid_datapoints[0].dt, null_datapoints[len(valid_datapoints) - 1].dt
+ min_dt, max_dt = valid_datapoints[0].dt, valid_datapoints[len(valid_datapoints) - 1].dt
131
LOGGER.info(f"Found {len(valid_datapoints)} valid datapoints, ranging from {min_dt} to {max_dt}")
132
133
self._attr_historical_states = [d for d in hist_states if d.state]
0 commit comments