Skip to content

Commit

Permalink
preven name clobber (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumer committed Dec 20, 2023
1 parent f63e8b2 commit 7ee6772
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default class TPLSmartDevice {
}

// Set the name of lightbulb
async name (newAlias) {
async setName (newAlias) {
const info = await this.info()
return typeof info.dev_name !== 'undefined'
? this.send({ system: { set_dev_alias: { alias: newAlias } } })
Expand Down
2 changes: 1 addition & 1 deletion src/test.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import TPLSmartDevice from './index.js'

// get a number of real devices to test
async function getNLights (n = 3, timeout=3000) {
async function getNLights (n = 1, timeout=3000) {
return new Promise((resolve, reject) => {
const scan = TPLSmartDevice.scan()
const testLights = []
Expand Down
2 changes: 1 addition & 1 deletion src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('TPLSmartDevice', () => {
expect(1 + 1).toBe(2)
})

it('should be able to encryt', () => {
it('should be able to encrypt', () => {
expect(TPLSmartDevice.encrypt(Buffer.from('hello world')).toString('hex')).toBe('c3a6caa6c9e99ef183ef8b')
})

Expand Down

0 comments on commit 7ee6772

Please sign in to comment.