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

Use dataclasses for ChargingProfile usage #648

Merged
Merged
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
86a773d
Add dataclasses for ChargingProfile and it's constituents
grutts Jan 26, 2021
3b91490
Fix flake8 line length
grutts Jan 26, 2021
689cd1e
Merge branch 'master' into adrian/add_charging_profile_types
grutts Feb 28, 2021
19bfe11
remove_nones now handles nested dicts and lists of dicts
grutts Feb 28, 2021
10c968f
Fix flake8
grutts Feb 28, 2021
282e99e
Accept Dict for backwards compatibility
grutts Feb 28, 2021
9a714e4
Address review comments
grutts Mar 11, 2021
4c82c8c
Fix flake8 line too long
grutts Mar 11, 2021
9429467
Merge branch 'master' into adrian/add_charging_profile_types
grutts Mar 29, 2021
dc17b77
Merge branch 'master' of https://github.com/mobilityhouse/ocpp into a…
jerome-benoit Jun 12, 2024
10e25ae
fix merge issues
jerome-benoit Jun 12, 2024
4fa2727
Merge branch 'master' into charging_profile_types
jerome-benoit Jun 18, 2024
8a954ec
Merge branch 'master' into charging_profile_types
proelke Oct 15, 2024
5fee7c0
Merge branch 'master' into charging_profile_types
jerome-benoit Nov 26, 2024
3e5ab68
Merge branch 'master' into charging_profile_types
jerome-benoit Dec 9, 2024
5be966a
fix: use already defined charging profile types
jerome-benoit Dec 9, 2024
401b78b
Merge branch 'master' into charging_profile_types
jerome-benoit Dec 9, 2024
f5f1ded
Merge branch 'master' into charging_profile_types
jerome-benoit Dec 9, 2024
e8f6259
Merge branch 'master' into charging_profile_types
jerome-benoit Dec 18, 2024
d09fcfd
Update ocpp/v16/call.py
jerome-benoit Dec 18, 2024
f55a501
Update ocpp/v16/call.py
jerome-benoit Dec 18, 2024
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
9 changes: 6 additions & 3 deletions ocpp/v16/call.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import warnings
from dataclasses import dataclass, field
from typing import Dict, List, Optional
from typing import Dict, List, Optional, Union

from ocpp.v16.datatypes import ChargingProfile
from ocpp.v16.enums import (
AvailabilityType,
CertificateUse,
Expand Down Expand Up @@ -133,7 +134,8 @@ class InstallCertificate:
class RemoteStartTransaction:
id_tag: str
connector_id: Optional[int] = None
charging_profile: Optional[Dict] = None
# Accept Dict for backwards compatibility
jerome-benoit marked this conversation as resolved.
Show resolved Hide resolved
charging_profile: Optional[Union[Dict, ChargingProfile]] = None


@dataclass
Expand Down Expand Up @@ -165,7 +167,8 @@ class SendLocalList:
@dataclass
class SetChargingProfile:
connector_id: int
cs_charging_profiles: Dict
# Accept Dict for backwards compatibility
jerome-benoit marked this conversation as resolved.
Show resolved Hide resolved
cs_charging_profiles: Union[ChargingProfile, Dict]


@dataclass
Expand Down
Loading