<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "EnergyKit",
  "identifier" : "/documentation/EnergyKit/ElectricHVACLoadEvent/deviceID",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "EnergyKit"
    ],
    "preciseIdentifier" : "s:9EnergyKit21ElectricHVACLoadEventV8deviceIDSSvp"
  },
  "title" : "deviceID"
}
-->

# deviceID

The device’s unique stable identifier.

```
let deviceID: String
```

## Discussion

The max length is `64 UTF-8` bytes. UUID strings are permitted.
The following are enforced as preconditions:

- Isn’t empty, and less than or equal to 64 UTF-8 bytes.
- Uses only alphanumeric, space, hyphen, and apostrophe characters.
- Starts and ends with an alphanumeric character.

---

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)