From e08853cdcb21963686e6bf3f3bb5fdcd1a058168 Mon Sep 17 00:00:00 2001 From: Victor Garcia Reolid Date: Mon, 10 Feb 2025 08:27:07 +0100 Subject: [PATCH 1/2] fix: use ENERGY units for the fill level Signed-off-by: Victor Garcia Reolid --- src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py b/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py index 889e73b..9087992 100644 --- a/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py +++ b/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py @@ -113,8 +113,8 @@ async def send_storage_status(self, status: FRBCStorageStatus): self._fill_level_sensor_id, start=self.now(), values=[status.present_fill_level], - unit=POWER_UNIT, - duration=timedelta(minutes=15), # INSTANTANEOUS + unit=ENERGY_UNIT, + duration=timedelta(minutes=0), # INSTANTANEOUS ) except Exception as e: response = ReceptionStatus( From b2ad6bc047963bab997a724ac8a63af3161d55ed Mon Sep 17 00:00:00 2001 From: Victor Garcia Reolid Date: Mon, 10 Feb 2025 08:27:35 +0100 Subject: [PATCH 2/2] fix: status doesn't have function get Signed-off-by: Victor Garcia Reolid --- src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py b/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py index 9087992..aa4431d 100644 --- a/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py +++ b/src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py @@ -118,7 +118,7 @@ async def send_storage_status(self, status: FRBCStorageStatus): ) except Exception as e: response = ReceptionStatus( - subject_message_id=status.get("message_id"), + subject_message_id=status.message_id, status=ReceptionStatusValues.PERMANENT_ERROR, ) await self._sending_queue.put(response)