Compare commits
2 commits
fda92b723b
...
dfa36b6294
Author | SHA1 | Date | |
---|---|---|---|
Oliver Traber | dfa36b6294 | ||
Oliver Traber | 791d0834b9 |
|
@ -145,6 +145,10 @@ class ChargePoint(cp):
|
||||||
id_token_info = await self.__get_id_token_info(id_token)
|
id_token_info = await self.__get_id_token_info(id_token)
|
||||||
return call_result.AuthorizePayload(id_token_info)
|
return call_result.AuthorizePayload(id_token_info)
|
||||||
|
|
||||||
|
@on(Action.MeterValues)
|
||||||
|
async def on_meter_values(self, **kwargs):
|
||||||
|
return call_result.MeterValuesPayload()
|
||||||
|
|
||||||
@on(Action.TransactionEvent)
|
@on(Action.TransactionEvent)
|
||||||
async def on_transaction_event(
|
async def on_transaction_event(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -12,13 +12,13 @@ class WebSocketWrapper():
|
||||||
async def recv(self) -> str:
|
async def recv(self) -> str:
|
||||||
try:
|
try:
|
||||||
text = await self._websocket.receive_text()
|
text = await self._websocket.receive_text()
|
||||||
logger.info("Message received: {}", text)
|
logger.info("Message received: %s", text)
|
||||||
return text
|
return text
|
||||||
except WebSocketDisconnect as e:
|
except WebSocketDisconnect as e:
|
||||||
raise ConnectionClosed(e.code, 'WebSocketWrapper')
|
raise ConnectionClosed(e.code, 'WebSocketWrapper')
|
||||||
|
|
||||||
async def send(self, msg: str) -> None:
|
async def send(self, msg: str) -> None:
|
||||||
logger.info("Message sent: {}", msg)
|
logger.info("Message sent: %s", msg)
|
||||||
await self._websocket.send_text(msg)
|
await self._websocket.send_text(msg)
|
||||||
|
|
||||||
async def close(self, code: int, reason: str) -> None:
|
async def close(self, code: int, reason: str) -> None:
|
||||||
|
|
Loading…
Reference in a new issue