Skip to content
New issue

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

V2.0.1 unit of measure update docstring to allow use for variable characteristics #514

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Change log

- [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics

## 0.22.0 (2023-11-03)

- [#493](https://github.com/mobilityhouse/ocpp/issues/493) Reduce use of NotSupportedError in favor of NotImplementedError. Thanks [drc38](@https://github.com/drc38).
Expand Down
4 changes: 3 additions & 1 deletion ocpp/v16/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,8 @@ class UnitOfMeasure(str, Enum):
"""
Allowable values of the optional "unit" field of a Value element, as used
in MeterValues.req and StopTransaction.req messages. Default value of
"unit" is always "Wh".
"unit" is always "Wh". Also used in 2.0.1 component/variables -
specifically the unit in variableCharacteristics.
"""

wh = "Wh"
Expand All @@ -773,6 +774,7 @@ class UnitOfMeasure(str, Enum):
k = "K"
percent = "Percent"
hertz = "Hertz"
b = "Bytes"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is done to the v16 enum. It should be applied to the v201 enum, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so it is only an addition now to the doc string



class UnlockStatus(str, Enum):
Expand Down
Loading