Skip to content

Commit

Permalink
feat: add on_data_transfer handler to v201 chargepoint (#109)
Browse files Browse the repository at this point in the history
* Fix union annotations for python<3.10

Signed-off-by: Kai-Uwe Hermann <[email protected]>

---------

Signed-off-by: Valentin Dimov <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Co-authored-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
valentin-dimov and hikinggrass authored Dec 5, 2023
1 parent 4a5ce95 commit a054460
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 - 2023 Pionix GmbH and Contributors to EVerest
from __future__ import annotations

import logging
import shutil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
import sys
from abc import ABC, abstractmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 - 2023 Pionix GmbH and Contributors to EVerest
from __future__ import annotations

import asyncio
import ssl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ def on_get_certificate_status(self, **kwargs):
return call_result.GetCertificateStatusPayload(status=GenericStatusType.accepted,
ocsp_result="")

@on(Action.DataTransfer)
def on_data_transfer(self, **kwargs):
return call_result.DataTransferPayload(status=GenericStatusType.accepted, data="")

async def set_variables_req(self, **kwargs):
payload = call.SetVariablesPayload(**kwargs)
return await self.call(payload)
Expand Down

0 comments on commit a054460

Please sign in to comment.