homebridge-multiple-switch 1.6.0-beta.8 → 1.6.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 +28 -50
- package/index.js +3 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,63 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [1.6.0
|
|
4
|
-
|
|
5
|
-
### Fixed
|
|
6
|
-
- Homebridge v2 compatibility — plugin now shows green checkmark in v2 readiness check
|
|
7
|
-
- Switch ordering in HomeKit now follows config order using ServiceLabelIndex
|
|
8
|
-
|
|
9
|
-
### Changed
|
|
10
|
-
- Master switch type now defaults to Switch instead of Outlet (both UI and backend)
|
|
11
|
-
|
|
12
|
-
## [1.6.0-beta.5] - 2026-03-21
|
|
13
|
-
|
|
14
|
-
### Fixed
|
|
15
|
-
- Switch names now correctly appear in HomeKit — services are recreated on each
|
|
16
|
-
start with fresh displayName, Name, and ConfiguredName (cached services kept
|
|
17
|
-
stale names from initial creation)
|
|
18
|
-
- Master switch now always appears first in HomeKit — all subtype services are
|
|
19
|
-
removed and recreated in correct order (master first, then switches)
|
|
20
|
-
|
|
21
|
-
### Changed
|
|
22
|
-
- Master switch type selector now inline with the toggle (same row)
|
|
23
|
-
|
|
24
|
-
## [1.6.0-beta.4] - 2026-03-21
|
|
3
|
+
## [1.6.0] - 2026-03-22
|
|
25
4
|
|
|
26
5
|
### Added
|
|
27
|
-
-
|
|
28
|
-
|
|
6
|
+
- Multi-device support: create multiple separate HomeKit accessories, each with
|
|
7
|
+
its own name, switch behavior mode, and set of switches
|
|
8
|
+
- `devices` array in config — each device becomes a separate accessory in HomeKit
|
|
9
|
+
- Master Switch option (available in Independent mode): adds an extra switch
|
|
10
|
+
that turns all switches on or off at once
|
|
11
|
+
- Master switch type selection (Switch or Outlet)
|
|
12
|
+
- Collapsible device and switch cards in config UI with chevron animation
|
|
13
|
+
- Summary info shown when collapsed (switch count for devices, type/delay for switches)
|
|
14
|
+
- i18n localization with 14 languages: English, Turkish, German, French, Spanish,
|
|
15
|
+
Portuguese, Italian, Russian, Chinese (Simplified), Japanese, Korean, Polish,
|
|
16
|
+
Dutch, Arabic
|
|
17
|
+
- Custom UI (`homebridge-ui/public/`) with `homebridge.i18nCurrentLang()` for
|
|
18
|
+
proper language detection
|
|
19
|
+
- Descriptions for both switch behavior modes (Independent / Single)
|
|
20
|
+
- ConfiguredName characteristic for correct switch names in HomeKit
|
|
21
|
+
- Homebridge v2 compatibility (`^2.0.0-beta.0` in engines)
|
|
29
22
|
|
|
30
23
|
### Changed
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
- Switch behavior now has two modes: Independent and Single (removed Master mode)
|
|
25
|
+
- Master switch type defaults to Switch instead of Outlet
|
|
26
|
+
- All devices and switches start collapsed when config UI is opened
|
|
27
|
+
- Services are recreated on each start to ensure fresh names in HomeKit
|
|
35
28
|
|
|
36
29
|
### Fixed
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
### Fixed
|
|
44
|
-
- Master Switch now available in Independent mode (was incorrectly in Single mode)
|
|
45
|
-
- Behavior description now appears below the select dropdown instead of above
|
|
46
|
-
|
|
47
|
-
## [1.6.0-beta.1] - 2026-03-21
|
|
30
|
+
- Dark mode: custom `--ui-*` CSS variables with `@media (prefers-color-scheme: dark)`
|
|
31
|
+
for reliable theme support inside iframe
|
|
32
|
+
- Switch names now correctly appear in HomeKit (cached services kept stale names)
|
|
33
|
+
- Backward compatibility: old configs with `switches` at root level auto-migrate
|
|
34
|
+
to `devices` format
|
|
48
35
|
|
|
49
36
|
### Removed
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Changed
|
|
54
|
-
- Switch behavior now only has two modes: Independent and Single
|
|
55
|
-
- Added descriptions to both behavior modes explaining how they work
|
|
56
|
-
|
|
57
|
-
### Added
|
|
58
|
-
- Master Switch option (available in Single mode only): adds an extra switch
|
|
59
|
-
that turns all switches on or off at once
|
|
60
|
-
- New i18n keys for behavior descriptions, master switch label/description
|
|
37
|
+
- Lightbulb and Fan switch types (HomeKit natively converts switches to these)
|
|
38
|
+
- Master behavior mode (replaced by Master Switch option in Independent mode)
|
|
61
39
|
|
|
62
40
|
## [1.5.1] - 2026-03-21
|
|
63
41
|
|
package/index.js
CHANGED
|
@@ -113,32 +113,16 @@ class MultipleSwitchPlatform {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
reconcileServices(accessory, device, switches, services, hasMaster) {
|
|
116
|
-
// Remove ALL existing subtype services (ensures fresh names
|
|
116
|
+
// Remove ALL existing subtype services (ensures fresh names)
|
|
117
117
|
const subtypeServices = accessory.services.filter((s) => s.subtype);
|
|
118
118
|
subtypeServices.forEach((s) => accessory.removeService(s));
|
|
119
119
|
|
|
120
|
-
//
|
|
121
|
-
const existingLabel = accessory.services.find(
|
|
122
|
-
(s) => s.UUID === this.Service.ServiceLabel.UUID
|
|
123
|
-
);
|
|
124
|
-
if (existingLabel) accessory.removeService(existingLabel);
|
|
125
|
-
|
|
126
|
-
const labelService = accessory.addService(this.Service.ServiceLabel);
|
|
127
|
-
labelService.setCharacteristic(
|
|
128
|
-
this.Characteristic.ServiceLabelNamespace,
|
|
129
|
-
this.Characteristic.ServiceLabelNamespace.ARABIC_NUMERALS
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
let labelIndex = 1;
|
|
133
|
-
|
|
134
|
-
// 1. Create master switch FIRST if enabled (appears at top in HomeKit)
|
|
120
|
+
// Create master switch if enabled
|
|
135
121
|
if (hasMaster) {
|
|
136
122
|
const MasterServiceClass = this.getServiceClass(device.masterSwitchType || 'switch');
|
|
137
123
|
const masterService = accessory.addService(MasterServiceClass, 'Master', MASTER_SUBTYPE);
|
|
138
124
|
|
|
139
125
|
this.setServiceName(masterService, 'Master');
|
|
140
|
-
masterService.addOptionalCharacteristic(this.Characteristic.ServiceLabelIndex);
|
|
141
|
-
masterService.setCharacteristic(this.Characteristic.ServiceLabelIndex, labelIndex++);
|
|
142
126
|
this.configureMasterHandler(accessory, masterService, services);
|
|
143
127
|
|
|
144
128
|
services.set(MASTER_SUBTYPE, masterService);
|
|
@@ -148,7 +132,7 @@ class MultipleSwitchPlatform {
|
|
|
148
132
|
}
|
|
149
133
|
}
|
|
150
134
|
|
|
151
|
-
//
|
|
135
|
+
// Create regular switches
|
|
152
136
|
switches.forEach((sw, index) => {
|
|
153
137
|
const subtype = `switch_${index}`;
|
|
154
138
|
|
|
@@ -156,8 +140,6 @@ class MultipleSwitchPlatform {
|
|
|
156
140
|
const service = accessory.addService(ServiceClass, sw.name, subtype);
|
|
157
141
|
|
|
158
142
|
this.setServiceName(service, sw.name);
|
|
159
|
-
service.addOptionalCharacteristic(this.Characteristic.ServiceLabelIndex);
|
|
160
|
-
service.setCharacteristic(this.Characteristic.ServiceLabelIndex, labelIndex++);
|
|
161
143
|
this.configureSwitchHandlers(accessory, service, sw, subtype, services);
|
|
162
144
|
|
|
163
145
|
services.set(subtype, service);
|
package/package.json
CHANGED