From 5614e180d051df2973ae6c815a4964ed90bd4646 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Fri, 28 Jun 2024 09:44:00 +0200 Subject: [PATCH] init --- tests/test_local.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_local.py diff --git a/tests/test_local.py b/tests/test_local.py new file mode 100644 index 0000000..6f7ba44 --- /dev/null +++ b/tests/test_local.py @@ -0,0 +1,13 @@ +from chargeamps.local import ChargeAmpsLocalClient, LocalChargePoint + +SETTINGS_AURA = "101,1,1,0,160,4,1,1,0,160,4,100" +SETTINGS_HALO = "1,1,1,0,0,160,0,4" + + +def test_local(): + aura = LocalChargePoint.from_url("ws://127.0.0.1:8001", pin="12345678") + halo = LocalChargePoint.from_url("ws://127.0.0.1:8002", pin="12345678") + client = ChargeAmpsLocalClient(chargepoints=[aura, halo]) + + client.chargepoints[0].update_settings(SETTINGS_AURA) + client.chargepoints[1].update_settings(SETTINGS_HALO)