athombv / homey-web-api-issues

This issue tracker is for Homey Developers using the Web API.
4 stars 1 forks source link

`setValue` cannot apply to `CapabilityInstances` #23

Closed OlivierZal closed 1 year ago

OlivierZal commented 1 year ago

Web API documentation says that a CapabilityInstance is to switch on this way:

capabilityInstance.setValue(true).catch(this.error)

but errors are raised:

[err] 2023-01-19 23:45:54 [MELCloudApp] [HomeyAPIError: Une erreur inconnue s'est produite [not_setable]] {
  statusCode: 500,
  description: "Une erreur inconnue s'est produite [not_setable]"
}

or

[err] 2023-01-19 23:46:30 [MELCloudApp] [HomeyAPIError: not_setable] {
  statusCode: undefined,
  description: null
}
jeroenwienk commented 1 year ago

This is not a bug but you are trying to set a capability that is not setable.The error code is wrong though.

OlivierZal commented 1 year ago

Understood @jeroenwienk