homebridge-multiple-switch 1.6.0-beta.5 → 1.6.0-beta.7
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 +5 -0
- package/homebridge-ui/public/index.html +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -414,8 +414,8 @@
|
|
|
414
414
|
</div>
|
|
415
415
|
${dev.masterSwitch ? `
|
|
416
416
|
<select class="master-type-field" data-dev="${di}" style="width:auto;min-width:120px;flex-shrink:0">
|
|
417
|
-
<option value="switch" ${dev.masterSwitchType === 'switch' ? 'selected' : ''}>${t.typeSwitch || 'Switch'}</option>
|
|
418
|
-
<option value="outlet" ${dev.masterSwitchType === 'outlet'
|
|
417
|
+
<option value="switch" ${dev.masterSwitchType === 'switch' || !dev.masterSwitchType ? 'selected' : ''}>${t.typeSwitch || 'Switch'}</option>
|
|
418
|
+
<option value="outlet" ${dev.masterSwitchType === 'outlet' ? 'selected' : ''}>${t.typeOutlet || 'Outlet'}</option>
|
|
419
419
|
</select>
|
|
420
420
|
` : ''}
|
|
421
421
|
</div>
|
package/index.js
CHANGED
|
@@ -119,7 +119,7 @@ class MultipleSwitchPlatform {
|
|
|
119
119
|
|
|
120
120
|
// 1. Create master switch FIRST if enabled (appears at top in HomeKit)
|
|
121
121
|
if (hasMaster) {
|
|
122
|
-
const MasterServiceClass = this.getServiceClass(device.masterSwitchType);
|
|
122
|
+
const MasterServiceClass = this.getServiceClass(device.masterSwitchType || 'switch');
|
|
123
123
|
const masterService = accessory.addService(MasterServiceClass, 'Master', MASTER_SUBTYPE);
|
|
124
124
|
|
|
125
125
|
this.setServiceName(masterService, 'Master');
|
package/package.json
CHANGED