Stability fixes
All checks were successful
continuous-integration/drone/push Build is passing

Updating longitude type
This commit is contained in:
Brandon Watson 2022-09-13 10:12:34 -05:00
parent abb66eb26f
commit e35a206a59
4 changed files with 17 additions and 12 deletions

View File

@ -32,7 +32,7 @@
},
"longitude": {
"title": "Longitude",
"type": "string",
"type": "number",
"required": true
},
"hueLights": {

14
package-lock.json generated
View File

@ -11,7 +11,7 @@
"dependencies": {
"@types/node-cron": "^2.0.3",
"@types/suncalc": "^1.8.0",
"@watsonb8/wiz-lib": "^1.0.1-62427.0",
"@watsonb8/wiz-lib": "^1.0.1-e1c84.0",
"node-cron": "^2.0.3",
"node-hue-api": "^4.0.5",
"suncalc": "^1.8.0"
@ -119,9 +119,9 @@
"integrity": "sha512-XLD/llTSB6EBe3thkN+/I0L+yCTB6sjrcVovQdx2Cnl6N6bTzHmwe/J8mWnsXFgxLrj/emzdv8IR4evKYG2qxQ=="
},
"node_modules/@watsonb8/wiz-lib": {
"version": "1.0.1-18e79.0",
"resolved": "http://10.44.1.6:4873/@watsonb8%2fwiz-lib/-/wiz-lib-1.0.1-18e79.0.tgz",
"integrity": "sha1-zJ6sEawCthW3Z9a02dEXFjnrOoo=",
"version": "1.0.1-e1c84.0",
"resolved": "http://10.44.1.6:4873/@watsonb8%2fwiz-lib/-/wiz-lib-1.0.1-e1c84.0.tgz",
"integrity": "sha1-3dEF3v2j/oS7ezEBGCfq8wIhBng=",
"dependencies": {
"dgram": "^1.0.1",
"getmac": "^5.20.0",
@ -1967,9 +1967,9 @@
"integrity": "sha512-XLD/llTSB6EBe3thkN+/I0L+yCTB6sjrcVovQdx2Cnl6N6bTzHmwe/J8mWnsXFgxLrj/emzdv8IR4evKYG2qxQ=="
},
"@watsonb8/wiz-lib": {
"version": "1.0.1-18e79.0",
"resolved": "http://10.44.1.6:4873/@watsonb8%2fwiz-lib/-/wiz-lib-1.0.1-18e79.0.tgz",
"integrity": "sha1-zJ6sEawCthW3Z9a02dEXFjnrOoo=",
"version": "1.0.1-e1c84.0",
"resolved": "http://10.44.1.6:4873/@watsonb8%2fwiz-lib/-/wiz-lib-1.0.1-e1c84.0.tgz",
"integrity": "sha1-3dEF3v2j/oS7ezEBGCfq8wIhBng=",
"requires": {
"dgram": "^1.0.1",
"getmac": "^5.20.0",

View File

@ -34,7 +34,7 @@
"dependencies": {
"@types/node-cron": "^2.0.3",
"@types/suncalc": "^1.8.0",
"@watsonb8/wiz-lib": "^1.0.1-62427.0",
"@watsonb8/wiz-lib": "^1.0.1-e1c84.0",
"node-cron": "^2.0.3",
"node-hue-api": "^4.0.5",
"suncalc": "^1.8.0"
@ -44,4 +44,4 @@
"homebridge": "^1.5.0",
"typescript": "^4.5.4"
}
}
}

View File

@ -237,7 +237,7 @@ export class FluxAccessory {
const sunsetColorTemp = this._config.sunsetColorTemp ?? 2800;
const floorColorTemp = this._config.floorColorTemp ?? 1900;
let newTemp = 0;
let newTemp = this._config.ceilingColorTemp;
if (start < now && now < sunsetStart) {
newTemp = this.getTempOffset(
@ -314,7 +314,12 @@ export class FluxAccessory {
}
private updateWizLight = async (wizBulb: WizBulb): Promise<void> => {
const pilot = await wizBulb.get();
let pilot;
try {
pilot = await wizBulb.get();
} catch (err: any) {
this._platform.log.error(err.message);
}
this._platform.log.info(`Adjusting wiz bulb: ${wizBulb.getMac()}`);
wizBulb.set(this._wizRGB, pilot?.state ? pilot.dimming : 0, this._fade);
};