Compare commits
2 commits
dfa36b6294
...
970da93192
Author | SHA1 | Date | |
---|---|---|---|
Oliver Traber | 970da93192 | ||
Oliver Traber | abb106428b |
|
@ -43,7 +43,7 @@ class ChargePoint(cp):
|
||||||
db_chargepoint = db.query(DbChargePoint).filter(DbChargePoint.identity == self.id).first()
|
db_chargepoint = db.query(DbChargePoint).filter(DbChargePoint.identity == self.id).first()
|
||||||
# Learn token if requested
|
# Learn token if requested
|
||||||
if db_chargepoint.learn_user_id != None:
|
if db_chargepoint.learn_user_id != None:
|
||||||
if db_chargepoint.learn_until.timestamp() < datetime.now(UTC).timestamp():
|
if db_chargepoint.learn_until.timestamp() > datetime.now(UTC).timestamp():
|
||||||
db_id_token = DbIdToken()
|
db_id_token = DbIdToken()
|
||||||
db_id_token.friendly_name = "New token learned by {}".format(self.id)
|
db_id_token.friendly_name = "New token learned by {}".format(self.id)
|
||||||
db_id_token.is_active = True
|
db_id_token.is_active = True
|
||||||
|
@ -145,10 +145,6 @@ 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,
|
||||||
|
@ -237,3 +233,11 @@ class ChargePoint(cp):
|
||||||
if id_token != None:
|
if id_token != None:
|
||||||
return call_result.TransactionEventPayload(id_token_info=id_token_info)
|
return call_result.TransactionEventPayload(id_token_info=id_token_info)
|
||||||
return call_result.TransactionEventPayload()
|
return call_result.TransactionEventPayload()
|
||||||
|
|
||||||
|
@on(Action.MeterValues)
|
||||||
|
async def on_meter_values(self, **kwargs):
|
||||||
|
return call_result.MeterValuesPayload()
|
||||||
|
|
||||||
|
@on(Action.SecurityEventNotification)
|
||||||
|
async def on_security_event_notification(self, **kwargs):
|
||||||
|
return call_result.SecurityEventNotificationPayload()
|
||||||
|
|
Loading…
Reference in a new issue