---
title: "init(wasFollowingGuidance:guidanceToken:)"
framework: energykit
role: symbol
role_heading: Initializer
path: "energykit/electricvehicleloadevent/session-swift.struct/guidancestate-swift.struct/init(wasfollowingguidance:guidancetoken:)"
---

# init(wasFollowingGuidance:guidanceToken:)

Initialize the GuidanceState for the ElectricVehicleLoadEvent

## Declaration

```swift
init(wasFollowingGuidance: Bool, guidanceToken: UUID)
```

## Parameters

- `wasFollowingGuidance`: Whether the device was applying doc://com.apple.energykit/documentation/EnergyKit/ElectricityGuidance for its energy use at the time of the event.
- `guidanceToken`: The token provided at time of doc://com.apple.energykit/documentation/EnergyKit/ElectricityGuidance fetch.
