homebridge-dummy 1.1.0-beta.5 → 1.1.0-beta.6

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
@@ -11,13 +11,13 @@ Automations and scenes using Homebridge Dummy accessories will need to be reconf
11
11
  ---
12
12
 
13
13
  ### Added
14
- - Groups (Beta) - Items sharing the same group name will be collected together in the Home app UI
14
+ - Groups (Beta) - Items sharing the same group name will be collected together in the Home app UI ([#46](https://github.com/mpatfield/homebridge-dummy/issues/46))
15
15
  - ⚠️ Adding/removing/changing the group name for an accessory will require you to reconfigure any HomeKit scenes or automations
16
- - Auto-Trigger feature to invoke accessory at a specified interval or times (cron)
17
- - Support for Thermostats
16
+ - Auto-Trigger feature to invoke accessory at a specified interval or times via cron ([#136](https://github.com/mpatfield/homebridge-dummy/issues/136))
17
+ - Support for Thermostats ([#145](https://github.com/mpatfield/homebridge-dummy/issues/145))
18
18
  - Manual control only, no auto-trigger or auto-reset functionality
19
- - Millisecond unit option for triggers/timers
20
- - "Fade" option for dimmer lightbulbs timers
19
+ - Millisecond unit option for triggers/timers ([#149](https://github.com/mpatfield/homebridge-dummy/issues/149))
20
+ - "Fade" option for dimmer lightbulbs timers ([#150](https://github.com/mpatfield/homebridge-dummy/issues/150))
21
21
 
22
22
  ### Changed
23
23
  - Reorganized plugin config UI and renamed "Timer" to "Auto-Reset"
@@ -25,6 +25,7 @@ Automations and scenes using Homebridge Dummy accessories will need to be reconf
25
25
 
26
26
  ### Fixed
27
27
  - Timer logging issues ([#143](https://github.com/mpatfield/homebridge-dummy/issues/143), [#148](https://github.com/mpatfield/homebridge-dummy/issues/148))
28
+ - Better support for custom configuration with multiple plugin instances and child bridges ([#152](https://github.com/mpatfield/homebridge-dummy/issues/152))
28
29
 
29
30
  ## 1.0.0 (2025-07-23)
30
31
 
@@ -43,4 +43,4 @@
43
43
  <em><p i18n="migrationDetails5" i18n_replace="migration"></p></em></br>
44
44
  </div>
45
45
 
46
- <script src="ui.js?v=1.1.0-beta.5"></script>
46
+ <script src="ui.js?v=1.1.0-beta.6"></script>
@@ -1 +1 @@
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)})();})();
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.forEach(o=>{o.accessories?.forEach(i=>{i.id===void 0&&(i.id=x(),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;f(i)}),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/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-beta.5",
7
+ "version": "1.1.0-beta.6",
8
8
  "homepage": "https://github.com/mpatfield/homebridge-dummy#readme",
9
9
  "repository": {
10
10
  "type": "git",