<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMCharacteristic/characteristicType",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMCharacteristic(py)characteristicType"
  },
  "title" : "characteristicType"
}
-->

# characteristicType

The type of the characteristic.

```
var characteristicType: String { get }
```

## Discussion

A characteristic’s [`characteristicType`](/documentation/HomeKit/HMCharacteristic/characteristicType) is a string constant that tells you what the characteristic’s [`value`](/documentation/HomeKit/HMCharacteristic/value) represents. For example, if you detect a characteristic type of [`HMCharacteristicTypeCurrentTemperature`](/documentation/HomeKit/HMCharacteristicTypeCurrentTemperature), then you know that the corresponding [`value`](/documentation/HomeKit/HMCharacteristic/value) is a measure of the current temperature.

```swift
if characteristic.characteristicType == HMCharacteristicTypeCurrentTemperature,
    let temperatureValue = (characteristic.value as? NSNumber)?.floatValue {
        
    let temperature = String(format: "%.1f", temperatureValue)
    print("The current temperature is \(temperature) °C")
}
```

From the type, you can typically infer the value’s format. The value for the current temperature is always a floating point number measured in degrees Celsius, as shown in the code snippet above. You can also use the characteristic’s [`metadata`](/documentation/HomeKit/HMCharacteristic/metadata) to get explicit and detailed guidance on how to format the value.

See [Characteristic types](/documentation/HomeKit/characteristic-types) for a list of standard types.

---

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)