We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@dataclass class TransactionEventPayload: total_cost: Optional[int] = None charging_priority: Optional[int] = None id_token_info: Optional[Dict] = None updated_personal_message: Optional[Dict] = None custom_data: Optional[Dict[str, Any]] = None
According to the ocpp 2.0.1 spec, total_cost should be a 'decimal', not an int.
The text was updated successfully, but these errors were encountered:
Hmm I wanted to create a pull request with the change but I can not commit here. Here you have the diff:
diff --git a/ocpp/v201/call_result.py b/ocpp/v201/call_result.py index 520537c..9bf387b 100644 --- a/ocpp/v201/call_result.py +++ b/ocpp/v201/call_result.py @@ -387,11 +387,11 @@ class StatusNotification: custom_data: Optional[Dict[str, Any]] = None @dataclass class TransactionEvent: - total_cost: Optional[int] = None + total_cost: Optional[float] = None charging_priority: Optional[int] = None id_token_info: Optional[Dict] = None updated_personal_message: Optional[Dict] = None custom_data: Optional[Dict[str, Any]] = None
Sorry, something went wrong.
Image from official documentation for reference:
bugfix: Changed total_cost type from Optional[int] to Optional[float] (…
bef39f6
…#663) Fixes #657
jainmohit2001
Successfully merging a pull request may close this issue.
According to the ocpp 2.0.1 spec, total_cost should be a 'decimal', not an int.
The text was updated successfully, but these errors were encountered: