From 0c168d86c6531ceedff31d603a548e4bda1346d9 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 25 Nov 2024 08:45:47 +0100 Subject: [PATCH 1/3] add names --- custom_components/chargeamps/services.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/custom_components/chargeamps/services.yaml b/custom_components/chargeamps/services.yaml index 04f8ecb..b079e6b 100644 --- a/custom_components/chargeamps/services.yaml +++ b/custom_components/chargeamps/services.yaml @@ -1,6 +1,7 @@ # Describes the format for available services for Chargeamps charging stations set_light: + name: Set light description: Sets the charge point lights. fields: chargepoint: @@ -17,6 +18,7 @@ set_light: example: false set_max_current: + name: Set max current description: Sets the maximum current for charging processes. fields: chargepoint: @@ -35,6 +37,7 @@ set_max_current: example: 16 enable: + name: Enable charging description: > Starts a charging process if charging station is authorized. fields: @@ -48,6 +51,7 @@ enable: example: 1 disable: + name: Disable charging description: > Stops the charging process if charging station is authorized. fields: @@ -61,6 +65,7 @@ disable: example: 1 cable_lock: + name: Lock cable description: Lock cable. fields: chargepoint: @@ -73,6 +78,7 @@ cable_lock: example: 1 cable_unlock: + name: Unlock cable description: Unlock cable. fields: chargepoint: @@ -85,6 +91,7 @@ cable_unlock: example: 1 remote_start: + name: Remote start description: Remote start using RFID. fields: chargepoint: @@ -113,6 +120,7 @@ remote_start: example: 0 remote_stop: + name: Remote stop description: Remote stop (Only when RFID lock is turned om) fields: chargepoint: From 4c679557118335d24c550fa9fc5fcbb0659d309a Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 25 Nov 2024 08:47:28 +0100 Subject: [PATCH 2/3] add pre-commit hook --- .pre-commit-config.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..20eb745 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: check-merge-conflict + - id: debug-statements + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-json + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.8.0 + hooks: + - id: ruff + - id: ruff-format From d06deb2d57bbceeb7745094b4ddcdf553a214049 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 25 Nov 2024 08:52:47 +0100 Subject: [PATCH 3/3] add names --- custom_components/chargeamps/services.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/custom_components/chargeamps/services.yaml b/custom_components/chargeamps/services.yaml index b079e6b..743d81e 100644 --- a/custom_components/chargeamps/services.yaml +++ b/custom_components/chargeamps/services.yaml @@ -5,14 +5,17 @@ set_light: description: Sets the charge point lights. fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" dimmer: + name: Dimmer description: > Dimmer settings. Possible values are 'off', 'low', 'medium' or 'high'. example: off downlight: + name: Downlight description: > Enable/disable downlight. example: false @@ -22,14 +25,17 @@ set_max_current: description: Sets the maximum current for charging processes. fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" connector: + name: Connector ID description: > Connector ID. Default is the first connector. example: 1 max_current: + name: Max current description: > The maximum current used for the charging process in A. Allowed are values between 6 A and 63 A. Invalid values are discarded and the @@ -42,10 +48,12 @@ enable: Starts a charging process if charging station is authorized. fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" connector: + name: Connector ID description: > Connector ID. Default is the first connector. example: 1 @@ -56,10 +64,12 @@ disable: Stops the charging process if charging station is authorized. fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" connector: + name: Connector ID description: > Connector ID. Default is the first connector. example: 1 @@ -69,10 +79,12 @@ cable_lock: description: Lock cable. fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" connector: + name: Connector ID description: > Connector ID. Default is the first connector. example: 1 @@ -82,10 +94,12 @@ cable_unlock: description: Unlock cable. fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" connector: + name: Connector ID description: > Connector ID. Default is the first connector. example: 1 @@ -95,26 +109,32 @@ remote_start: description: Remote start using RFID. fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" connector: + name: Connector ID description: > Connector ID. Default is the first connector. example: 1 rfid_length: + name: RFID length description: > The number of bytes the RFID tag used example: 4 rfid_format: + name: RFID format description: > Hex, Dex or ReverseDec example: Dec rfid: + name: RFID tag description: > The RFID Tag example: 111111111 external_transaction_id: + name: External transaction ID description: > Determines which external transaction (if any) to use example: 0 @@ -124,10 +144,12 @@ remote_stop: description: Remote stop (Only when RFID lock is turned om) fields: chargepoint: + name: Chargepoint ID description: > Charge point ID. Default is the first configured or found charge point. example: "000000000000" connector: + name: Connector ID description: > Connector ID. Default is the first connector. example: 1