diff --git a/src/wedo2smarthub.ts b/src/wedo2smarthub.ts index 143c6cf..d1d6965 100644 --- a/src/wedo2smarthub.ts +++ b/src/wedo2smarthub.ts @@ -315,7 +315,7 @@ export class WeDo2SmartHub extends Hub { const keys = Object.keys(Consts.BLECharacteristic); for (let i = 0; i < keys.length; i++) { const key = keys[i]; - if (Consts.BLECharacteristic[key as any] === uuid) { + if (Consts.BLECharacteristic[key as keyof typeof Consts.BLECharacteristic] === uuid) { return key; } }