Skip to content

Feature/hide devices UI#732

Open
burtherman wants to merge 4 commits intohomebridge-plugins:latestfrom
burtherman:feature/hide-devices-ui
Open

Feature/hide devices UI#732
burtherman wants to merge 4 commits intohomebridge-plugins:latestfrom
burtherman:feature/hide-devices-ui

Conversation

@burtherman
Copy link

Summary

Adds an intuitive "Hide from HomeKit" checkbox to the "My Devices" tab, allowing users to hide devices without manually editing config arrays.

Motivation

Currently, the ignoreDevice option has two limitations:

  1. It's hidden in the UI when devices have deviceUrl (local IP) configured
  2. Users must manually add device entries to config arrays with ignoreDevice: true

This makes it impossible to hide cloud-discovered devices with local control enabled, and the manual config editing is error-prone.

Changes Made

1. Simplified ignoreDevice Visibility (config.schema.json)

  • Removed restrictions that hid the option when connection === 'local' or deviceUrl was set
  • Now visible for all devices with valid 32-character UUIDs
  • Updated all 11 device types (single, multi, light, fan, diffuser, purifier, humidifier, thermostat, garage, roller, baby)

2. Added Interactive UI (lib/homebridge-ui/public/index.html)

  • Added "Hide from HomeKit" checkbox to device info table in "My Devices" tab
  • Checkbox reflects current hidden state
  • Updates ignoredDevices array when toggled
  • Auto-switches to Settings tab for user to save changes
  • Toast notifications provide feedback

3. Added Config Support (config.schema.json)

  • Added ignoredDevices array field at platform root level
  • Stores device UUIDs centrally instead of per-device config

4. Updated Platform Logic (lib/platform.js)

  • Added case to read ignoredDevices array from config
  • Devices in array are properly excluded from HomeKit

Benefits

  • Easier to use - Click checkbox instead of editing JSON
  • Works for all devices - Regardless of connection type (cloud/local/hybrid)
  • Visual feedback - Checkbox shows current state
  • Type agnostic - Central list works for all 12 device types
  • Backward compatible - Existing ignoreDevice still works

Testing

  • ✅ Checkbox appears for all devices with valid UUID
  • ✅ Checkbox reflects current hidden state
  • ✅ Config persists after save
  • ✅ Devices hidden from HomeKit after restart
  • ✅ Works with cloud, local, and hybrid connections

Documentation

See HIDE_DEVICES_FEATURE.md for comprehensive
implementation details.

Backward Compatibility

Fully backward compatible - no breaking changes. Existing configs continue to work.

burtherman and others added 4 commits December 9, 2025 07:46
- Remove restrictive conditions that hide ignoreDevice checkbox
- Allow hiding devices regardless of connection type or deviceUrl
- Fixes issue where cloud devices with local IPs can't be hidden
- Updated 11 device types: single, multi, light, fan, diffuser, purifier, humidifier, thermostat, garage, roller, and baby devices

🤖 Generated with Claude Code
This commit adds the ability to hide devices from HomeKit directly through
the "My Devices" tab in the Homebridge Config UI.

Changes:
- config.schema.json:
  * Simplified ignoreDevice visibility conditions for all 11 device types
  * Removed restrictions that hid the option when deviceUrl was set
  * Added ignoredDevices array field to schema for proper config persistence

- lib/homebridge-ui/public/index.html:
  * Added "Hide from HomeKit" checkbox to device info table in My Devices tab
  * Implemented checkbox toggle logic to add/remove devices from ignoredDevices array
  * Added automatic switch to Settings tab after checkbox change
  * Integrated with Homebridge save button workflow

- lib/platform.js:
  * Added support for reading root-level ignoredDevices array from config
  * Devices in ignoredDevices array are now properly excluded from HomeKit

Benefits:
- No need to manually type device UUIDs
- Works for all devices regardless of connection type (cloud/local/hybrid)
- Intuitive UI with immediate visual feedback
- Follows standard Homebridge save workflow

Usage:
1. Open plugin settings → My Devices tab
2. Select device → Check "Hide from HomeKit"
3. Click Save in Settings tab
4. Restart Homebridge
5. Device is hidden from HomeKit

🤖 Generated with Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant