<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "EnergyKit",
  "identifier" : "/documentation/EnergyKit/ElectricityInsightQuery/init(options:range:granularity:flowDirection:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "EnergyKit"
    ],
    "preciseIdentifier" : "s:9EnergyKit23ElectricityInsightQueryV7options5range11granularity13flowDirectionA2C7OptionsV_10Foundation12DateIntervalVAC11GranularityOAA0c4FlowJ0Otcfc"
  },
  "title" : "init(options:range:granularity:flowDirection:)"
}
-->

# init(options:range:granularity:flowDirection:)

Creates an electricity insight query request.

```
init(options: ElectricityInsightQuery.Options, range: DateInterval, granularity: ElectricityInsightQuery.Granularity, flowDirection: ElectricityFlowDirection)
```

## Parameters

`options`

The optional information included when the system returns electricity insight records.

`range`

The requested date range.

`granularity`

The temporal granularity for returned electricity insight records.

`flowDirection`

The direction of the flow of electricity.

---

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)