---
title: "accessory(_:service:didUpdateValueFor:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmaccessorydelegate/accessory(_:service:didupdatevaluefor:)"
---

# accessory(_:service:didUpdateValueFor:)

Informs the delegate of a change in value of a characteristic.

## Declaration

```swift
optional func accessory(_ accessory: HMAccessory, service: HMService, didUpdateValueFor characteristic: HMCharacteristic)
```

## Parameters

- `accessory`: The accessory.
- `service`: The service with a changed characteristic value.
- `characteristic`: The characteristic whose value changed.

## Mentioned in

Testing your app with the HomeKit Accessory Simulator

## Discussion

Discussion This method is called as a result of a change in value initiated by the accessory. Programmatic changes initiated by the app do not result in this method being called.

## See Also

### Observing accessories

- [accessoryDidUpdateName(_:)](homekit/hmaccessorydelegate/accessorydidupdatename(_:).md)
- [accessoryDidUpdateReachability(_:)](homekit/hmaccessorydelegate/accessorydidupdatereachability(_:).md)
- [accessoryDidUpdateServices(_:)](homekit/hmaccessorydelegate/accessorydidupdateservices(_:).md)
- [accessory(_:didUpdateNameFor:)](homekit/hmaccessorydelegate/accessory(_:didupdatenamefor:).md)
- [accessory(_:didUpdateAssociatedServiceTypeFor:)](homekit/hmaccessorydelegate/accessory(_:didupdateassociatedservicetypefor:).md)
- [accessory(_:didAdd:)](homekit/hmaccessorydelegate/accessory(_:didadd:).md)
- [accessory(_:didRemove:)](homekit/hmaccessorydelegate/accessory(_:didremove:).md)
- [accessory(_:didUpdateFirmwareVersion:)](homekit/hmaccessorydelegate/accessory(_:didupdatefirmwareversion:).md)
