homebridge-dummy 1.1.0-alpha.0 → 1.1.0-beta.0

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 CHANGED
@@ -1,27 +1,30 @@
1
- <!-- ⚠️ Plugin has a new owner/maintainer and will undergo significant cleanup and modernization in the near term. If you experience issues you can always downgrade to the last stable version v0.9.0
1
+ ## ‼️ WARNING - READ BEFORE CONTINUING ‼️
2
2
 
3
- Please report any issues you encounter here: https://github.com/mpatfield/homebridge-dummy/issues -->
3
+ If upgrading from v0.9.2 or earlier, automations and scenes using Homebridge Dummy accessories will need to be reconfigured.
4
4
 
5
- # ‼️ WARNING ‼️
5
+ ## ⚠️ IMPORTANT ⚠️
6
6
 
7
- ### If upgrading from v0.9.2 or earlier, automations and scenes using Homebridge Dummy accessories will need to be reconfigured. Please downgrade to v0.9.2 or earlier now if you want to keep your existing setup.
7
+ After installing v1.0, you must **RESTART HOMEBRIDGE SERVICE & UI** (not just *RESTART HOMEBRIDGE*) before continuing or you will experience issues with Homebridge Dummy configuration.
8
8
 
9
- ### After updating, you will need to open Homebridge Dummy plugin settings to run the accessory migration helper.
9
+ Once you have restarted both Homebridge and the UI, you will need to open the Homebridge Dummy plugin settings to run the accessory migration helper.
10
10
 
