Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed typing and documentation for rename light function #239

Open
wants to merge 3 commits into
base: typescript
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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