<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "EnergyKit",
  "identifier" : "/documentation/EnergyKit/ElectricHVACLoadEvent/Session-swift.struct/GuidanceState-swift.struct/init(wasFollowingGuidance:guidanceToken:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "EnergyKit"
    ],
    "preciseIdentifier" : "s:9EnergyKit21ElectricHVACLoadEventV7SessionV13GuidanceStateV012wasFollowingG013guidanceTokenAGSb_10Foundation4UUIDVtcfc"
  },
  "title" : "init(wasFollowingGuidance:guidanceToken:)"
}
-->

# init(wasFollowingGuidance:guidanceToken:)

Initialize the GuidanceState for the [`ElectricHVACLoadEvent`](/documentation/EnergyKit/ElectricHVACLoadEvent)

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

## Parameters

`wasFollowingGuidance`

Whether the device was applying [`ElectricityGuidance`](/documentation/EnergyKit/ElectricityGuidance)
for its energy use at the time of the event.

`guidanceToken`

The token provided at time of [`ElectricityGuidance`](/documentation/EnergyKit/ElectricityGuidance) fetch.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)