diff --git a/src/shellies.ts b/src/shellies.ts index 2459ad7d..405f02e6 100644 --- a/src/shellies.ts +++ b/src/shellies.ts @@ -345,7 +345,7 @@ export class Shellies extends EventEmitter { const info = await rpcHandler.request('Shelly.GetDeviceInfo'); // make sure the returned device ID matches - if (info.id !== deviceId) { + if (info.id.toLowerCase() !== deviceId.toLowerCase()) { throw new Error(`Unexpected device ID (returned: ${info.id}, expected: ${deviceId})`); } @@ -392,4 +392,4 @@ export class Shellies extends EventEmitter { this.emit('error', deviceId, error); } } -} \ No newline at end of file +}