diff --git a/documentation/changelog.rst b/documentation/changelog.rst index c04aec65e9..6db505755d 100644 --- a/documentation/changelog.rst +++ b/documentation/changelog.rst @@ -43,6 +43,7 @@ Infrastructure / Support Bugfixes ----------- +* Fix ``StorageScheduler`` crash (``AttributeError: 'NoneType' object has no attribute 'event_resolution'``) when scheduling a site whose asset tree contains non-storage devices with only a ``power-capacity`` in their ``flex-model`` (no ``sensor`` key) [see `PR #2085 `_] * Fix DST transition handling by supporting both native Python ``datetime`` and pandas ``Timestamp`` objects in time series segment processing, preventing ``AttributeError`` when processing segments with differing UTC offsets [see `PR #2197 `_] * Fix forecasting regressor filtering to use only regressor beliefs known at the forecast ``belief_time`` [see `PR #2134 `_] * Make the sensor page forecast button train from available sensor history instead of the default 30-day window [see `PR #2187 `_] @@ -135,7 +136,6 @@ Bugfixes v0.31.3 | April 11, 2026 -============================ Bugfixes ----------- diff --git a/flexmeasures/data/models/planning/storage.py b/flexmeasures/data/models/planning/storage.py index 93a67a3e96..7317003cf3 100644 --- a/flexmeasures/data/models/planning/storage.py +++ b/flexmeasures/data/models/planning/storage.py @@ -906,7 +906,7 @@ def _prepare(self, skip_validation: bool = False) -> tuple: # noqa: C901 device_constraints[d]["efficiency"] = storage_efficiency[d] # Convert efficiency from sensor resolution to scheduling resolution - if sensor_d.event_resolution != timedelta(0): + if sensor_d is not None and sensor_d.event_resolution != timedelta(0): device_constraints[d]["efficiency"] **= ( resolution / sensor_d.event_resolution )