Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
0846a72931 | |||
f1d1da0945 | |||
76438d6811 | |||
7971fd3ec1 | |||
3fe902c50b | |||
52a259dafd |
59
.drone.yml
59
.drone.yml
@ -5,6 +5,9 @@ name: default
|
|||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
|
node:
|
||||||
|
lan: internal
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
@ -66,6 +69,62 @@ steps:
|
|||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
|
- name: remove old package
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
environment:
|
||||||
|
SSH_USER:
|
||||||
|
from_secret: ssh_user
|
||||||
|
settings:
|
||||||
|
host: homebridge.me
|
||||||
|
envs:
|
||||||
|
- SSH_USER
|
||||||
|
username:
|
||||||
|
from_secret: ssh_user
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- rm -r /home/$SSH_USER/.npm-global/lib/node_modules/@watsonb8/homebridge-harmony-control
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: homebridge.me
|
||||||
|
username:
|
||||||
|
from_secret: ssh_user
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- npm install -g @watsonb8/homebridge-harmony-control --registry http://10.44.1.6:4873
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
- name: restart homebridge
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: homebridge.me
|
||||||
|
username:
|
||||||
|
from_secret: elevated_ssh_user
|
||||||
|
key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- systemctl restart homebridge
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
- name: Notify
|
- name: Notify
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
settings:
|
settings:
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@watsonb8/homebridge-harmony-control",
|
"name": "@watsonb8/homebridge-harmony-control",
|
||||||
"version": "1.2.1",
|
"version": "1.2.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@watsonb8/homebridge-harmony-control",
|
"name": "@watsonb8/homebridge-harmony-control",
|
||||||
"version": "1.2.1",
|
"version": "1.2.3",
|
||||||
"description": "Homebridge platform to control smart home equipment by room.",
|
"description": "Homebridge platform to control smart home equipment by room.",
|
||||||
"main": "bin/index.js",
|
"main": "bin/index.js",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -117,7 +117,7 @@ export class ActivityService {
|
|||||||
let currentOtherState: IActivityState =
|
let currentOtherState: IActivityState =
|
||||||
this._stateDataProvider.states[controlUnitKey]!;
|
this._stateDataProvider.states[controlUnitKey]!;
|
||||||
|
|
||||||
if (!currentOtherState) {
|
if (!currentOtherState || !currentOtherState.currentActivity) {
|
||||||
return devicesToTurnOn;
|
return devicesToTurnOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user