Skip to content

Commit

Permalink
adding in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed May 10, 2020
1 parent 2f559eb commit f64dca4
Show file tree
Hide file tree
Showing 9 changed files with 483 additions and 442 deletions.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"main": "dist/index.js",
"scripts": {
"lint": "eslint src/**",
"lint:fix": "eslint --fix src/**",
"watch": "npm run build && npm link && nodemon",
"build": "rimraf ./dist && tsc",
"prepublishOnly": "npm run lint && npm run build"
Expand Down
24 changes: 12 additions & 12 deletions src/Pressure.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import {Characteristic, Formats, Perms, Service} from 'homebridge'
import {Characteristic, Formats, Perms, Service} from 'homebridge';

export class Pressure extends Characteristic {

static readonly UUID: string = '2B411C00-E2E2-4B21-A665-7F079E525304';

constructor() {
super('kPA', Pressure.UUID);
this.setProps({
format: Formats.FLOAT,
maxValue: 100000,
minValue: 0,
minStep: 0.001,
perms: [Perms.PAIRED_READ, Perms.NOTIFY]
});
this.value = this.getDefaultValue();
super('kPA', Pressure.UUID);
this.setProps({
format: Formats.FLOAT,
maxValue: 100000,
minValue: 0,
minStep: 0.001,
perms: [Perms.PAIRED_READ, Perms.NOTIFY],
});
this.value = this.getDefaultValue();
}
}

export class PressureSensor extends Service {
static readonly UUID: string = '2B411C00-E2E2-4B21-A665-7F079E525404';

constructor() {
super('Pressure', PressureSensor.UUID);
super('Pressure', PressureSensor.UUID);

this.addCharacteristic(Pressure);
this.addCharacteristic(Pressure);
}
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import type { API } from 'homebridge';

import { PLATFORM_NAME } from './settings';
import { FlairPlatform } from './platform';
import "reflect-metadata";
import 'reflect-metadata';

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

0 comments on commit f64dca4

Please sign in to comment.