11
- ### Full details [here](https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#v10-migration).
11
+ Full details [here](https://github.com/mpatfield/homebridge-dummy?tab=readme-ov-file#v10-migration).
12
12
 
13
13
  # Change Log
14
14
 
15
15
  All notable changes to homebridge-dummy will be documented in this file.
16
16
 
17
- ## 1.1.0-alpha.0 (2025-07-16)
17
+ ## 1.1.0-beta.X (XXXX-XX-XX)
18
18
 
19
19
  ### Added
20
20
 
21
- - (Beta) Groups - Items sharing the same group name will be collected together in the Home app UI
22
- - ⚠️ Be aware that adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
21
+ - Groups (Beta) - Items sharing the same group name will be collected together in the Home app UI
22
+ - ⚠️ Adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
23
23
 
24
- ## 1.0.0-beta.0 (2025-07-14)
24
+ ## 1.0.0 (2025-07-23)
25
+
26
+ ### Changed
27
+ - Complete code re-write to use [Platform Plugin](https://developers.homebridge.io/#/api/platform-plugins) instead of [Accessory Plugin](https://developers.homebridge.io/#/api/accessory-plugins)
25
28
 
26
29
  ### Added
27
30
  - Drastically improved config UI
@@ -30,9 +33,6 @@ All notable changes to homebridge-dummy will be documented in this file.
30
33
  - Sensor support (CO2, CO, Contact, Leak, Motion, Occupancy, and Smoke)
31
34
  - Execute arbitraty commands when accessory state changes
32
35
 
33
- ### Changed
34
- - Complete code re-write to use [Platform Plugin](https://developers.homebridge.io/#/api/platform-plugins) instead of [Accessory Plugin](https://developers.homebridge.io/#/api/accessory-plugins)
35
-
36
36
  ## 0.9.2 (2025-06-26)
37
37
 
38
38
  ### Fixed
package/README.md CHANGED
@@ -24,7 +24,7 @@ Any issues or damage resulting from use of this plugin are not the fault of the
24
24
 
25
25
  ### tl;dr
26
26
 
27
- ‼️ There are significant code changes between v0.9 and v1.0 which means you will need to reconfigure HomeKit automations after upgrading. Homebridge Dummy will try to migrate old accessories in Homebridge so you don't need to recreate everything.
27
+ ‼️ There are significant code changes between v0.9 and v1.0 which means you will need to reconfigure HomeKit automations after upgrading. Homebridge Dummy will try to help migrate old accessories.
28
28
 
29
29
  ### Why?
30
30
 
@@ -32,16 +32,18 @@ The original HomebridgeDummy was written almost 10 years ago and uses the now de
32
32
 
33
33
  While this still works okay for now, migrating the code to use [Platform Plugins](https://developers.homebridge.io/#/api/platform-plugins) will future-proof Homebridge Dummy and allow for more modern and robust design patterns.
34
34
 
35
- v1.0 doesn't include any new features but will make it much easier to improve and extend this plugin going forward.
35
+ The architecture used in v1.0 will make it much easier to improve and extend this plugin going forward and already includes several new features.
36
36
 
37
37
  ### Drawbacks
38
38
 
39
39
  Unfortunately, there is no built-in way to migrate existing accessory plugins to platform plugins. This means that all accessories will be considered "new" by HomeKit, so any existing automations or room setups will be lost.
40
40
 
41
- However, Homebridge Dummy will try to migrate the accessory configurations to the new system to prevent you having to set them all up again in Homebridge.
41
+ However, Homebridge Dummy will try to help migrate the accessory configurations to the new system to prevent you having to set them all up again in Homebridge.
42
42
 
43
43
  ### Migration Flow
44
44
 
45
+ ⚠️ Please make sure to restart both Homebridge Service AND Homebridge UI after upgrading to v1.0 or you will experience issues with Homebridge Dummy configuration.
46
+
45
47
  Once you have installed v1.0, click on the icon to configure the Homebridge Dummy plugin in the Homebridge UI and it will walk you through the necessary questionnaire.
46
48
 
47
49
  Alternatively, you can add the following to "platforms" in your config.json
@@ -56,15 +58,15 @@ Alternatively, you can add the following to "platforms" in your config.json
56
58
 
57
59
  You will need to restart Homebridge after completing the flow for changes to take effect.
58
60
 
59
- ⚠️ If you are using child bridges with v0.9, you will need to restart Homebridge _twice_ for migrated accessories to show up correctly.
61
+ ⚠️ If you are using child bridges with v0.9, you may need to restart Homebridge _twice_ for migrated accessories to show up correctly.
60
62
 
61
63
  You may safely ignore any "No plugin was found…" errors you see in the Homebridge logs. These should go away after a few Homebridge restarts.
62
64
 
63
65
  ### Problems?
64
66
 
65
- This is a highly experimental flow and may not work as intended. If you see "Sorry, something went wrong with the accessory migration" or encounter other issues, please [create an issue](https://github.com/mpatfield/homebridge-dummy/issues/new?template=new-issue.md).
67
+ This is an experimental flow and may not work as intended. If you see "Sorry, something went wrong with the accessory migration" or encounter other issues, please [create an issue](https://github.com/mpatfield/homebridge-dummy/issues/new?template=new-issue.md).
66
68
 
67
- The first thing the flow does is create a backup called `config.json.bak` in your Homebridge directory. If all else fails, you can replace your `config.json` with the backup and downgrade to Homebridge Dummy v0.9 to restore everything back to normal.
69
+ The first thing the flow does is create a backup called `config.json.bak` in your Homebridge directory. If all else fails, you can replace your `config.json` with the backup and downgrade to Homebridge Dummy v0.9 to restore your previous accessories.
68
70
 
69
71
  ## About
70
72
 
@@ -116,7 +118,7 @@ All fields are optional unless noted with an asterisk (*)
116
118
  - `type`* - The type of accessory: `Door`, `Lightbulb`, `LockMechanism`, `Outlet`, `Switch`, `Window`, or `WindowCovering`
117
119
 
118
120
  - `groupName` - (Beta) Items sharing the same group name will be collected together in the Home app UI
119
- - ⚠️ Be aware that adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
121
+ - ⚠️ Adding/removing/changing the group name will require you to reconfigure any HomeKit scenes or automations
120
122
 
121
123
  - `timer.delay` — If defined, the switch will automatically toggle after this many seconds/minutes/hours
122
124
  - `timer.units` — The units to use for delay above (`SECONDS`, `MINUTES`, or `HOURS`). *Required if delay is set.
@@ -175,7 +177,7 @@ All fields are optional unless noted with an asterisk (*)
175
177
  "delay": 5,
176
178
  "units": "SECONDS"
177
179
  },
178
- "defaultOn: true
180
+ "defaultOn": true
179
181
  }
180
182
  ```
181
183
 
@@ -5,13 +5,15 @@
5
5
  }
6
6
  </style>
7
7
 
8
- <p class="text-center">
9
- <img
10
- src="https://github.com/mpatfield/homebridge-dummy/blob/latest/img/banner.png?raw=true"
11
- alt="Homebridge Dummy"
12
- style="width: 60%;"
13
- />
14
- </p>
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-primary" id="showSettings" i18n="no"></button>&nbsp;&nbsp;
24
- <button type="button" class="btn btn-primary" id="showMigration" i18n="yes"></button>
25
+ <button type="button" class="btn btn-secondary" id="showSettings" i18n="no"></button>&nbsp;&nbsp;
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/1/17/Warning.svg/156px-Warning.svg.png"/>
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
- <h1><p class="text-danger" i18n="migrationDetails1" i18n_replace="dummy"></p></h1>
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-primary" id="skipMigration" i18n="no"></button>&nbsp;&nbsp;
39
- <button type="button" class="btn btn-primary" id="doMigration" i18n="yes"></button>
40
+ <button type="button" class="btn btn-secondary" id="skipMigration" i18n="no"></button>&nbsp;&nbsp;
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-alpha.0"></script>
46
+ <script src="ui.js?v=1.1.0-beta.0"></script>
@@ -1 +1 @@
1
- "use strict";(()=>{var r="Homebridge Dummy";var g={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},l=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",g[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,c)=>e.config[a]&&typeof e.config[a]=="object"&&c in e.config[a]?e.config[a][c]:m),i.innerHTML!==n&&(i.innerHTML=n)})},d=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",()=>d(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),d(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("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);l(t),(await homebridge.getPluginConfig()).length?s(t):p(t)})();})();
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.js CHANGED
@@ -1,45 +1,45 @@
1
1
  const en = {
2
2
  accessory: {
3
- missingRequired: '%s is missing required config variable %s',
3
+ missingRequired: '%s is missing required config variable %s', // accessory name, variable name
4
4
  command: {
5
- executed: '%s executed command',
6
- error: '%s failed to execute command',
5
+ executed: '%s executed command', // accessory name
6
+ error: '%s failed to execute command', // accessory name
7
7
  },
8
8
  lightbulb: {
9
- brightness: '%s brightness is %s',
10
- stateOn: '%s is on %s%',
9
+ brightness: '%s brightness is %s', // accessory name, number
10
+ stateOn: '%s is on %s%', // accessory name, number
11
11
  },
12
12
  lock: {
13
- secured: '%s is locked',
14
- unsecured: '%s is unlocked',
13
+ secured: '%s is locked', // accessory name
14
+ unsecured: '%s is unlocked', // accessory name
15
15
  },
16
16
  onOff: {
17
- stateOn: '%s is on',
18
- stateOff: '%s is off',
17
+ stateOn: '%s is on', // accessory name
18
+ stateOff: '%s is off', // accessory name
19
19
  },
20
20
  position: {
21
- closed: '%s is closed',
22
- open: '%s is open',
21
+ closed: '%s is closed', // accessory name
22
+ open: '%s is open', // accessory name
23
23
  },
24
24
  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',
25
+ cancel: 'Cancelled the timer for %s', // accessory name
26
+ reset: 'Reset the timer for %s', // accessory name
27
+ setSeconds: '%s is waiting %s seconds', // accessory name, number
28
+ setMinutes: '%s is waiting %s minutes', // accessory name, number
29
+ setHours: '%s is waiting %s hours', // accessory name, number
30
30
  },
31
31
  },
32
32
  config: {
33
33
  migrate: 'Are you upgrading from an earlier version?',
34
- migrationDetails1: 'HomeKit automations using %s accessories will need to be reconfigured!',
34
+ migrationDetails1: 'HomeKit scenes and automations using %s accessories will need to be reconfigured!', // plugin name
35
35
  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.',
36
+ migrationDetails3: '%s can try to recreate your accessories, but you will still need reconfigure HomeKit scenes and automations.', // plugin name
37
37
  migrationDetails4: 'Would you like to recreate your accessories now?',
38
- migrationDetails5: 'For more details, please visit %s',
38
+ migrationDetails5: 'For more details, please visit %s', // url
39
39
  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',
40
+ migrationRestartDescription: 'Please restart Homebridge to begin %s migration', // plugin name
41
+ support: 'For documentation and support please visit %s', // url
42
+ thankYou: 'Thank you for installing %s', // plugin name
43
43
  yes: 'Yes',
44
44
  no: 'No',
45
45
  description: {
@@ -99,37 +99,37 @@ const en = {
99
99
  },
100
100
  sensor: {
101
101
  carbonDioxide: {
102
- active: '%s detected carbon dioxide',
103
- inactive: '%s stopped detecting carbon dioxide',
102
+ active: '%s detected carbon dioxide', // accessory name
103
+ inactive: '%s stopped detecting carbon dioxide', // accessory name
104
104
  },
105
105
  carbonMonoxide: {
106
- active: '%s detected carbon monoxide',
107
- inactive: '%s stopped detecting carbon monoxide',
106
+ active: '%s detected carbon monoxide', // accessory name
107
+ inactive: '%s stopped detecting carbon monoxide', // accessory name
108
108
  },
109
109
  contact: {
110
- active: '%s detected contact',
111
- inactive: '%s stopped detecting contact',
110
+ active: '%s detected contact', // accessory name
111
+ inactive: '%s stopped detecting contact', // accessory name
112
112
  },
113
113
  leak: {
114
- active: '%s detected a leak',
115
- inactive: '%s stopped detecting leaks',
114
+ active: '%s detected a leak', // accessory name
115
+ inactive: '%s stopped detecting leaks', // accessory name
116
116
  },
117
117
  motion: {
118
- active: '%s detected motion',
119
- inactive: '%s stopped detecting motion',
118
+ active: '%s detected motion', // accessory name
119
+ inactive: '%s stopped detecting motion', // accessory name
120
120
  },
121
121
  occupancy: {
122
- active: '%s detected occupancy',
123
- inactive: '%s stopped detecting occupancy',
122
+ active: '%s detected occupancy', // accessory name
123
+ inactive: '%s stopped detecting occupancy', // accessory name
124
124
  },
125
125
  smoke: {
126
- active: '%s detected smoke',
127
- inactive: '%s stopped detecting smoke',
126
+ active: '%s detected smoke', // accessory name
127
+ inactive: '%s stopped detecting smoke', // accessory name
128
128
  },
129
129
  },
130
130
  startup: {
131
131
  migrationBridge: '‼️ Please restart Homebridge one more time for migration to take full effect ‼️',
132
- migrationComplete: 'Successfully migrated %s accessories!',
132
+ migrationComplete: 'Successfully migrated %s accessories!', // number
133
133
  migrationNoAccessories: 'Unable to find any accessories to migrate',
134
134
  migrationIgnore: 'You may safely ignore \'No plugin was found…\' errors — they should go away the next time you restart Homebridge',
135
135
  migrationFailed: 'Sorry, something went wrong with the accessory migration',
@@ -138,7 +138,7 @@ const en = {
138
138
  removeAccessory: 'Removing accessory:',
139
139
  restoringAccessory: 'Restoring accessory:',
140
140
  setupComplete: '✓ Setup complete',
141
- unsupportedType: 'Unsupported accessory type %s',
141
+ unsupportedType: 'Unsupported accessory type %s', // accessory type
142
142
  welcome: [
143
143
  'Please ★ this plugin on GitHub if you\'re finding it useful! https://github.com/mpatfield/homebridge-dummy',
144
144
  'Would you like to sponsor this plugin? https://github.com/sponsors/mpatfield',
@@ -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;QAE5D,OAAO,EAAE;YACP,QAAQ,EAAE,qBAAqB;YAC/B,KAAK,EAAE,8BAA8B;SACtC;QAED,SAAS,EAAE;YACT,UAAU,EAAE,qBAAqB;YACjC,OAAO,EAAE,cAAc;SACxB;QAED,IAAI,EAAE;YACJ,OAAO,EAAE,cAAc;YACvB,SAAS,EAAE,gBAAgB;SAC5B;QAED,KAAK,EAAE;YACL,OAAO,EAAE,UAAU;YACnB,QAAQ,EAAE,WAAW;SACtB;QAED,QAAQ,EAAE;YACR,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,YAAY;SACnB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,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"}
@@ -20,7 +20,7 @@ function migrateAccessory(legacyConfig) {
20
20
  }
21
21
  if (!legacyConfig.stateful && legacyConfig.time) {
22
22
  dummyConfig.timer = {
23
- delay: Math.min(1, legacyConfig.time / 1000),
23
+ delay: Math.max(1, legacyConfig.time / 1000),
24
24
  units: TimeUnits.SECONDS,
25
25
  random: legacyConfig.random,
26
26
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName": "Homebridge Dummy",
5
5
  "description": "Dummy devices for Homebridge",
6
6
  "type": "module",
7
- "version": "1.1.0-alpha.0",
7
+ "version": "1.1.0-beta.0",
8
8
  "homepage": "https://github.com/mpatfield/homebridge-dummy#readme",
9
9
  "repository": {
10
10
  "type": "git",