Skip to content

Commit

Permalink
fixed typing and documentation for rename light function
Browse files Browse the repository at this point in the history
  • Loading branch information
blockiindahood committed Nov 2, 2024
1 parent 081da83 commit 2a823b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/lights.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ A complete code sample for this function is available [here](../examples/v3/ligh

## renameLight()

The `renameLight(id, name)` function allows you to rename the light identified by the `id` to the specified `name` value.
The `renameLight(light)` function allows you to rename the light identified by its object.

```js
api.lights.renameLight(id, 'my_new_name')
api.lights.renameLight(light)
.then(result => {
console.log(`Successfully reanmed light? ${result}`);
});
Expand Down
2 changes: 1 addition & 1 deletion src/api/Lights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class Lights extends ApiDefinition {
/**
* Renames a Light on the Bridge to the specified name in the Light instance.
*/
renameLight(light: Lights): Promise<boolean> {
renameLight(light: LightsType): Promise<boolean> {
return this.execute(lightsApi.setLightAttributes, {id: light, light: light});
}

Expand Down

0 comments on commit 2a823b3

Please sign in to comment.