From 62d80019747bf88d987694297bd716f596412445 Mon Sep 17 00:00:00 2001 From: Martijn Versluis Date: Wed, 11 Dec 2024 14:46:09 +0100 Subject: [PATCH] Implement deauthorize_and_stop command --- lib/zaptec/client.rb | 2 ++ spec/zaptec/client_spec.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/zaptec/client.rb b/lib/zaptec/client.rb index 7c90432..8e8cabe 100644 --- a/lib/zaptec/client.rb +++ b/lib/zaptec/client.rb @@ -94,6 +94,8 @@ def pause_charging(charger_id) = send_command(charger_id, :StopChargingFinal) def resume_charging(charger_id) = send_command(charger_id, :ResumeCharging) + def deauthorize_and_stop(charger_id) = send_command(charger_id, :DeauthorizeAndStop) + private attr_reader :username, :password diff --git a/spec/zaptec/client_spec.rb b/spec/zaptec/client_spec.rb index e6957f3..2e296c8 100644 --- a/spec/zaptec/client_spec.rb +++ b/spec/zaptec/client_spec.rb @@ -275,6 +275,7 @@ { pause_charging: 506, resume_charging: 507, + deauthorize_and_stop: 10001, }.each do |operation, command_id| describe "##{operation}" do # rubocop:disable RSpec/NoExpectationExample