diff --git a/docs/lights.md b/docs/lights.md index 8e32c86..f1486a4 100644 --- a/docs/lights.md +++ b/docs/lights.md @@ -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}`); }); diff --git a/src/api/Lights.ts b/src/api/Lights.ts index 42eb7d9..18ed21f 100644 --- a/src/api/Lights.ts +++ b/src/api/Lights.ts @@ -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 { + renameLight(light: LightsType): Promise { return this.execute(lightsApi.setLightAttributes, {id: light, light: light}); }