<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 9.0.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMCharacteristicTypeContactState",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:@HMCharacteristicTypeContactState"
  },
  "title" : "HMCharacteristicTypeContactState"
}
-->

# HMCharacteristicTypeContactState

The state of a contact sensor.

```
let HMCharacteristicTypeContactState: String
```

## Discussion

The corresponding value is one of the constants in the [`HMCharacteristicValueContactState`](/documentation/HomeKit/HMCharacteristicValueContactState) enumeration.

## Topics

### Values

[`HMCharacteristicValueContactState`](/documentation/HomeKit/HMCharacteristicValueContactState)

Possible values for the contact sensor state.



---

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)