homebridge-dummy 1.1.0-alpha.0 → 1.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -17
- package/README.md +45 -10
- package/config.schema.json +149 -69
- package/dist/accessory/base.d.ts +3 -2
- package/dist/accessory/base.js +12 -16
- package/dist/accessory/base.js.map +1 -1
- package/dist/accessory/lock.d.ts +2 -1
- package/dist/accessory/lock.js +12 -5
- package/dist/accessory/lock.js.map +1 -1
- package/dist/accessory/onoff/onoff.d.ts +2 -1
- package/dist/accessory/onoff/onoff.js +10 -3
- package/dist/accessory/onoff/onoff.js.map +1 -1
- package/dist/accessory/position/position.d.ts +2 -1
- package/dist/accessory/position/position.js +11 -4
- package/dist/accessory/position/position.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +17 -15
- package/dist/homebridge-ui/public/ui.js +1 -1
- package/dist/i18n/en.d.ts +14 -1
- package/dist/i18n/en.js +57 -44
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/i18n.d.ts +14 -1
- package/dist/i18n/template.d.ts +14 -1
- package/dist/i18n/zz.d.ts +14 -1
- package/dist/model/timer.d.ts +8 -4
- package/dist/model/timer.js +27 -24
- package/dist/model/timer.js.map +1 -1
- package/dist/model/trigger.d.ts +14 -0
- package/dist/model/trigger.js +73 -0
- package/dist/model/trigger.js.map +1 -0
- package/dist/model/types.d.ts +12 -0
- package/dist/model/types.js +5 -0
- package/dist/model/types.js.map +1 -1
- package/dist/tools/configMigration.js +1 -1
- package/dist/tools/time.d.ts +5 -0
- package/dist/tools/time.js +15 -0
- package/dist/tools/time.js.map +1 -0
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onoff.js","sourceRoot":"","sources":["../../../src/accessory/onoff/onoff.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,eAAe,EA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,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9E,CAAC;IAEQ,KAAK,CAAC,OAAO;QACpB,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;IAEQ,KAAK,CAAC,KAAK;QAClB,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAES,UAAU,CAAC,KAA0B;QAC7C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClH,CAAC;CACF"}
|
|
@@ -10,6 +10,7 @@ export declare abstract class PositionAccessory<C extends PositionConfig = Posit
|
|
|
10
10
|
protected getState(): Promise<CharacteristicValue>;
|
|
11
11
|
protected getPosition(): Promise<CharacteristicValue>;
|
|
12
12
|
protected setPosition(value: CharacteristicValue): Promise<void>;
|
|
13
|
-
|
|
13
|
+
trigger(): Promise<void>;
|
|
14
|
+
reset(): Promise<void>;
|
|
14
15
|
protected logPosition(value: CharacteristicValue): void;
|
|
15
16
|
}
|
|
@@ -51,7 +51,7 @@ export class PositionAccessory extends DummyAccessory {
|
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
if (this.position !== this.defaultPosition) {
|
|
54
|
-
this.startTimer(
|
|
54
|
+
this.startTimer();
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
57
|
this.cancelTimer();
|
|
@@ -60,9 +60,16 @@ export class PositionAccessory extends DummyAccessory {
|
|
|
60
60
|
this.accessoryService.updateCharacteristic(this.Characteristic.TargetPosition, this.position);
|
|
61
61
|
this.accessoryService.updateCharacteristic(this.Characteristic.CurrentPosition, this.position);
|
|
62
62
|
}
|
|
63
|
-
async
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
async trigger() {
|
|
64
|
+
if (this.position === this.defaultPosition) {
|
|
65
|
+
const opposite = this.position === POSITION_CLOSED ? POSITION_OPEN : POSITION_CLOSED;
|
|
66
|
+
await this.setPosition(opposite);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async reset() {
|
|
70
|
+
if (this.position !== this.defaultPosition) {
|
|
71
|
+
await this.setPosition(this.defaultPosition);
|
|
72
|
+
}
|
|
66
73
|
}
|
|
67
74
|
logPosition(value) {
|
|
68
75
|
const message = value === POSITION_CLOSED ? strings.accessory.position.closed : strings.accessory.position.open;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.js","sourceRoot":"","sources":["../../../src/accessory/position/position.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAsB,eAAe,EAA+B,MAAM,sBAAsB,CAAC;AAGxG,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,CAAC,CAAC;AAE1B,MAAM,OAAgB,iBAA6D,SAAQ,cAA8B;IAE/G,QAAQ,CAAsB;IAEtC,YACE,OAAoB,EACpB,cAAkC,EAClC,SAA4B,EAC5B,MAAS,EACT,GAAQ,EACR,WAAmB,EACnB,SAAkB;QAElB,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,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AAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC;QAChH,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
}
|
|
6
6
|
</style>
|
|
7
7
|
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
<div id="header">
|
|
9
|
+
<p class="text-center">
|
|
10
|
+
<img
|
|
11
|
+
src="https://github.com/mpatfield/homebridge-dummy/blob/latest/img/banner.png?raw=true"
|
|
12
|
+
alt="Homebridge Dummy"
|
|
13
|
+
style="width: 60%;"
|
|
14
|
+
/>
|
|
15
|
+
</p>
|
|
16
|
+
</div>
|
|
15
17
|
|
|
16
18
|
<div id="support" class="text-center" style="display: none;">
|
|
17
19
|
<p i18n="support" i18n_replace="github"></p>
|
|
@@ -20,25 +22,25 @@
|
|
|
20
22
|
<div id="intro" class="text-center" style="display: none;">
|
|
21
23
|
<p class="lead" i18n="thankYou" i18n_replace="dummy"></p></br>
|
|
22
24
|
<p class="lead" i18n="migrate"></p></br>
|
|
23
|
-
<button type="button" class="btn btn-
|
|
24
|
-
<button type="button" class="btn btn-
|
|
25
|
+
<button type="button" class="btn btn-secondary" id="showSettings" i18n="no"></button>
|
|
26
|
+
<button type="button" class="btn btn-secondary" id="showMigration" i18n="yes"></button>
|
|
25
27
|
</div>
|
|
26
28
|
|
|
27
29
|
<div id="migration" class="text-center" style="display: none;">
|
|
28
|
-
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/
|
|
30
|
+
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Achtung.svg/330px-Achtung.svg.png" width="100px"/>
|
|
29
31
|
</br></br>
|
|
30
|
-
<
|
|
32
|
+
<h5><p class="text-danger" i18n="migrationDetails1" i18n_replace="dummy"></p></h5>
|
|
31
33
|
<p class="lead" i18n="migrationDetails2"></p>
|
|
32
|
-
<br/>
|
|
33
34
|
<hr/>
|
|
34
35
|
<br/>
|
|
35
36
|
<p class="lead" i18n="migrationDetails3" i18n_replace="dummy"></p>
|
|
37
|
+
<br/>
|
|
36
38
|
<p class="lead" i18n="migrationDetails4"></p>
|
|
37
39
|
<br/>
|
|
38
|
-
<button type="button" class="btn btn-
|
|
39
|
-
<button type="button" class="btn btn-
|
|
40
|
+
<button type="button" class="btn btn-secondary" id="skipMigration" i18n="no"></button>
|
|
41
|
+
<button type="button" class="btn btn-secondary" id="doMigration" i18n="yes"></button>
|
|
40
42
|
</br></br></br>
|
|
41
43
|
<em><p i18n="migrationDetails5" i18n_replace="migration"></p></em></br>
|
|
42
44
|
</div>
|
|
43
45
|
|
|
44
|
-
<script src="ui.js?v=1.1.0-
|
|
46
|
+
<script src="ui.js?v=1.1.0-beta.1"></script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var r="Homebridge Dummy";var
|
|
1
|
+
"use strict";(()=>{var r="Homebridge Dummy";var l={github:'<a target="_blank" href="https://github.com/mpatfield/homebridge-dummy/">GitHub</a>',migration:'<a target="_blank" href="https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#v10-migration">GitHub</a>',dummy:r},g=e=>{document.querySelectorAll("[i18n]").forEach(t=>{let o=t.getAttribute("i18n"),i=e.config[o],n=t.getAttribute("i18n_replace");n&&(i=i.replace("%s",l[n])),t.innerHTML=i})},u=e=>{let t=["span","label","legend","option","p"];Array.from(window.parent.document.querySelectorAll(t.join(","))).sort((i,n)=>t.indexOf(i.tagName.toLowerCase())-t.indexOf(n.tagName.toLowerCase())).forEach(i=>{let n=i.innerHTML;n=n.replaceAll(/\$\{config\.(title|description|enumNames)\.([^}]+)\}/g,(m,a,d)=>e.config[a]&&typeof e.config[a]=="object"&&d in e.config[a]?e.config[a][d]:m),i.innerHTML!==n&&(i.innerHTML=n)})},c=e=>{let t=Array.from(window.parent.document.querySelectorAll("fieldset legend"));for(let o of t){let n=o.closest("fieldset")?.querySelector('input[type="text"][name="name"]');n&&o.textContent!==(n.value||e.config.title.accessory)&&(o.textContent=n.value!==""?n.value:e.config.title.accessory),n&&!n.dataset.accessoryNameListener&&(n.addEventListener("input",()=>c(e)),n.dataset.accessoryNameListener="true")}};function x(){if(typeof crypto<"u"){if(crypto.randomUUID)return crypto.randomUUID();if(crypto.getRandomValues)return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=crypto.getRandomValues(new Uint8Array(1))[0]&15;return(e==="x"?t:t&3|8).toString(16)})}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var f=e=>{let t=!1;e.accessories?.forEach(o=>{if(o.id===void 0){let i=x();o.id=i,t=!0}}),t&&homebridge.updatePluginConfig([e])},s=e=>{document.getElementById("intro").style.display="none",document.getElementById("migration").style.display="none",document.getElementById("support").style.display="block",new MutationObserver(()=>{u(e),c(e)}).observe(window.parent.document.body,{childList:!0,subtree:!0}),homebridge.showSchemaForm(),homebridge.addEventListener("configChanged",o=>{let i=o.data;i.length&&f(i[0])}),homebridge.enableSaveButton(),homebridge.hideSpinner()},y=e=>{document.getElementById("header").style.display="none",document.getElementById("intro").style.display="none",document.getElementById("migration").style.display="block",document.getElementById("skipMigration").addEventListener("click",async()=>{await homebridge.updatePluginConfig([{name:r}]),await homebridge.savePluginConfig(),s(e)}),document.getElementById("doMigration").addEventListener("click",async()=>{await homebridge.updatePluginConfig([{name:r,migrationNeeded:!0}]),await homebridge.savePluginConfig(),homebridge.closeSettings(),homebridge.toast.info(e.config.migrationRestartDescription.replace("%s",r),e.config.migrationRestartTitle)})},p=e=>{homebridge.disableSaveButton(),document.getElementById("showSettings").addEventListener("click",async()=>{await homebridge.updatePluginConfig([{name:r}]),s(e)}),document.getElementById("showMigration").addEventListener("click",()=>{y(e)}),document.getElementById("intro").style.display="block",homebridge.hideSpinner()};(async()=>{homebridge.showSpinner();let e=await homebridge.i18nCurrentLang(),t=await homebridge.request("i18n",e);g(t),(await homebridge.getPluginConfig()).length?s(t):p(t)})();})();
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const en: {
|
|
2
2
|
accessory: {
|
|
3
|
+
invalidCron: string;
|
|
3
4
|
missingRequired: string;
|
|
4
5
|
command: {
|
|
5
6
|
executed: string;
|
|
@@ -28,6 +29,12 @@ declare const en: {
|
|
|
28
29
|
setMinutes: string;
|
|
29
30
|
setHours: string;
|
|
30
31
|
};
|
|
32
|
+
trigger: {
|
|
33
|
+
cron: string;
|
|
34
|
+
intervalSeconds: string;
|
|
35
|
+
intervalMinutes: string;
|
|
36
|
+
intervalHours: string;
|
|
37
|
+
};
|
|
31
38
|
};
|
|
32
39
|
config: {
|
|
33
40
|
migrate: string;
|
|
@@ -44,16 +51,20 @@ declare const en: {
|
|
|
44
51
|
no: string;
|
|
45
52
|
description: {
|
|
46
53
|
commands: string;
|
|
54
|
+
cron: string;
|
|
47
55
|
random: string;
|
|
48
56
|
timer: string;
|
|
57
|
+
trigger: string;
|
|
49
58
|
};
|
|
50
59
|
enumNames: {
|
|
51
60
|
carbonDioxideSensor: string;
|
|
52
61
|
carbonMonoxideSensor: string;
|
|
53
62
|
closed: string;
|
|
54
63
|
contactSensor: string;
|
|
64
|
+
cron: string;
|
|
55
65
|
door: string;
|
|
56
66
|
hours: string;
|
|
67
|
+
interval: string;
|
|
57
68
|
leakSensor: string;
|
|
58
69
|
lightbulb: string;
|
|
59
70
|
lockMechanism: string;
|
|
@@ -81,16 +92,18 @@ declare const en: {
|
|
|
81
92
|
commandOpen: string;
|
|
82
93
|
commandLock: string;
|
|
83
94
|
commandUnlock: string;
|
|
95
|
+
cron: string;
|
|
84
96
|
defaultBrightness: string;
|
|
85
97
|
defaultPosition: string;
|
|
86
98
|
defaultState: string;
|
|
87
99
|
delay: string;
|
|
88
100
|
disableLogging: string;
|
|
89
101
|
groupName: string;
|
|
102
|
+
interval: string;
|
|
90
103
|
name: string;
|
|
91
|
-
options: string;
|
|
92
104
|
resetOnRestart: string;
|
|
93
105
|
timer: string;
|
|
106
|
+
trigger: string;
|
|
94
107
|
sensor: string;
|
|
95
108
|
type: string;
|
|
96
109
|
units: string;
|
package/dist/i18n/en.js
CHANGED
|
@@ -1,59 +1,70 @@
|
|
|
1
1
|
const en = {
|
|
2
2
|
accessory: {
|
|
3
|
-
|
|
3
|
+
invalidCron: '%s has an invalid cron expression %s', // accessory name, cron string
|
|
4
|
+
missingRequired: '%s is missing required config variable %s', // accessory name, variable name
|
|
4
5
|
command: {
|
|
5
|
-
executed: '%s executed command',
|
|
6
|
-
error: '%s failed to execute command',
|
|
6
|
+
executed: '%s executed command', // accessory name
|
|
7
|
+
error: '%s failed to execute command', // accessory name
|
|
7
8
|
},
|
|
8
9
|
lightbulb: {
|
|
9
|
-
brightness: '%s brightness is %s',
|
|
10
|
-
stateOn: '%s is on %s%',
|
|
10
|
+
brightness: '%s brightness is %s', // accessory name, number
|
|
11
|
+
stateOn: '%s is on %s%', // accessory name, number
|
|
11
12
|
},
|
|
12
13
|
lock: {
|
|
13
|
-
secured: '%s is locked',
|
|
14
|
-
unsecured: '%s is unlocked',
|
|
14
|
+
secured: '%s is locked', // accessory name
|
|
15
|
+
unsecured: '%s is unlocked', // accessory name
|
|
15
16
|
},
|
|
16
17
|
onOff: {
|
|
17
|
-
stateOn: '%s is on',
|
|
18
|
-
stateOff: '%s is off',
|
|
18
|
+
stateOn: '%s is on', // accessory name
|
|
19
|
+
stateOff: '%s is off', // accessory name
|
|
19
20
|
},
|
|
20
21
|
position: {
|
|
21
|
-
closed: '%s is closed',
|
|
22
|
-
open: '%s is open',
|
|
22
|
+
closed: '%s is closed', // accessory name
|
|
23
|
+
open: '%s is open', // accessory name
|
|
23
24
|
},
|
|
24
25
|
timer: {
|
|
25
|
-
cancel: 'Cancelled the timer for %s',
|
|
26
|
-
reset: 'Reset the timer for %s',
|
|
27
|
-
setSeconds: '%s is waiting %s seconds',
|
|
28
|
-
setMinutes: '%s is waiting %s minutes',
|
|
29
|
-
setHours: '%s is waiting %s hours',
|
|
26
|
+
cancel: 'Cancelled the timer for %s', // accessory name
|
|
27
|
+
reset: 'Reset the timer for %s', // accessory name
|
|
28
|
+
setSeconds: '%s is waiting %s seconds', // accessory name, number
|
|
29
|
+
setMinutes: '%s is waiting %s minutes', // accessory name, number
|
|
30
|
+
setHours: '%s is waiting %s hours', // accessory name, number
|
|
31
|
+
},
|
|
32
|
+
trigger: {
|
|
33
|
+
cron: '%s starting trigger cronjob', // accessory name
|
|
34
|
+
intervalSeconds: '%s will trigger in %s seconds', // accessory name, number
|
|
35
|
+
intervalMinutes: '%s will trigger in %s minutes', // accessory name, number
|
|
36
|
+
intervalHours: '%s will trigger in %s hours', // accessory name, number
|
|
30
37
|
},
|
|
31
38
|
},
|
|
32
39
|
config: {
|
|
33
40
|
migrate: 'Are you upgrading from an earlier version?',
|
|
34
|
-
migrationDetails1: 'HomeKit automations using %s accessories will need to be reconfigured!',
|
|
41
|
+
migrationDetails1: 'HomeKit scenes and automations using %s accessories will need to be reconfigured!', // plugin name
|
|
35
42
|
migrationDetails2: 'Please downgrade to v0.9.2 or earlier if you want to keep your current setup.',
|
|
36
|
-
migrationDetails3: '%s can try to recreate your accessories, but you will still need reconfigure HomeKit automations.',
|
|
43
|
+
migrationDetails3: '%s can try to recreate your accessories, but you will still need reconfigure HomeKit scenes and automations.', // plugin name
|
|
37
44
|
migrationDetails4: 'Would you like to recreate your accessories now?',
|
|
38
|
-
migrationDetails5: 'For more details, please visit %s',
|
|
45
|
+
migrationDetails5: 'For more details, please visit %s', // url
|
|
39
46
|
migrationRestartTitle: 'Restart Homebridge',
|
|
40
|
-
migrationRestartDescription: 'Please restart Homebridge to begin %s migration',
|
|
41
|
-
support: 'For documentation and support please visit %s',
|
|
42
|
-
thankYou: 'Thank you for installing %s',
|
|
47
|
+
migrationRestartDescription: 'Please restart Homebridge to begin %s migration', // plugin name
|
|
48
|
+
support: 'For documentation and support please visit %s', // url
|
|
49
|
+
thankYou: 'Thank you for installing %s', // plugin name
|
|
43
50
|
yes: 'Yes',
|
|
44
51
|
no: 'No',
|
|
45
52
|
description: {
|
|
46
|
-
commands: 'Execute
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
commands: 'Execute arbitrary commands when the accessory changes state',
|
|
54
|
+
cron: 'Visit crontab.guru for help',
|
|
55
|
+
random: 'Time will be randomized with the above value as a maximum',
|
|
56
|
+
timer: 'Return the accessory to its default value after the specified delay',
|
|
57
|
+
trigger: 'Set the accessory to its opposite (non-default) value at specified interval or times',
|
|
49
58
|
},
|
|
50
59
|
enumNames: {
|
|
51
60
|
carbonDioxideSensor: 'Carbon Dioxide',
|
|
52
61
|
carbonMonoxideSensor: 'Carbon Monoxide',
|
|
53
62
|
closed: 'Closed',
|
|
54
63
|
contactSensor: 'Contact',
|
|
64
|
+
cron: 'Cron',
|
|
55
65
|
door: 'Door',
|
|
56
66
|
hours: 'Hours',
|
|
67
|
+
interval: 'Interval',
|
|
57
68
|
leakSensor: 'Leak',
|
|
58
69
|
lightbulb: 'Lightbulb',
|
|
59
70
|
lockMechanism: 'Lock',
|
|
@@ -81,55 +92,57 @@ const en = {
|
|
|
81
92
|
commandOpen: 'Open Command',
|
|
82
93
|
commandLock: 'Lock Command',
|
|
83
94
|
commandUnlock: 'Unlock Command',
|
|
95
|
+
cron: 'Cron',
|
|
84
96
|
defaultBrightness: 'Default Brightness',
|
|
85
97
|
defaultPosition: 'Default Position',
|
|
86
98
|
defaultState: 'Default State',
|
|
87
99
|
delay: 'Delay',
|
|
88
100
|
disableLogging: 'Disable Logging',
|
|
89
101
|
groupName: 'Group Name (Beta)',
|
|
102
|
+
interval: 'Interval',
|
|
90
103
|
name: 'Name',
|
|
91
|
-
options: 'Additional Settings',
|
|
92
104
|
resetOnRestart: 'Reset on Restart',
|
|
93
|
-
timer: '
|
|
105
|
+
timer: 'Auto-Reset',
|
|
106
|
+
trigger: 'Auto-Trigger',
|
|
94
107
|
sensor: 'Attach Sensor',
|
|
95
108
|
type: 'Type',
|
|
96
109
|
units: 'Units',
|
|
97
|
-
random: '
|
|
110
|
+
random: 'Randomize',
|
|
98
111
|
},
|
|
99
112
|
},
|
|
100
113
|
sensor: {
|
|
101
114
|
carbonDioxide: {
|
|
102
|
-
active: '%s detected carbon dioxide',
|
|
103
|
-
inactive: '%s stopped detecting carbon dioxide',
|
|
115
|
+
active: '%s detected carbon dioxide', // accessory name
|
|
116
|
+
inactive: '%s stopped detecting carbon dioxide', // accessory name
|
|
104
117
|
},
|
|
105
118
|
carbonMonoxide: {
|
|
106
|
-
active: '%s detected carbon monoxide',
|
|
107
|
-
inactive: '%s stopped detecting carbon monoxide',
|
|
119
|
+
active: '%s detected carbon monoxide', // accessory name
|
|
120
|
+
inactive: '%s stopped detecting carbon monoxide', // accessory name
|
|
108
121
|
},
|
|
109
122
|
contact: {
|
|
110
|
-
active: '%s detected contact',
|
|
111
|
-
inactive: '%s stopped detecting contact',
|
|
123
|
+
active: '%s detected contact', // accessory name
|
|
124
|
+
inactive: '%s stopped detecting contact', // accessory name
|
|
112
125
|
},
|
|
113
126
|
leak: {
|
|
114
|
-
active: '%s detected a leak',
|
|
115
|
-
inactive: '%s stopped detecting leaks',
|
|
127
|
+
active: '%s detected a leak', // accessory name
|
|
128
|
+
inactive: '%s stopped detecting leaks', // accessory name
|
|
116
129
|
},
|
|
117
130
|
motion: {
|
|
118
|
-
active: '%s detected motion',
|
|
119
|
-
inactive: '%s stopped detecting motion',
|
|
131
|
+
active: '%s detected motion', // accessory name
|
|
132
|
+
inactive: '%s stopped detecting motion', // accessory name
|
|
120
133
|
},
|
|
121
134
|
occupancy: {
|
|
122
|
-
active: '%s detected occupancy',
|
|
123
|
-
inactive: '%s stopped detecting occupancy',
|
|
135
|
+
active: '%s detected occupancy', // accessory name
|
|
136
|
+
inactive: '%s stopped detecting occupancy', // accessory name
|
|
124
137
|
},
|
|
125
138
|
smoke: {
|
|
126
|
-
active: '%s detected smoke',
|
|
127
|
-
inactive: '%s stopped detecting smoke',
|
|
139
|
+
active: '%s detected smoke', // accessory name
|
|
140
|
+
inactive: '%s stopped detecting smoke', // accessory name
|
|
128
141
|
},
|
|
129
142
|
},
|
|
130
143
|
startup: {
|
|
131
144
|
migrationBridge: '‼️ Please restart Homebridge one more time for migration to take full effect ‼️',
|
|
132
|
-
migrationComplete: 'Successfully migrated %s accessories!',
|
|
145
|
+
migrationComplete: 'Successfully migrated %s accessories!', // number
|
|
133
146
|
migrationNoAccessories: 'Unable to find any accessories to migrate',
|
|
134
147
|
migrationIgnore: 'You may safely ignore \'No plugin was found…\' errors — they should go away the next time you restart Homebridge',
|
|
135
148
|
migrationFailed: 'Sorry, something went wrong with the accessory migration',
|
|
@@ -138,7 +151,7 @@ const en = {
|
|
|
138
151
|
removeAccessory: 'Removing accessory:',
|
|
139
152
|
restoringAccessory: 'Restoring accessory:',
|
|
140
153
|
setupComplete: '✓ Setup complete',
|
|
141
|
-
unsupportedType: 'Unsupported accessory type %s',
|
|
154
|
+
unsupportedType: 'Unsupported accessory type %s', // accessory type
|
|
142
155
|
welcome: [
|
|
143
156
|
'Please ★ this plugin on GitHub if you\'re finding it useful! https://github.com/mpatfield/homebridge-dummy',
|
|
144
157
|
'Would you like to sponsor this plugin? https://github.com/sponsors/mpatfield',
|
package/dist/i18n/en.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG;IAET,SAAS,EAAE;QAET,eAAe,EAAE,2CAA2C;
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","s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C1D;KACF;IAED,OAAO,EAAE;QACP,eAAe,EAAE,iFAAiF;QAClG,iBAAiB,EAAE,uCAAuC,EAAE,SAAS;QACrE,sBAAsB,EAAE,2CAA2C;QACnE,eAAe,EAAE,kHAAkH;QACnI,eAAe,EAAE,0DAA0D;QAC3E,eAAe,EAAE,+FAA+F;QAChH,YAAY,EAAE,uBAAuB;QACrC,eAAe,EAAE,qBAAqB;QACtC,kBAAkB,EAAE,sBAAsB;QAC1C,aAAa,EAAE,kBAAkB;QACjC,eAAe,EAAE,+BAA+B,EAAE,iBAAiB;QACnE,OAAO,EAAE;YACP,4GAA4G;YAC5G,8EAA8E;YAC9E,4EAA4E;YAC5E,qHAAqH;SACtH;KACF;CACF,CAAC;AAEF,eAAe,EAAE,CAAC"}
|
package/dist/i18n/i18n.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare function setLanguage(i18nLang: string): void;
|
|
|
9
9
|
export declare function getAllTranslations(): Translation;
|
|
10
10
|
declare const translations: {
|
|
11
11
|
accessory: {
|
|
12
|
+
invalidCron: string;
|
|
12
13
|
missingRequired: string;
|
|
13
14
|
command: {
|
|
14
15
|
executed: string;
|
|
@@ -37,6 +38,12 @@ declare const translations: {
|
|
|
37
38
|
setMinutes: string;
|
|
38
39
|
setHours: string;
|
|
39
40
|
};
|
|
41
|
+
trigger: {
|
|
42
|
+
cron: string;
|
|
43
|
+
intervalSeconds: string;
|
|
44
|
+
intervalMinutes: string;
|
|
45
|
+
intervalHours: string;
|
|
46
|
+
};
|
|
40
47
|
};
|
|
41
48
|
config: {
|
|
42
49
|
migrate: string;
|
|
@@ -53,16 +60,20 @@ declare const translations: {
|
|
|
53
60
|
no: string;
|
|
54
61
|
description: {
|
|
55
62
|
commands: string;
|
|
63
|
+
cron: string;
|
|
56
64
|
random: string;
|
|
57
65
|
timer: string;
|
|
66
|
+
trigger: string;
|
|
58
67
|
};
|
|
59
68
|
enumNames: {
|
|
60
69
|
carbonDioxideSensor: string;
|
|
61
70
|
carbonMonoxideSensor: string;
|
|
62
71
|
closed: string;
|
|
63
72
|
contactSensor: string;
|
|
73
|
+
cron: string;
|
|
64
74
|
door: string;
|
|
65
75
|
hours: string;
|
|
76
|
+
interval: string;
|
|
66
77
|
leakSensor: string;
|
|
67
78
|
lightbulb: string;
|
|
68
79
|
lockMechanism: string;
|
|
@@ -90,16 +101,18 @@ declare const translations: {
|
|
|
90
101
|
commandOpen: string;
|
|
91
102
|
commandLock: string;
|
|
92
103
|
commandUnlock: string;
|
|
104
|
+
cron: string;
|
|
93
105
|
defaultBrightness: string;
|
|
94
106
|
defaultPosition: string;
|
|
95
107
|
defaultState: string;
|
|
96
108
|
delay: string;
|
|
97
109
|
disableLogging: string;
|
|
98
110
|
groupName: string;
|
|
111
|
+
interval: string;
|
|
99
112
|
name: string;
|
|
100
|
-
options: string;
|
|
101
113
|
resetOnRestart: string;
|
|
102
114
|
timer: string;
|
|
115
|
+
trigger: string;
|
|
103
116
|
sensor: string;
|
|
104
117
|
type: string;
|
|
105
118
|
units: string;
|
package/dist/i18n/template.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
2
2
|
accessory: {
|
|
3
|
+
invalidCron: string;
|
|
3
4
|
missingRequired: string;
|
|
4
5
|
command: {
|
|
5
6
|
executed: string;
|
|
@@ -28,6 +29,12 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
28
29
|
setMinutes: string;
|
|
29
30
|
setHours: string;
|
|
30
31
|
};
|
|
32
|
+
trigger: {
|
|
33
|
+
cron: string;
|
|
34
|
+
intervalSeconds: string;
|
|
35
|
+
intervalMinutes: string;
|
|
36
|
+
intervalHours: string;
|
|
37
|
+
};
|
|
31
38
|
};
|
|
32
39
|
config: {
|
|
33
40
|
migrate: string;
|
|
@@ -44,16 +51,20 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
44
51
|
no: string;
|
|
45
52
|
description: {
|
|
46
53
|
commands: string;
|
|
54
|
+
cron: string;
|
|
47
55
|
random: string;
|
|
48
56
|
timer: string;
|
|
57
|
+
trigger: string;
|
|
49
58
|
};
|
|
50
59
|
enumNames: {
|
|
51
60
|
carbonDioxideSensor: string;
|
|
52
61
|
carbonMonoxideSensor: string;
|
|
53
62
|
closed: string;
|
|
54
63
|
contactSensor: string;
|
|
64
|
+
cron: string;
|
|
55
65
|
door: string;
|
|
56
66
|
hours: string;
|
|
67
|
+
interval: string;
|
|
57
68
|
leakSensor: string;
|
|
58
69
|
lightbulb: string;
|
|
59
70
|
lockMechanism: string;
|
|
@@ -81,16 +92,18 @@ declare const REPLACE_THIS_WITH_ISO_CODE: {
|
|
|
81
92
|
commandOpen: string;
|
|
82
93
|
commandLock: string;
|
|
83
94
|
commandUnlock: string;
|
|
95
|
+
cron: string;
|
|
84
96
|
defaultBrightness: string;
|
|
85
97
|
defaultPosition: string;
|
|
86
98
|
defaultState: string;
|
|
87
99
|
delay: string;
|
|
88
100
|
disableLogging: string;
|
|
89
101
|
groupName: string;
|
|
102
|
+
interval: string;
|
|
90
103
|
name: string;
|
|
91
|
-
options: string;
|
|
92
104
|
resetOnRestart: string;
|
|
93
105
|
timer: string;
|
|
106
|
+
trigger: string;
|
|
94
107
|
sensor: string;
|
|
95
108
|
type: string;
|
|
96
109
|
units: string;
|
package/dist/i18n/zz.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const zz: {
|
|
2
2
|
accessory: {
|
|
3
|
+
invalidCron: string;
|
|
3
4
|
missingRequired: string;
|
|
4
5
|
command: {
|
|
5
6
|
executed: string;
|
|
@@ -28,6 +29,12 @@ declare const zz: {
|
|
|
28
29
|
setMinutes: string;
|
|
29
30
|
setHours: string;
|
|
30
31
|
};
|
|
32
|
+
trigger: {
|
|
33
|
+
cron: string;
|
|
34
|
+
intervalSeconds: string;
|
|
35
|
+
intervalMinutes: string;
|
|
36
|
+
intervalHours: string;
|
|
37
|
+
};
|
|
31
38
|
};
|
|
32
39
|
config: {
|
|
33
40
|
migrate: string;
|
|
@@ -44,16 +51,20 @@ declare const zz: {
|
|
|
44
51
|
no: string;
|
|
45
52
|
description: {
|
|
46
53
|
commands: string;
|
|
54
|
+
cron: string;
|
|
47
55
|
random: string;
|
|
48
56
|
timer: string;
|
|
57
|
+
trigger: string;
|
|
49
58
|
};
|
|
50
59
|
enumNames: {
|
|
51
60
|
carbonDioxideSensor: string;
|
|
52
61
|
carbonMonoxideSensor: string;
|
|
53
62
|
closed: string;
|
|
54
63
|
contactSensor: string;
|
|
64
|
+
cron: string;
|
|
55
65
|
door: string;
|
|
56
66
|
hours: string;
|
|
67
|
+
interval: string;
|
|
57
68
|
leakSensor: string;
|
|
58
69
|
lightbulb: string;
|
|
59
70
|
lockMechanism: string;
|
|
@@ -81,16 +92,18 @@ declare const zz: {
|
|
|
81
92
|
commandOpen: string;
|
|
82
93
|
commandLock: string;
|
|
83
94
|
commandUnlock: string;
|
|
95
|
+
cron: string;
|
|
84
96
|
defaultBrightness: string;
|
|
85
97
|
defaultPosition: string;
|
|
86
98
|
defaultState: string;
|
|
87
99
|
delay: string;
|
|
88
100
|
disableLogging: string;
|
|
89
101
|
groupName: string;
|
|
102
|
+
interval: string;
|
|
90
103
|
name: string;
|
|
91
|
-
options: string;
|
|
92
104
|
resetOnRestart: string;
|
|
93
105
|
timer: string;
|
|
106
|
+
trigger: string;
|
|
94
107
|
sensor: string;
|
|
95
108
|
type: string;
|
|
96
109
|
units: string;
|
package/dist/model/timer.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { Log } from '../tools/log.js';
|
|
2
1
|
import { TimerConfig } from './types.js';
|
|
2
|
+
import { Log } from '../tools/log.js';
|
|
3
3
|
export declare class Timer {
|
|
4
|
+
private readonly config;
|
|
4
5
|
private readonly caller;
|
|
5
|
-
private readonly log
|
|
6
|
+
private readonly log;
|
|
7
|
+
private readonly disableLogging;
|
|
6
8
|
private timer;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
static new(config: TimerConfig, caller: string, log: Log, disableLogging: boolean): Timer | undefined;
|
|
10
|
+
private constructor();
|
|
11
|
+
start(callback: () => Promise<void>): void;
|
|
9
12
|
cancel(): void;
|
|
10
13
|
teardown(): void;
|
|
11
14
|
private reset;
|
|
15
|
+
private logIfDesired;
|
|
12
16
|
}
|