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

Update datatypes.py - fixed range for ChargingProfileEntryMaxPower #185

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

shalinnijel2
Copy link
Contributor

This is fix for the issue mentioned here:
#89
Error seen:

pydantic.error_wrappers.ValidationError: 1 validation error for ProfileEntryDetails
ChargingProfileMaxPower
ensure this value is less than or equal to 255 (type=value_error.number.not_le; limit_value=255)

The range specified for ChargingProfileMaxPower seems to be incorrect. The field type is PMaxType which is xs:short. This PR updates the range to match that of p_max in PMaxScheduleEntry.

<xs:complexType name="ProfileEntryType">
  <xs:sequence>
    <xs:element name="ChargingProfileEntryStart" type="xs:unsignedInt"/>
    <xs:element name="ChargingProfileEntryMaxPower" type="PMaxType"/>
  </xs:sequence>
</xs:complexType>

<xs:simpleType name="PMaxType">
  <xs:restriction base="xs:short"/>
</xs:simpleType>

@shalinnijel2 shalinnijel2 force-pushed the fix_invalid_range_profileentrydetails branch from 535a382 to 01fe05e Compare January 26, 2023 18:49
@shalinnijel2 shalinnijel2 merged commit 6e007f9 into master Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants