diff --git a/package-lock.json b/package-lock.json index 23e65039..8f5d7a4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "async-mqtt": "^2.6.3", "fakegato-history": "^0.6.5", "homebridge-lib": "^7.0.9", - "node-switchbot": "^3.1.2-beta.2", + "node-switchbot": "^3.1.2-beta.5", "rxjs": "^7.8.1" }, "devDependencies": { @@ -39,7 +39,7 @@ "eslint": "^9.13.0", "eslint-plugin-format": "^0.1.2", "homebridge": "^1.8.4", - "homebridge-config-ui-x": "4.61.0", + "homebridge-config-ui-x": "4.62.0", "nodemon": "^3.1.7", "npm-check-updates": "^17.1.4", "shx": "^0.3.4", @@ -1561,9 +1561,9 @@ } }, "node_modules/@nestjs/common": { - "version": "10.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.4.4.tgz", - "integrity": "sha512-0j2/zqRw9nvHV1GKTktER8B/hIC/Z8CYFjN/ZqUuvwayCH+jZZBhCR2oRyuvLTXdnlSmtCAg2xvQ0ULqQvzqhA==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.4.5.tgz", + "integrity": "sha512-N/yUyuYCBMb0+H6jHhntR7PURzji0usID/DByhOfooyk/aPGscI0aQKwOA6edlJlT92hHUvXYLJ5p3npj7KcjQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1598,9 +1598,9 @@ "license": "0BSD" }, "node_modules/@nestjs/core": { - "version": "10.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.4.4.tgz", - "integrity": "sha512-y9tjmAzU6LTh1cC/lWrRsCcOd80khSR0qAHAqwY2svbW+AhsR/XCzgpZrAAKJrm/dDfjLCZKyxJSayeirGcW5Q==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.4.5.tgz", + "integrity": "sha512-wk0KJ+6tuidqAdeemsQ40BCp1BgMsSuSLG577aqXLxXYoa8FQYPrdxoSzd05znYLwJYM55fisZWb3FLF9HT2qw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1690,9 +1690,9 @@ } }, "node_modules/@nestjs/platform-fastify": { - "version": "10.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-10.4.4.tgz", - "integrity": "sha512-3fRt9mhhqe7aS1kF9myAFSUazhW88yrq9w3LrdHbjOTkGh8ZiZckjzKL705xORVJw2d/BHkgP8AqoNthakLJeQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/@nestjs/platform-fastify/-/platform-fastify-10.4.5.tgz", + "integrity": "sha512-5kcLsloaKkG6i46qbHmz6m/XoEtwroBni3uwsNENw4OJ8fptllihOqG3PWKRfljfpH4twyKdtZfKvyjMHXNj4w==", "dev": true, "license": "MIT", "dependencies": { @@ -1700,7 +1700,7 @@ "@fastify/formbody": "7.4.0", "@fastify/middie": "8.3.3", "fastify": "4.28.1", - "light-my-request": "6.0.0", + "light-my-request": "6.1.0", "path-to-regexp": "3.3.0", "tslib": "2.7.0" }, @@ -1731,9 +1731,9 @@ "license": "0BSD" }, "node_modules/@nestjs/platform-socket.io": { - "version": "10.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-10.4.4.tgz", - "integrity": "sha512-5GEYUA3sNbX2jOBP6FmrIK/zv9VCdvpdr4Sef1OKvt1U0qsV1YgmWPWDPumZM77n5DI0VHSJPyo7yjZaEKWOiQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-10.4.5.tgz", + "integrity": "sha512-dHkHJQArhrpkX6qBdTW2ghuja3i3cCslwy4QHY6d46u+9UyANQlsNK9wt/lZnmXfCMaci8xAJvUpyODa6YtV7g==", "dev": true, "license": "MIT", "dependencies": { @@ -1792,9 +1792,9 @@ } }, "node_modules/@nestjs/websockets": { - "version": "10.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-10.4.4.tgz", - "integrity": "sha512-ZHnak04i/iKBS0csjJa7K6D6xdsB0Yz6duJuCR7xGLItchFK+Ne21m9rEF8ffvW74U7UAYkQHBgD5242LBBYiQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-10.4.5.tgz", + "integrity": "sha512-LbL/HRLWQUBTUPY7swojOHdvokyVGINIiuP/VmRdhob4T751r+9i09z2RqRpP71psuom9mnRHYI1+vT2FABrAw==", "dev": true, "license": "MIT", "dependencies": { @@ -4300,9 +4300,9 @@ } }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "license": "MIT", "engines": { @@ -6032,16 +6032,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fastify/node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fastify/node_modules/light-my-request": { "version": "5.14.0", "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-5.14.0.tgz", @@ -6826,9 +6816,9 @@ } }, "node_modules/homebridge-config-ui-x": { - "version": "4.61.0", - "resolved": "https://registry.npmjs.org/homebridge-config-ui-x/-/homebridge-config-ui-x-4.61.0.tgz", - "integrity": "sha512-jmilxafuUxwA7Wm1jJ02zAjNQb1anz2668p63ZpBHahbHYg8kT1sIKLIb53FmlTzVrf+CCoJzXo4EJ2UUqNn0Q==", + "version": "4.62.0", + "resolved": "https://registry.npmjs.org/homebridge-config-ui-x/-/homebridge-config-ui-x-4.62.0.tgz", + "integrity": "sha512-f1k7m90EqGUnHPN8Jo3UhXlVEMN2brJJO8KkysxTU8Wk9qwO2VmE957JJ0LWflQRlgJCMn/iaDW5zt5bR3dkWg==", "dev": true, "funding": [ { @@ -6848,14 +6838,14 @@ "@homebridge/hap-client": "1.10.2", "@homebridge/node-pty-prebuilt-multiarch": "0.11.14", "@nestjs/axios": "3.0.3", - "@nestjs/common": "10.4.4", - "@nestjs/core": "10.4.4", + "@nestjs/common": "10.4.5", + "@nestjs/core": "10.4.5", "@nestjs/jwt": "10.2.0", "@nestjs/passport": "10.0.3", - "@nestjs/platform-fastify": "10.4.4", - "@nestjs/platform-socket.io": "10.4.4", + "@nestjs/platform-fastify": "10.4.5", + "@nestjs/platform-socket.io": "10.4.5", "@nestjs/swagger": "7.4.2", - "@nestjs/websockets": "10.4.4", + "@nestjs/websockets": "10.4.5", "axios": "1.7.7", "bash-color": "0.0.4", "buffer-shims": "1.0.0", @@ -7918,13 +7908,13 @@ "license": "MIT" }, "node_modules/light-my-request": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-6.0.0.tgz", - "integrity": "sha512-kFkFXrmKCL0EEeOmJybMH5amWFd+AFvlvMlvFTRxCUwbhfapZqDmeLMPoWihntnYY6JpoQDE9k+vOzObF1fDqg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-6.1.0.tgz", + "integrity": "sha512-+NFuhlOGoEwxeQfJ/pobkVFxcnKyDtiX847hLjuB/IzBxIl3q4VJeFI8uRCgb3AlTWL1lgOr+u5+8QdUcr33ng==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "cookie": "^0.6.0", + "cookie": "^0.7.0", "process-warning": "^4.0.0", "set-cookie-parser": "^2.6.0" } @@ -9483,9 +9473,9 @@ } }, "node_modules/node-switchbot": { - "version": "3.1.2-beta.2", - "resolved": "https://registry.npmjs.org/node-switchbot/-/node-switchbot-3.1.2-beta.2.tgz", - "integrity": "sha512-tQtZQLIJiJBMlnhDI8RiermcWOORiSZ3CKO46lnKT1ykM+v9otpdzy8yrwwFR88covNEcpYGQY33y5yCudh2Xw==", + "version": "3.1.2-beta.5", + "resolved": "https://registry.npmjs.org/node-switchbot/-/node-switchbot-3.1.2-beta.5.tgz", + "integrity": "sha512-bzXZebDsH1D/k7vW2IZPxoQgzPY6ipy+TLPWZN/n9WnhdyWkDjHZpoJavJuUb9YJIGRO6jvEY9SNER1TLyuUtQ==", "license": "MIT", "dependencies": { "@stoprocent/noble": "^1.15.1", @@ -11216,9 +11206,9 @@ "optional": true }, "node_modules/set-cookie-parser": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.0.tgz", - "integrity": "sha512-lXLOiqpkUumhRdFF3k1osNXCy9akgx/dyPZ5p8qAg9seJzXr5ZrlqZuWIMuY6ejOsVLE6flJ5/h3lsn57fQ/PQ==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index ff2c30ea..d0b92c87 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "async-mqtt": "^2.6.3", "fakegato-history": "^0.6.5", "homebridge-lib": "^7.0.9", - "node-switchbot": "^3.1.2-beta.2", + "node-switchbot": "^3.1.2-beta.5", "rxjs": "^7.8.1" }, "devDependencies": { @@ -97,7 +97,7 @@ "eslint": "^9.13.0", "eslint-plugin-format": "^0.1.2", "homebridge": "^1.8.4", - "homebridge-config-ui-x": "4.61.0", + "homebridge-config-ui-x": "4.62.0", "nodemon": "^3.1.7", "npm-check-updates": "^17.1.4", "shx": "^0.3.4", diff --git a/src/device/motion.ts b/src/device/motion.ts index ae8900da..06fcd560 100644 --- a/src/device/motion.ts +++ b/src/device/motion.ts @@ -120,9 +120,7 @@ export class Motion extends deviceBase { accessory.context.LightSensor = this.LightSensor as object // Initialize LightSensor Characteristics - this.LightSensor.Service.setCharacteristic(this.hap.Characteristic.Name, this.LightSensor.Name).setCharacteristic(this.hap.Characteristic.StatusActive, true).getCharacteristic(this.hap.Characteristic.CurrentAmbientLightLevel).onGet(() => { - return this.LightSensor!.CurrentAmbientLightLevel - }) + this.LightSensor.Service.setCharacteristic(this.hap.Characteristic.Name, this.LightSensor.Name).setCharacteristic(this.hap.Characteristic.StatusActive, true) }; // Retrieve initial values and updateHomekit