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

2.0.1 dataclasses have a incorrect types that don't match carnality #529

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [#593](https://github.com/mobilityhouse/ocpp/issues/593) Update tests to use Call and CallResult without the suffix Payload
- [#435](https://github.com/mobilityhouse/ocpp/issues/435) Typo in CostUpdated Action
- [#577](https://github.com/mobilityhouse/ocpp/issues/577) v2.0.1 AttributeType Enum Corrections
- [#340](https://github.com/mobilityhouse/ocpp/issues/340) 2.0.1 dataclasses have a incorrect types that don't match carnality
- [#519](https://github.com/mobilityhouse/ocpp/issues/519) Typo in v201.enums.StatusInfoReasonType.invaild_schedule
- [#510](https://github.com/mobilityhouse/ocpp/issues/510) v2.0.1 UnitOfMeasureType - Enums missing and update docstring to allow use for variableCharacteristics
- [#508](https://github.com/mobilityhouse/ocpp/issues/508) Exception - OccurrenceConstraintViolationError doc string correction
Expand Down
28 changes: 14 additions & 14 deletions ocpp/v201/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ class ChargingProfileCriterionType:

charging_profile_purpose: Optional[enums.ChargingProfilePurposeType] = None
stack_level: Optional[int] = None
charging_profile_id: Optional[int] = None
charging_limit_source: Optional[enums.ChargingLimitSourceType] = None
charging_profile_id: Optional[List[int]] = None
charging_limit_source: Optional[List[enums.ChargingLimitSourceType]] = None


@dataclass
Expand Down Expand Up @@ -162,15 +162,15 @@ class ConsumptionCostType:
"""

start_value: float
cost: CostType
cost: List[CostType]


@dataclass
class SalesTariffEntryType:
"""SalesTariffEntryType is used by: SalesTariffType"""

relative_time_interval: RelativeTimeIntervalType
consumption_cost: Optional[ConsumptionCostType] = None
consumption_cost: Optional[List[ConsumptionCostType]] = None
e_price_level: Optional[int] = None


Expand All @@ -182,7 +182,7 @@ class SalesTariffType:
"""

id: int
sales_tariff_entry: SalesTariffEntryType
sales_tariff_entry: List[SalesTariffEntryType]
sales_tariff_description: Optional[str] = None
num_e_price_levels: Optional[int] = None

Expand All @@ -198,7 +198,7 @@ class ChargingScheduleType:

id: int
charging_rate_unit: enums.ChargingRateUnitType
charging_schedule_period: ChargingSchedulePeriodType
charging_schedule_period: List[ChargingSchedulePeriodType]
start_schedule: Optional[str] = None
duration: Optional[int] = None
min_charging_rate: Optional[float] = None
Expand All @@ -218,7 +218,7 @@ class ChargingProfileType:
stack_level: int
charging_profile_purpose: enums.ChargingProfilePurposeType
charging_profile_kind: enums.ChargingProfileKindType
charging_schedule: ChargingScheduleType
charging_schedule: List[ChargingScheduleType]
valid_from: Optional[str] = None
valid_to: Optional[str] = None
transaction_id: Optional[str] = None
Expand Down Expand Up @@ -355,7 +355,7 @@ class CompositeScheduleType:
duration: int
schedule_start: str
charging_rate_unit: enums.ChargingRateUnitType
charging_schedule_period: ChargingSchedulePeriodType
charging_schedule_period: List[ChargingSchedulePeriodType]


@dataclass
Expand All @@ -376,7 +376,7 @@ class ConsumptionCostType:
"""

start_value: float
cost: CostType
cost: List[CostType]


@dataclass
Expand Down Expand Up @@ -455,7 +455,7 @@ class IdTokenType:

id_token: str
type: enums.IdTokenType
additional_info: Optional[AdditionalInfoType] = None
additional_info: Optional[List[AdditionalInfoType]] = None


@dataclass
Expand Down Expand Up @@ -487,7 +487,7 @@ class IdTokenInfoType:
cache_expiry_date_time: Optional[str] = None
charging_priority: Optional[int] = None
language_1: Optional[str] = None
evse_id: Optional[int] = None
evse_id: Optional[List[int]] = None
language_2: Optional[str] = None
group_id_token: Optional[IdTokenType] = None
personal_message: Optional[MessageContentType] = None
Expand Down Expand Up @@ -628,7 +628,7 @@ class MonitoringDataType:

component: ComponentType
variable: VariableType
variable_monitoring: VariableMonitoringType
variable_monitoring: List[VariableMonitoringType]


@dataclass
Expand Down Expand Up @@ -731,7 +731,7 @@ class ReportDataType:

component: ComponentType
variable: VariableType
variable_attribute: VariableAttributeType
variable_attribute: List[VariableAttributeType]
variable_characteristics: Optional[VariableCharacteristicsType] = None


Expand All @@ -743,7 +743,7 @@ class SalesTariffType:
"""

id: int
sales_tariff_entry: SalesTariffEntryType
sales_tariff_entry: List[SalesTariffEntryType]
sales_tariff_description: Optional[str] = None
num_e_price_levels: Optional[int] = None

Expand Down
Loading