---
title: HMError.Code.invalidParameter
framework: homekit
role: symbol
role_heading: Case
path: homekit/hmerror/code/invalidparameter
---

# HMError.Code.invalidParameter

An error indicating the object is invalid for the given operation.

## Declaration

```swift
case invalidParameter
```

## Discussion

Discussion For example, the home object issues an error when attempting to add a room that exists in another home.

## See Also

### Parameter errors

- [HMError.Code.missingParameter](homekit/hmerror/code/missingparameter.md)
- [HMError.Code.nilParameter](homekit/hmerror/code/nilparameter.md)
- [HMError.Code.unconfiguredParameter](homekit/hmerror/code/unconfiguredparameter.md)
