mirror of
https://github.com/dtwardow/homebridge-multi-tap-switch.git
synced 2026-11-02 05:18:30 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2181b42bba | ||
|
|
9252c24440 | ||
|
|
4f453d8a76 | ||
|
|
d062bb7bb0 | ||
|
|
1082b0fc67 | ||
|
|
1676ae90ae | ||
|
|
47e49b9e67 | ||
|
|
035a28c37b | ||
|
|
6e388601f8 |
No files matched your search
@@ -0,0 +1,18 @@
|
|||||||
|
name: Publish Package to npmjs
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# Setup .npmrc file to publish to npm
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '16.x'
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
# Ignore source code
|
# Ignore source code
|
||||||
src
|
src
|
||||||
|
|
||||||
|
# IDEA files
|
||||||
|
.idea
|
||||||
|
|
||||||
# ------------- Defaults ------------- #
|
# ------------- Defaults ------------- #
|
||||||
|
|
||||||
# gitHub actions
|
# gitHub actions
|
||||||
|
|||||||
+2
-7
@@ -10,14 +10,9 @@
|
|||||||
"title": "Platform Name",
|
"title": "Platform Name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
"minLength": 3,
|
||||||
"default": "MultiTapSwitch"
|
"default": "MultiTapSwitch"
|
||||||
},
|
},
|
||||||
"enabled": {
|
|
||||||
"title": "Enable",
|
|
||||||
"type": "boolean",
|
|
||||||
"required": true,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"devices": {
|
"devices": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@@ -53,7 +48,7 @@
|
|||||||
"resetAfterSwitchOff": {
|
"resetAfterSwitchOff": {
|
||||||
"title": "Reset when switch turned `Off`",
|
"title": "Reset when switch turned `Off`",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Reset the switch and trigger index, when the trigger switch is turned `Off` (independent from timeout)",
|
"description": "Reset the switch and trigger index, when the trigger switch is turned <code>Off</code> (independent from timeout)",
|
||||||
"required": true,
|
"required": true,
|
||||||
"default": false
|
"default": false
|
||||||
},
|
},
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "homebridge-multitap-switch",
|
"name": "homebridge-multitap-switch",
|
||||||
"version": "0.1.1",
|
"version": "0.1.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "homebridge-multitap-switch",
|
"name": "homebridge-multitap-switch",
|
||||||
"version": "0.1.1",
|
"version": "0.1.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.10.9",
|
"@types/node": "^16.10.9",
|
||||||
|
|||||||
+4
-4
@@ -2,15 +2,15 @@
|
|||||||
"private": false,
|
"private": false,
|
||||||
"displayName": "Homebridge Multi-Tap-Switch",
|
"displayName": "Homebridge Multi-Tap-Switch",
|
||||||
"name": "homebridge-multi-tap-switch",
|
"name": "homebridge-multi-tap-switch",
|
||||||
"version": "0.1.1",
|
"version": "0.1.6",
|
||||||
"description": "A configurable multi-tap switch for i.e. switching scenes",
|
"description": "A configurable multi-tap switch for i.e. switching scenes",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/dtwardow/homebridge-multitap-switch.git"
|
"url": "git+https://github.com/dtwardow/homebridge-multi-tap-switch.git"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/dtwardow/homebridge-multitap-switch/issues"
|
"url": "https://github.com/dtwardow/homebridge-multi-tap-switch/issues"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.18.1",
|
"node": ">=14.18.1",
|
||||||
@@ -37,6 +37,6 @@
|
|||||||
"ts-node": "^10.3.0",
|
"ts-node": "^10.3.0",
|
||||||
"typescript": "^4.4.4"
|
"typescript": "^4.4.4"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/dtwardow/homebridge-multitap-switch#readme",
|
"homepage": "https://github.com/dtwardow/homebridge-multi-tap-switch#readme",
|
||||||
"author": "Dennis Twardowsky <twardowsky@gmail.com>"
|
"author": "Dennis Twardowsky <twardowsky@gmail.com>"
|
||||||
}
|
}
|
||||||
@@ -21,8 +21,8 @@ export class Logging {
|
|||||||
|
|
||||||
log(...parts: any) {
|
log(...parts: any) {
|
||||||
this.isDebug ?
|
this.isDebug ?
|
||||||
this.logHandler.debug(this.msgPrefix(), ...parts) :
|
this.logHandler.info(this.msgPrefix(), ...parts) :
|
||||||
this.logHandler.info(this.msgPrefix(), ...parts);
|
this.logHandler.debug(this.msgPrefix(), ...parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
warn = (...parts: any) => this.logHandler.warn(this.msgPrefix(), ...parts);
|
warn = (...parts: any) => this.logHandler.warn(this.msgPrefix(), ...parts);
|
||||||
|
|||||||
+1
-1
@@ -83,7 +83,7 @@ export class MultiTapSwitchPlatform implements DynamicPlatformPlugin {
|
|||||||
// existingAccessory.context.device = device;
|
// existingAccessory.context.device = device;
|
||||||
// this.api.updatePlatformAccessories([existingAccessory]);
|
// this.api.updatePlatformAccessories([existingAccessory]);
|
||||||
if (existingAccessory.context.config !== device) {
|
if (existingAccessory.context.config !== device) {
|
||||||
this.log.info('Update Accessory ->', device.name);
|
this.log.debug('Update Accessory ->', device.name);
|
||||||
existingAccessory.context.config = device;
|
existingAccessory.context.config = device;
|
||||||
this.api.updatePlatformAccessories([existingAccessory]);
|
this.api.updatePlatformAccessories([existingAccessory]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user