Ocpp: use ChargingProfileKindAbsolute (#15240)

This commit is contained in:
premultiply 2024-08-04 18:31:05 +02:00 • committed by GitHub
parent d0b58ba883
commit adf90ecccd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -452,6 +452,7 @@ func (c *OCPP) getCurrent() (float64, error) {
return current, err
}
// createTxDefaultChargingProfile returns a TxDefaultChargingProfile with given current
func (c *OCPP) createTxDefaultChargingProfile(current float64) *types.ChargingProfile {
phases := c.phases
period := types.NewChargingSchedulePeriod(0, current)
@ -475,8 +476,9 @@ func (c *OCPP) createTxDefaultChargingProfile(current float64) *types.ChargingPr
ChargingProfileId: 0,
StackLevel: 0,
ChargingProfilePurpose: types.ChargingProfilePurposeTxDefaultProfile,
ChargingProfileKind: types.ChargingProfileKindRelative,
ChargingProfileKind: types.ChargingProfileKindAbsolute,
ChargingSchedule: &types.ChargingSchedule{
StartSchedule: types.Now(),
ChargingRateUnit: c.chargingRateUnit,
ChargingSchedulePeriod: []types.ChargingSchedulePeriod{period},
},