diff --git a/modules/EvseManager/evse/evse_managerImpl.cpp b/modules/EvseManager/evse/evse_managerImpl.cpp index d6631762f3..a48b447c43 100644 --- a/modules/EvseManager/evse/evse_managerImpl.cpp +++ b/modules/EvseManager/evse/evse_managerImpl.cpp @@ -304,6 +304,9 @@ void evse_managerImpl::ready() { if (connector_status_changed) { se.connector_id = 1; } + + // Add source information (Who initiated this state change) + se.source = mod->charger->get_last_enable_disable_source(); } else if (e == types::evse_manager::SessionEventEnum::ChargingPausedEV or e == types::evse_manager::SessionEventEnum::ChargingPausedEVSE or e == types::evse_manager::SessionEventEnum::ChargingStarted or @@ -316,9 +319,6 @@ void evse_managerImpl::ready() { types::evse_manager::AuthorizationEvent authorization_event; authorization_event.meter_value = mod->get_latest_powermeter_data_billing(); se.authorization_event = authorization_event; - - // Add source information (Who initiated this state change) - se.source = mod->charger->get_last_enable_disable_source(); } se.uuid = session_uuid; diff --git a/types/evse_manager.yaml b/types/evse_manager.yaml index afbc22607d..0867879504 100644 --- a/types/evse_manager.yaml +++ b/types/evse_manager.yaml @@ -345,7 +345,7 @@ types: - MobileApp - FirmwareUpdate - CSMS - enable_state: + enable_state: description: Specifies the state for this entry type: string enum: @@ -377,7 +377,7 @@ types: format: date-time connector_id: description: >- - Id of the connector of this EVSE. + Id of the connector of this EVSE. If the connector_id is not specified, its assumed to be 1 type: integer event: @@ -406,13 +406,13 @@ types: $ref: /evse_manager#/TransactionFinished charging_state_changed_event: description: >- - Data for ChargingStateChangedEvent. Shall be set for the following SessionEventEnums: + Data for ChargingStateChangedEvent. Shall be set for the following SessionEventEnums: ChargingStarted, ChargingResumed, ChargingPausedEV, Charging type: object $ref: /evse_manager#/ChargingStateChangedEvent authorization_event: description: >- - Data for Authorization event. Shall be set for the following SessionEventEnums: + Data for Authorization event. Shall be set for the following SessionEventEnums: Authorized, Deauthorized type: object $ref: /evse_manager#/AuthorizationEvent @@ -591,4 +591,4 @@ types: type: object $ref: /evse_manager#/Connector minItems: 1 - maxItems: 128 \ No newline at end of file + maxItems: 128