From 5d893f06d3103f64d858ae08d515d92101e6ed47 Mon Sep 17 00:00:00 2001 From: Russell Stephens Date: Tue, 8 Oct 2024 13:44:01 -0400 Subject: [PATCH 1/3] make name field required --- config.schema.json | 2 +- src/subaruHomebridgePlatform.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.schema.json b/config.schema.json index e8cfd2c..7238949 100644 --- a/config.schema.json +++ b/config.schema.json @@ -8,7 +8,7 @@ "name": { "title": "name", "type": "string", - "required": false, + "required": true, "default": "Car Lock" }, "username": { diff --git a/src/subaruHomebridgePlatform.ts b/src/subaruHomebridgePlatform.ts index 58a376a..4fa4007 100644 --- a/src/subaruHomebridgePlatform.ts +++ b/src/subaruHomebridgePlatform.ts @@ -27,6 +27,10 @@ export class SubaruHomebridgePlatform implements DynamicPlatformPlugin { this.Service = api.hap.Service; this.Characteristic = api.hap.Characteristic; + if (!config.name) { + this.log.error('Missing required config value: name'); + } + if (!config.username) { this.log.error('Missing required config value: username'); } @@ -83,7 +87,7 @@ export class SubaruHomebridgePlatform implements DynamicPlatformPlugin { const existingAccessory = this.accessories.find(accessory => accessory.UUID === uuid); - const deviceName = this.config.name || 'Subaru Door Lock'; + const deviceName = this.config.name || ''; const device = { name: deviceName, From 0c7cf16ec9c6d000eba9aacb43e8708b72a94194 Mon Sep 17 00:00:00 2001 From: Russell Stephens Date: Tue, 8 Oct 2024 13:45:22 -0400 Subject: [PATCH 2/3] add more keywords --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 98ab640..01a96aa 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,10 @@ "keywords": [ "homebridge-plugin", "subaru", - "starlink" + "starlink", + "homebridge plugin", + "homebridge subaru", + "homebridge subaru starlink" ], "main": "dist/index.js", "engines": { From 7add37209ed60d1d9b79b1a518249be60c490858 Mon Sep 17 00:00:00 2001 From: Russell Stephens Date: Tue, 8 Oct 2024 13:45:42 -0400 Subject: [PATCH 3/3] 0.1.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2024b52..79e620f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "homebridge-subaru", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "homebridge-subaru", - "version": "0.1.1", + "version": "0.1.2", "license": "Apache-2.0", "dependencies": { "axios": "~1.7.7", diff --git a/package.json b/package.json index 01a96aa..74b7ee1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "homebridge-subaru", "displayName": "Homebridge Subaru", "type": "module", - "version": "0.1.1", + "version": "0.1.2", "description": "Exposes basic starlink funcationality to homekit", "author": "Russell Stephens", "license": "Apache-2.0",