diff --git a/package.json b/package.json index a162937..ff61f49 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "displayName": "Levoit Humidifiers", "main": "dist/index.js", "license": "Apache-2.0", - "version": "1.14.0", + "version": "1.14.1", "private": false, "bugs": { "url": "https://github.com/pschroeder89/homebridge-levoit-humidifiers/issues" diff --git a/src/api/VeSync.ts b/src/api/VeSync.ts index 527c8fd..586f16f 100644 --- a/src/api/VeSync.ts +++ b/src/api/VeSync.ts @@ -37,7 +37,7 @@ export default class VeSync { private readonly AXIOS_OPTIONS = { baseURL: 'https://smartapi.vesync.com', - timeout: this.config.options.apiTimeout || 15000, + timeout: this.config.options?.apiTimeout || 15000, }; constructor( @@ -114,7 +114,7 @@ export default class VeSync { this.log.error( 'VeSync cannot communicate with humidifier! Check the VeSync App.', ); - if (this.config.options.showOffWhenDisconnected) { + if (this.config.options?.showOffWhenDisconnected) { return false; } else { throw new Error( @@ -173,7 +173,7 @@ export default class VeSync { this.log.error( 'VeSync cannot communicate with humidifier! Check the VeSync App.', ); - if (this.config.options.showOffWhenDisconnected) { + if (this.config.options?.showOffWhenDisconnected) { return false; } else { throw new Error(