@homebridge-plugins/homebridge-resideo 3.2.0-beta.1 → 3.2.0-beta.3

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
@@ -4,6 +4,8 @@
4
4
 
5
5
  - feat(ui): add, remove and hide devices from the config via the devices tab
6
6
  - style(ui): standardise the custom ui layout and sync the support tab with the readme
7
+ - feat(ui): add a remove all devices action to the my devices tab
8
+ - fix(schema): declare required fields the standard way so the homebridge ui stops reporting a config validation failure
7
9
 
8
10
  ## v3.1.5 (2026-07-24)
9
11
 
@@ -304,7 +304,6 @@
304
304
  "title": "Room Sensor Thermostat Logging Level Override",
305
305
  "description": "Overrides the plugin logging level for this room sensor thermostat only. None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default behaves the same as Standard.",
306
306
  "type": "string",
307
- "required": true,
308
307
  "default": "",
309
308
  "oneOf": [
310
309
  {
@@ -390,7 +389,6 @@
390
389
  "title": "Room Sensor Logging Level Override",
391
390
  "description": "Overrides the plugin logging level for this room sensor only. None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default behaves the same as Standard.",
392
391
  "type": "string",
393
- "required": true,
394
392
  "default": "",
395
393
  "oneOf": [
396
394
  {
@@ -495,7 +493,6 @@
495
493
  "title": "Device Logging Level Override",
496
494
  "description": "Overrides the plugin logging level for this device only. None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default behaves the same as Standard.",
497
495
  "type": "string",
498
- "required": true,
499
496
  "default": "",
500
497
  "oneOf": [
501
498
  {
@@ -540,7 +537,6 @@
540
537
  "title": "Plugin Logging Level",
541
538
  "description": "None turns off all messages from this plugin. Standard shows normal activity, warnings and errors. Debug adds detailed messages, and is what to use when reporting a problem. Default behaves the same as Standard.",
542
539
  "type": "string",
543
- "required": true,
544
540
  "default": "",
545
541
  "oneOf": [
546
542
  {
@@ -118,6 +118,17 @@
118
118
  </button>
119
119
  </div>
120
120
  </li>
121
+ <li class="list-group-item">
122
+ <div class="d-flex justify-content-between align-items-center">
123
+ <div class="pr-2">
124
+ <div>Remove All Devices</div>
125
+ <div class="text-muted action-desc" id="removeAllText">Remove every device from the plugin config.</div>
126
+ </div>
127
+ <button type="button" class="btn btn-primary m-0 ml-3 py-1 min-w-50" id="removeAllBtn" aria-label="Remove all devices from the config">
128
+ <i aria-hidden="true" class="fas fa-arrow-right"></i>
129
+ </button>
130
+ </div>
131
+ </li>
121
132
  <li class="list-group-item">
122
133
  <div class="d-flex justify-content-between align-items-center">
123
134
  <div class="pr-2">
@@ -235,6 +246,7 @@
235
246
  // so staged-but-unsaved edits made in the Settings tab are respected
236
247
  let pickerAccessories = []
237
248
  let removeConfirmTimer
249
+ let removeAllConfirmTimer
238
250
 
239
251
  // The action buttons always show the settings-page arrow; the row text
240
252
  // (and the button's aria-label) says what the arrow will do
@@ -449,6 +461,51 @@
449
461
  homebridge.toast.error(err.message, 'Error')
450
462
  }
451
463
  })
464
+ const resetRemoveAllButton = () => {
465
+ const btn = document.getElementById('removeAllBtn')
466
+ clearTimeout(removeAllConfirmTimer)
467
+ delete btn.dataset.confirm
468
+ btn.classList.remove('btn-danger')
469
+ btn.classList.add('btn-primary')
470
+ btn.innerHTML = actionArrow
471
+ btn.setAttribute('aria-label', 'Remove all devices from the config')
472
+ document.getElementById('removeAllText').innerHTML = 'Remove every device from the plugin config.'
473
+ }
474
+
475
+ document.getElementById('removeAllBtn').addEventListener('click', async () => {
476
+ try {
477
+ const btn = document.getElementById('removeAllBtn')
478
+ const blocks = await getConfigBlocks()
479
+ const config = blocks[0]
480
+ const total = config.options && Array.isArray(config.options.devices) ? config.options.devices.length : 0
481
+ if (total === 0) {
482
+ resetRemoveAllButton()
483
+ homebridge.toast.info('There are no devices in the config.', 'Nothing To Remove')
484
+ return
485
+ }
486
+ if (btn.dataset.confirm !== 'yes') {
487
+ // Removing everything always asks for a second click, since any
488
+ // settings on the entries would be lost
489
+ btn.dataset.confirm = 'yes'
490
+ btn.classList.remove('btn-primary')
491
+ btn.classList.add('btn-danger')
492
+ btn.innerHTML = actionArrow
493
+ btn.setAttribute('aria-label', 'Confirm removing all devices from the config')
494
+ document.getElementById('removeAllText').innerHTML = 'Any settings on these entries will be lost. Click again to remove all ' + total + (total === 1 ? ' entry.' : ' entries.')
495
+ removeAllConfirmTimer = setTimeout(resetRemoveAllButton, 5000)
496
+ return
497
+ }
498
+ delete config.options.devices
499
+ await homebridge.updatePluginConfig(blocks)
500
+ resetRemoveAllButton()
501
+ setConfigButton(false)
502
+ setHideControl(false)
503
+ homebridge.toast.success(total + ' device entr' + (total === 1 ? 'y' : 'ies') + ' removed - press Save to apply.', 'Removed From Config')
504
+ } catch (err) {
505
+ homebridge.toast.error(err.message, 'Error')
506
+ }
507
+ })
508
+
452
509
  // ===== End device picker =====
453
510
  const hostname = window.location.hostname
454
511
  try {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-resideo",
3
3
  "displayName": "Resideo",
4
4
  "type": "module",
5
- "version": "3.2.0-beta.1",
5
+ "version": "3.2.0-beta.3",
6
6
  "description": "The Resideo plugin allows you to access your Resideo device(s) from HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",