From 65c0600c2ca47b47559d3d9e7bc5e56b272dc615 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 11 Jun 2024 20:46:32 +0200 Subject: [PATCH] test(ocpp-server): add StatusNotification handler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/ocpp-server/server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/ocpp-server/server.py b/tests/ocpp-server/server.py index e507d4f4..2da30d37 100644 --- a/tests/ocpp-server/server.py +++ b/tests/ocpp-server/server.py @@ -40,6 +40,11 @@ class ChargePoint(ocpp.v201.ChargePoint): logging.info("Received Heartbeat") return ocpp.v201.call_result.Heartbeat(current_time=datetime.now(timezone.utc).isoformat()) + @on(Action.StatusNotification) + async def on_status_notification(self, charging_station, connector_id, status, **kwargs): + logging.info("Received StatusNotification") + return ocpp.v201.call_result.StatusNotification() + # Request handlers to emit OCPP messages. async def send_clear_cache(self): request = ocpp.v201.call.ClearCache() -- 2.34.1