@switchbot/homebridge-switchbot 1.7.1-beta.7 → 1.7.1-beta.8

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.
Files changed (2) hide show
  1. package/config.schema.json +41 -28
  2. package/package.json +1 -1
@@ -11,8 +11,7 @@
11
11
  "name": {
12
12
  "type": "string",
13
13
  "title": "Name",
14
- "default": "SwitchBot",
15
- "required": true
14
+ "default": "SwitchBot"
16
15
  },
17
16
  "credentials": {
18
17
  "type": "object",
@@ -20,7 +19,6 @@
20
19
  "openToken": {
21
20
  "title": "Token",
22
21
  "type": "string",
23
- "required": true,
24
22
  "x-schema-form": {
25
23
  "type": "password"
26
24
  }
@@ -28,10 +26,13 @@
28
26
  "notice": {
29
27
  "title": "Notice",
30
28
  "type": "string",
31
- "required": true,
32
29
  "default": "Keep your token a secret!"
33
30
  }
34
- }
31
+ },
32
+ "required": [
33
+ "openToken",
34
+ "notice"
35
+ ]
35
36
  },
36
37
  "options": {
37
38
  "type": "object",
@@ -141,7 +142,7 @@
141
142
  }
142
143
  },
143
144
  "scanDuration": {
144
- "title": "Scan Duration (Default is 1 Second)",
145
+ "title": "BLE Scan Duration (Default is 1 Second)",
145
146
  "type": "number",
146
147
  "placeholder": 1,
147
148
  "condition": {
@@ -485,8 +486,14 @@
485
486
  "functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].deviceId && !model.options.devices[arrayIndices].hide_device && model.options.devices[arrayIndices].configDeviceType);"
486
487
  }
487
488
  }
488
- }
489
- }
489
+ },
490
+ "required": [
491
+ "deviceId",
492
+ "configDeviceType",
493
+ "configDeviceName"
494
+ ]
495
+ },
496
+ "uniqueItems": true
490
497
  },
491
498
  "irdevices": {
492
499
  "type": "array",
@@ -804,11 +811,16 @@
804
811
  }
805
812
  ],
806
813
  "condition": {
807
- "functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device);"
814
+ "functionBody": "return (model.options && model.options.irdevices && model.options.irdevices[arrayIndices].deviceId && !model.options.irdevices[arrayIndices].hide_device && model.options.irdevices[arrayIndices].configRemoteType);"
808
815
  }
809
816
  }
810
- }
811
- }
817
+ },
818
+ "required": [
819
+ "deviceId",
820
+ "configRemoteType"
821
+ ]
822
+ },
823
+ "uniqueItems": true
812
824
  },
813
825
  "refreshRate": {
814
826
  "title": "Refresh Rate",
@@ -849,7 +861,10 @@
849
861
  }
850
862
  }
851
863
  }
852
- }
864
+ },
865
+ "required": [
866
+ "name"
867
+ ]
853
868
  },
854
869
  "layout": [
855
870
  {
@@ -862,20 +877,19 @@
862
877
  ]
863
878
  },
864
879
  {
865
- "key": "options.devices",
866
- "notitle": false,
867
- "add": "Add Another Device",
868
880
  "type": "fieldset",
869
881
  "title": "Optional SwitchBot Device Settings",
870
882
  "expandable": true,
871
883
  "expanded": false,
872
- "orderable": false,
873
- "buttonText": "Add Device",
874
884
  "items": [
875
885
  {
876
- "type": "div",
877
- "displayFlex": true,
878
- "flex-direction": "column",
886
+ "key": "options.devices",
887
+ "notitle": false,
888
+ "type": "tabarray",
889
+ "title": "{{ value.configDeviceName || value.deviceId || 'New SwitchBot Device' }}",
890
+ "expandable": true,
891
+ "expanded": false,
892
+ "orderable": false,
879
893
  "items": [
880
894
  "options.devices[].configDeviceName",
881
895
  "options.devices[].deviceId",
@@ -915,20 +929,19 @@
915
929
  ]
916
930
  },
917
931
  {
918
- "key": "options.irdevices",
919
- "notitle": false,
920
- "add": "Add Another IR Device",
921
932
  "type": "fieldset",
922
933
  "title": "Optional IR Device Settings",
923
934
  "expandable": true,
924
935
  "expanded": false,
925
- "orderable": false,
926
- "buttonText": "Add IR Device",
927
936
  "items": [
928
937
  {
929
- "type": "div",
930
- "displayFlex": true,
931
- "flex-direction": "column",
938
+ "key": "options.irdevices",
939
+ "notitle": false,
940
+ "type": "tabarray",
941
+ "title": "{{ value.configDeviceName || value.deviceId || 'New IR Device' }}",
942
+ "expandable": true,
943
+ "expanded": false,
944
+ "orderable": false,
932
945
  "items": [
933
946
  "options.irdevices[].deviceId",
934
947
  "options.irdevices[].hide_device",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge SwitchBot",
3
3
  "name": "@switchbot/homebridge-switchbot",
4
- "version": "1.7.1-beta.7",
4
+ "version": "1.7.1-beta.8",
5
5
  "description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",
6
6
  "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",
7
7
  "license": "ISC",