Skip to content

Commit

Permalink
Initial working version
Browse files Browse the repository at this point in the history
  • Loading branch information
loa committed Sep 21, 2024
1 parent edd00a3 commit 1177809
Show file tree
Hide file tree
Showing 9 changed files with 239 additions and 224 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.rulers": [140],
"eslint.enable": true
Expand Down
15 changes: 13 additions & 2 deletions config.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"pluginAlias": "ExampleHomebridgePlugin",
"pluginAlias": "GaroSerialweb",
"pluginType": "platform",
"singular": true,
"schema": {
Expand All @@ -9,7 +9,18 @@
"title": "Name",
"type": "string",
"required": true,
"default": "Example Dynamic Platform"
"default": "GaroSerialweb"
},
"devices": {
"title": "Garo Wifi Modules",
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {"title": "address", "type": "string"}
},
"required": ["address"]
}
}
}
}
Expand Down
95 changes: 91 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"name": "homebridge-plugin-name",
"displayName": "Plugin Name",
"name": "homebridge-garo-serialweb",
"displayName": "Garo Serialweb",
"type": "module",
"version": "1.0.0",
"private": true,
"description": "A short description about what your plugin does.",
"author": "Your Name",
"version": "0.1.0",
"description": "Homebridge plugin to control local Garo charge boxes with serialweb.",
"author": "Carl Loa Odin",
"license": "Apache-2.0",
"homepage": "https://github.com/USERNAME/GITHUB_PROJECT_NAME#readme",
"homepage": "https://github.com/loa/homebridge-garo-serialweb#readme",
"repository": {
"type": "git",
"url": "https://github.com/USERNAME/GITHUB_PROJECT_NAME.git"
"url": "https://github.com/loa/homebridge-garo-serialweb.git"
},
"bugs": {
"url": "https://github.com/USERNAME/GITHUB_PROJECT_NAME/issues"
"url": "https://github.com/loa/homebridge-garo-serialweb/issues"
},
"keywords": [
"homebridge-plugin"
Expand All @@ -40,5 +39,8 @@
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.1"
},
"dependencies": {
"node-fetch": "^3.3.2"
}
}
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { API } from 'homebridge';
import type { API } from "homebridge";

Check failure on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Strings must use singlequote

Check failure on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Strings must use singlequote

Check failure on line 1 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Strings must use singlequote

import { ExampleHomebridgePlatform } from './platform.js';
import { PLATFORM_NAME } from './settings.js';
import { GaroPlatform } from "./platform.js";

Check failure on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Strings must use singlequote

Check failure on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Strings must use singlequote

Check failure on line 3 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Strings must use singlequote
import { PLATFORM_NAME } from "./settings.js";

Check failure on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Strings must use singlequote

Check failure on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Strings must use singlequote

Check failure on line 4 in src/index.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Strings must use singlequote

/**
* This method registers the platform with Homebridge
*/
export default (api: API) => {
api.registerPlatform(PLATFORM_NAME, ExampleHomebridgePlatform);
api.registerPlatform(PLATFORM_NAME, GaroPlatform);
};
Loading

0 comments on commit 1177809

Please sign in to comment.