@switchbot/homebridge-switchbot 3.6.1-beta.13 → 3.6.1-beta.15

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 (126) hide show
  1. package/dist/device/blindtilt.d.ts.map +1 -1
  2. package/dist/device/blindtilt.js +3 -12
  3. package/dist/device/blindtilt.js.map +1 -1
  4. package/dist/device/bot.d.ts.map +1 -1
  5. package/dist/device/bot.js +11 -44
  6. package/dist/device/bot.js.map +1 -1
  7. package/dist/device/ceilinglight.d.ts.map +1 -1
  8. package/dist/device/ceilinglight.js +1 -4
  9. package/dist/device/ceilinglight.js.map +1 -1
  10. package/dist/device/colorbulb.d.ts.map +1 -1
  11. package/dist/device/colorbulb.js +1 -4
  12. package/dist/device/colorbulb.js.map +1 -1
  13. package/dist/device/contact.d.ts.map +1 -1
  14. package/dist/device/contact.js +4 -16
  15. package/dist/device/contact.js.map +1 -1
  16. package/dist/device/curtain.d.ts.map +1 -1
  17. package/dist/device/curtain.js +3 -12
  18. package/dist/device/curtain.js.map +1 -1
  19. package/dist/device/device.d.ts +0 -9
  20. package/dist/device/device.d.ts.map +1 -1
  21. package/dist/device/device.js +6 -40
  22. package/dist/device/device.js.map +1 -1
  23. package/dist/device/fan.d.ts.map +1 -1
  24. package/dist/device/fan.js +3 -12
  25. package/dist/device/fan.js.map +1 -1
  26. package/dist/device/hub.d.ts.map +1 -1
  27. package/dist/device/hub.js +3 -12
  28. package/dist/device/hub.js.map +1 -1
  29. package/dist/device/humidifier.d.ts.map +1 -1
  30. package/dist/device/humidifier.js +2 -8
  31. package/dist/device/humidifier.js.map +1 -1
  32. package/dist/device/iosensor.d.ts.map +1 -1
  33. package/dist/device/iosensor.js +3 -12
  34. package/dist/device/iosensor.js.map +1 -1
  35. package/dist/device/lightstrip.d.ts.map +1 -1
  36. package/dist/device/lightstrip.js +1 -4
  37. package/dist/device/lightstrip.js.map +1 -1
  38. package/dist/device/lock.d.ts.map +1 -1
  39. package/dist/device/lock.js +4 -16
  40. package/dist/device/lock.js.map +1 -1
  41. package/dist/device/meter.d.ts.map +1 -1
  42. package/dist/device/meter.js +3 -12
  43. package/dist/device/meter.js.map +1 -1
  44. package/dist/device/meterplus.d.ts.map +1 -1
  45. package/dist/device/meterplus.js +3 -12
  46. package/dist/device/meterplus.js.map +1 -1
  47. package/dist/device/motion.d.ts.map +1 -1
  48. package/dist/device/motion.js +3 -13
  49. package/dist/device/motion.js.map +1 -1
  50. package/dist/device/plug.d.ts.map +1 -1
  51. package/dist/device/plug.js +1 -4
  52. package/dist/device/plug.js.map +1 -1
  53. package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
  54. package/dist/device/robotvacuumcleaner.js +2 -8
  55. package/dist/device/robotvacuumcleaner.js.map +1 -1
  56. package/dist/device/waterdetector.d.ts.map +1 -1
  57. package/dist/device/waterdetector.js +2 -8
  58. package/dist/device/waterdetector.js.map +1 -1
  59. package/dist/irdevice/airconditioner.d.ts.map +1 -1
  60. package/dist/irdevice/airconditioner.js +2 -8
  61. package/dist/irdevice/airconditioner.js.map +1 -1
  62. package/dist/irdevice/airpurifier.d.ts.map +1 -1
  63. package/dist/irdevice/airpurifier.js +2 -8
  64. package/dist/irdevice/airpurifier.js.map +1 -1
  65. package/dist/irdevice/camera.d.ts.map +1 -1
  66. package/dist/irdevice/camera.js +1 -4
  67. package/dist/irdevice/camera.js.map +1 -1
  68. package/dist/irdevice/fan.d.ts.map +1 -1
  69. package/dist/irdevice/fan.js +1 -4
  70. package/dist/irdevice/fan.js.map +1 -1
  71. package/dist/irdevice/irdevice.d.ts +0 -9
  72. package/dist/irdevice/irdevice.d.ts.map +1 -1
  73. package/dist/irdevice/irdevice.js +6 -33
  74. package/dist/irdevice/irdevice.js.map +1 -1
  75. package/dist/irdevice/light.d.ts.map +1 -1
  76. package/dist/irdevice/light.js +3 -12
  77. package/dist/irdevice/light.js.map +1 -1
  78. package/dist/irdevice/other.d.ts.map +1 -1
  79. package/dist/irdevice/other.js +20 -50
  80. package/dist/irdevice/other.js.map +1 -1
  81. package/dist/irdevice/tv.d.ts.map +1 -1
  82. package/dist/irdevice/tv.js +3 -12
  83. package/dist/irdevice/tv.js.map +1 -1
  84. package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
  85. package/dist/irdevice/vacuumcleaner.js +1 -4
  86. package/dist/irdevice/vacuumcleaner.js.map +1 -1
  87. package/dist/irdevice/waterheater.js +1 -1
  88. package/dist/irdevice/waterheater.js.map +1 -1
  89. package/dist/platform.d.ts +8 -0
  90. package/dist/platform.d.ts.map +1 -1
  91. package/dist/platform.js +297 -81
  92. package/dist/platform.js.map +1 -1
  93. package/dist/settings.d.ts +1 -1
  94. package/dist/settings.d.ts.map +1 -1
  95. package/package.json +1 -1
  96. package/src/device/blindtilt.ts +3 -15
  97. package/src/device/bot.ts +11 -55
  98. package/src/device/ceilinglight.ts +1 -5
  99. package/src/device/colorbulb.ts +1 -5
  100. package/src/device/contact.ts +4 -20
  101. package/src/device/curtain.ts +3 -15
  102. package/src/device/device.ts +6 -46
  103. package/src/device/fan.ts +3 -15
  104. package/src/device/hub.ts +3 -15
  105. package/src/device/humidifier.ts +2 -10
  106. package/src/device/iosensor.ts +3 -15
  107. package/src/device/lightstrip.ts +1 -5
  108. package/src/device/lock.ts +4 -20
  109. package/src/device/meter.ts +4 -16
  110. package/src/device/meterplus.ts +4 -16
  111. package/src/device/motion.ts +4 -17
  112. package/src/device/plug.ts +1 -5
  113. package/src/device/robotvacuumcleaner.ts +2 -10
  114. package/src/device/waterdetector.ts +2 -10
  115. package/src/irdevice/airconditioner.ts +2 -10
  116. package/src/irdevice/airpurifier.ts +2 -10
  117. package/src/irdevice/camera.ts +1 -5
  118. package/src/irdevice/fan.ts +1 -5
  119. package/src/irdevice/irdevice.ts +6 -39
  120. package/src/irdevice/light.ts +3 -15
  121. package/src/irdevice/other.ts +20 -60
  122. package/src/irdevice/tv.ts +3 -15
  123. package/src/irdevice/vacuumcleaner.ts +1 -5
  124. package/src/irdevice/waterheater.ts +1 -1
  125. package/src/platform.ts +302 -81
  126. package/src/settings.ts +1 -1
@@ -87,12 +87,8 @@ export class Others extends irdeviceBase {
87
87
  accessory.category = this.hap.Categories.SWITCH;
88
88
  // Initialize Switch Service
89
89
  accessory.context.Switch = accessory.context.Switch ?? {};
90
- if (accessory.context.Switch.Name) {
91
- accessory.context.Switch.Name = this.validateAndCleanString(accessory.context.Switch.Name,
92
- 'Switch Name', accessory.context.Switch.Name);
93
- }
94
90
  this.Switch = {
95
- Name: accessory.context.Switch.Name ?? accessory.displayName,
91
+ Name: accessory.displayName,
96
92
  Service: accessory.getService(this.hap.Service.Switch) ?? accessory.addService(this.hap.Service.Switch) as Service,
97
93
  };
98
94
  accessory.context.Switch = this.Switch as object;
@@ -117,12 +113,8 @@ export class Others extends irdeviceBase {
117
113
  accessory.category = this.hap.Categories.GARAGE_DOOR_OPENER;
118
114
  // Initialize GarageDoor Service
119
115
  accessory.context.GarageDoor = accessory.context.GarageDoor ?? {};
120
- if (accessory.context.GarageDoor.Name) {
121
- accessory.context.GarageDoor.Name = this.validateAndCleanString(accessory.context.GarageDoor.Name,
122
- 'GarageDoor Name', accessory.context.GarageDoor.Name);
123
- }
124
116
  this.GarageDoor = {
125
- Name: accessory.context.GarageDoor.Name ?? accessory.displayName,
117
+ Name: accessory.displayName,
126
118
  Service: accessory.getService(this.hap.Service.GarageDoorOpener) ?? accessory.addService(this.hap.Service.GarageDoorOpener) as Service,
127
119
  };
128
120
  accessory.context.GarageDoor = this.GarageDoor as object;
@@ -154,12 +146,8 @@ export class Others extends irdeviceBase {
154
146
  accessory.category = this.hap.Categories.DOOR;
155
147
  // Initialize Door Service
156
148
  accessory.context.Door = accessory.context.Door ?? {};
157
- if (accessory.context.Door.Name) {
158
- accessory.context.Door.Name = this.validateAndCleanString(accessory.context.Door.Name,
159
- 'Door Name', accessory.context.Door.Name);
160
- }
161
149
  this.Door = {
162
- Name: accessory.context.Door.Name ?? accessory.displayName,
150
+ Name: accessory.displayName,
163
151
  Service: accessory.getService(this.hap.Service.Door) ?? accessory.addService(this.hap.Service.Door) as Service,
164
152
  };
165
153
  accessory.context.Door = this.Door as object;
@@ -190,12 +178,8 @@ export class Others extends irdeviceBase {
190
178
  accessory.category = this.hap.Categories.WINDOW;
191
179
  // Initialize Window Service
192
180
  accessory.context.Window = accessory.context.Window ?? {};
193
- if (accessory.context.Window.Name) {
194
- accessory.context.Window.Name = this.validateAndCleanString(accessory.context.Window.Name,
195
- 'Window Name', accessory.context.Window.Name);
196
- }
197
181
  this.Window = {
198
- Name: accessory.context.Window.Name ?? accessory.displayName,
182
+ Name: accessory.displayName,
199
183
  Service: accessory.getService(this.hap.Service.Window) ?? accessory.addService(this.hap.Service.Window) as Service,
200
184
  };
201
185
  accessory.context.Window = this.Window as object;
@@ -226,12 +210,8 @@ export class Others extends irdeviceBase {
226
210
  accessory.category = this.hap.Categories.WINDOW_COVERING;
227
211
  // Initialize WindowCovering Service
228
212
  accessory.context.WindowCovering = accessory.context.WindowCovering ?? {};
229
- if (accessory.context.WindowCovering.Name) {
230
- accessory.context.WindowCovering.Name = this.validateAndCleanString(accessory.context.WindowCovering.Name,
231
- 'WindowCovering Name', accessory.context.WindowCovering.Name);
232
- }
233
213
  this.WindowCovering = {
234
- Name: accessory.context.WindowCovering.Name ?? accessory.displayName,
214
+ Name: accessory.displayName,
235
215
  Service: accessory.getService(this.hap.Service.WindowCovering) ?? accessory.addService(this.hap.Service.WindowCovering) as Service,
236
216
  };
237
217
  accessory.context.WindowCovering = this.WindowCovering as object;
@@ -263,12 +243,8 @@ export class Others extends irdeviceBase {
263
243
  accessory.category = this.hap.Categories.DOOR_LOCK;
264
244
  // Initialize Lock Service
265
245
  accessory.context.LockMechanism = accessory.context.LockMechanism ?? {};
266
- if (accessory.context.LockMechanism.Name) {
267
- accessory.context.LockMechanism.Name = this.validateAndCleanString(accessory.context.LockMechanism.Name,
268
- 'LockMechanism Name', accessory.context.LockMechanism.Name);
269
- }
270
246
  this.LockMechanism = {
271
- Name: accessory.context.LockMechanism.Name ?? accessory.displayName,
247
+ Name: accessory.displayName,
272
248
  Service: accessory.getService(this.hap.Service.LockMechanism) ?? accessory.addService(this.hap.Service.LockMechanism) as Service,
273
249
  };
274
250
  accessory.context.LockMechanism = this.LockMechanism as object;
@@ -294,12 +270,8 @@ export class Others extends irdeviceBase {
294
270
  accessory.category = this.hap.Categories.FAUCET;
295
271
  // Initialize Faucet Service
296
272
  accessory.context.Faucet = accessory.context.Faucet ?? {};
297
- if (accessory.context.Faucet.Name) {
298
- accessory.context.Faucet.Name = this.validateAndCleanString(accessory.context.Faucet.Name,
299
- 'Faucet Name', accessory.context.Faucet.Name);
300
- }
301
273
  this.Faucet = {
302
- Name: accessory.context.Faucet.Name ?? accessory.displayName,
274
+ Name: accessory.displayName,
303
275
  Service: accessory.getService(this.hap.Service.Faucet) ?? accessory.addService(this.hap.Service.Faucet) as Service,
304
276
  };
305
277
  accessory.context.Faucet = this.Faucet as object;
@@ -324,12 +296,8 @@ export class Others extends irdeviceBase {
324
296
  accessory.category = this.hap.Categories.FAN;
325
297
  // Initialize Fan Service
326
298
  accessory.context.Fan = accessory.context.Fan ?? {};
327
- if (accessory.context.Fan.Name) {
328
- accessory.context.Fan.Name = this.validateAndCleanString(accessory.context.Fan.Name,
329
- 'Fan Name', accessory.context.Fan.Name);
330
- }
331
299
  this.Fan = {
332
- Name: accessory.context.Fan.Name ?? accessory.displayName,
300
+ Name: accessory.displayName,
333
301
  Service: accessory.getService(this.hap.Service.Fanv2) ?? accessory.addService(this.hap.Service.Fanv2) as Service,
334
302
  };
335
303
  accessory.context.Fan = this.Fan as object;
@@ -354,12 +322,8 @@ export class Others extends irdeviceBase {
354
322
  accessory.category = this.hap.Categories.PROGRAMMABLE_SWITCH;
355
323
  // Initialize StatefulProgrammableSwitch Service
356
324
  accessory.context.StatefulProgrammableSwitch = accessory.context.StatefulProgrammableSwitch ?? {};
357
- if (accessory.context.StatefulProgrammableSwitch.Name) {
358
- accessory.context.StatefulProgrammableSwitch.Name = this.validateAndCleanString(accessory.context.StatefulProgrammableSwitch.Name,
359
- 'StatefulProgrammableSwitch Name', accessory.context.StatefulProgrammableSwitch.Name);
360
- }
361
325
  this.StatefulProgrammableSwitch = {
362
- Name: accessory.context.StatefulProgrammableSwitch.Name ?? accessory.displayName,
326
+ Name: accessory.displayName,
363
327
  Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch)
364
328
  ?? accessory.addService(this.hap.Service.StatefulProgrammableSwitch) as Service,
365
329
  };
@@ -385,12 +349,8 @@ export class Others extends irdeviceBase {
385
349
  accessory.category = this.hap.Categories.OUTLET;
386
350
  // Initialize Switch property
387
351
  accessory.context.Outlet = accessory.context.Outlet ?? {};
388
- if (accessory.context.Outlet.Name) {
389
- accessory.context.Outlet.Name = this.validateAndCleanString(accessory.context.Outlet.Name,
390
- 'Outlet Name', accessory.context.Outlet.Name);
391
- }
392
352
  this.Outlet = {
393
- Name: accessory.context.Outlet.Name ?? accessory.displayName,
353
+ Name: accessory.displayName,
394
354
  Service: accessory.getService(this.hap.Service.Outlet) ?? accessory.addService(this.hap.Service.Outlet) as Service,
395
355
  };
396
356
  accessory.context.Outlet = this.Outlet as object;
@@ -753,7 +713,7 @@ export class Others extends irdeviceBase {
753
713
  // If Outlet.Service still present, then remove first
754
714
  accessory.context.Outlet = accessory.context.Outlet ?? {};
755
715
  this.Outlet = {
756
- Name: accessory.context.Outlet.Name ?? `${accessory.displayName} Outlet`,
716
+ Name: accessory.displayName,
757
717
  Service: accessory.getService(this.hap.Service.Outlet) as Service,
758
718
  };
759
719
  accessory.context.Outlet = this.Outlet as object;
@@ -765,7 +725,7 @@ export class Others extends irdeviceBase {
765
725
  // If GarageDoor.Service still present, then remove first
766
726
  accessory.context.GarageDoor = accessory.context.GarageDoor ?? {};
767
727
  this.GarageDoor = {
768
- Name: accessory.context.GarageDoor.Name ?? `${accessory.displayName} Garage Door`,
728
+ Name: accessory.displayName,
769
729
  Service: accessory.getService(this.hap.Service.GarageDoorOpener) as Service,
770
730
  };
771
731
  accessory.context.GarageDoor = this.GarageDoor as object;
@@ -777,7 +737,7 @@ export class Others extends irdeviceBase {
777
737
  // If Door.Service still present, then remove first
778
738
  accessory.context.Door = accessory.context.Door ?? {};
779
739
  this.Door = {
780
- Name: accessory.context.Door.Name ?? `${accessory.displayName} Door`,
740
+ Name: accessory.displayName,
781
741
  Service: accessory.getService(this.hap.Service.Door) as Service,
782
742
  };
783
743
  accessory.context.Door = this.Door as object;
@@ -789,7 +749,7 @@ export class Others extends irdeviceBase {
789
749
  // If Lock.Service still present, then remove first
790
750
  accessory.context.LockMechanism = accessory.context.LockMechanism ?? {};
791
751
  this.LockMechanism = {
792
- Name: accessory.context.LockMechanism.Name ?? `${accessory.displayName} Lock`,
752
+ Name: accessory.displayName,
793
753
  Service: accessory.getService(this.hap.Service.LockMechanism) as Service,
794
754
  };
795
755
  accessory.context.LockMechanism = this.LockMechanism as object;
@@ -801,7 +761,7 @@ export class Others extends irdeviceBase {
801
761
  // If Faucet.Service still present, then remove first
802
762
  accessory.context.Faucet = accessory.context.Faucet ?? {};
803
763
  this.Faucet = {
804
- Name: accessory.context.Faucet.Name ?? `${accessory.displayName} Faucet`,
764
+ Name: accessory.displayName,
805
765
  Service: accessory.getService(this.hap.Service.Faucet) as Service,
806
766
  };
807
767
  accessory.context.Faucet = this.Faucet as object;
@@ -813,7 +773,7 @@ export class Others extends irdeviceBase {
813
773
  // If Fan Service still present, then remove first
814
774
  accessory.context.Fan = accessory.context.Fan ?? {};
815
775
  this.Fan = {
816
- Name: accessory.context.Fan.Name ?? `${accessory.displayName} Fan`,
776
+ Name: accessory.displayName,
817
777
  Service: accessory.getService(this.hap.Service.Fanv2) as Service,
818
778
  };
819
779
  accessory.context.Fan = this.Fan as object;
@@ -825,7 +785,7 @@ export class Others extends irdeviceBase {
825
785
  // If Window.Service still present, then remove first
826
786
  accessory.context.Window = accessory.context.Window ?? {};
827
787
  this.Window = {
828
- Name: accessory.context.Window.Name ?? `${accessory.displayName} Window`,
788
+ Name: accessory.displayName,
829
789
  Service: accessory.getService(this.hap.Service.Window) as Service,
830
790
  };
831
791
  accessory.context.Window = this.Window as object;
@@ -837,7 +797,7 @@ export class Others extends irdeviceBase {
837
797
  // If WindowCovering.Service still present, then remove first
838
798
  accessory.context.WindowCovering = accessory.context.WindowCovering ?? {};
839
799
  this.WindowCovering = {
840
- Name: accessory.context.WindowCovering.Name ?? `${accessory.displayName} Window Covering`,
800
+ Name: accessory.displayName,
841
801
  Service: accessory.getService(this.hap.Service.WindowCovering) as Service,
842
802
  };
843
803
  accessory.context.WindowCovering = this.WindowCovering as object;
@@ -849,7 +809,7 @@ export class Others extends irdeviceBase {
849
809
  // If StatefulProgrammableSwitch.Service still present, then remove first
850
810
  accessory.context.StatefulProgrammableSwitch = accessory.context.StatefulProgrammableSwitch ?? {};
851
811
  this.StatefulProgrammableSwitch = {
852
- Name: accessory.context.StatefulProgrammableSwitch.Name ?? `${accessory.displayName} Stateful Programmable Switch`,
812
+ Name: accessory.displayName,
853
813
  Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch) as Service,
854
814
  };
855
815
  accessory.context.StatefulProgrammableSwitch = this.StatefulProgrammableSwitch as object;
@@ -861,7 +821,7 @@ export class Others extends irdeviceBase {
861
821
  // If Switch.Service still present, then remove first
862
822
  accessory.context.Switch = accessory.context.Switch ?? {};
863
823
  this.Switch = {
864
- Name: accessory.context.Switch.Name ?? `${accessory.displayName} Switch`,
824
+ Name: accessory.displayName,
865
825
  Service: accessory.getService(this.hap.Service.Switch) as Service,
866
826
  };
867
827
  accessory.context.Switch = this.Switch as object;
@@ -45,17 +45,9 @@ export class TV extends irdeviceBase {
45
45
 
46
46
  // Initialize Television Service
47
47
  accessory.context.Television = accessory.context.Television ?? {};
48
- if (accessory.context.Television.Name) {
49
- accessory.context.Television.Name = this.validateAndCleanString(accessory.context.Television.Name,
50
- 'Television Name', accessory.context.Television.Name);
51
- }
52
- if (accessory.context.Television.ConfiguredName) {
53
- accessory.context.Television.ConfiguredName = this.validateAndCleanString(accessory.context.Television.ConfiguredName,
54
- 'Television ConfiguredName', accessory.context.Television.ConfiguredName);
55
- }
56
48
  this.Television = {
57
- Name: accessory.context.Television.Name ?? `${accessory.displayName} ${device.remoteType}`,
58
- ConfiguredName: accessory.context.Television.ConfiguredName ?? `${accessory.displayName} ${device.remoteType}`,
49
+ Name: accessory.displayName,
50
+ ConfiguredName: accessory.displayName,
59
51
  Service: accessory.getService(this.hap.Service.Television) ?? accessory.addService(this.hap.Service.Television) as Service,
60
52
  Active: accessory.context.Active ?? this.hap.Characteristic.Active.INACTIVE,
61
53
  ActiveIdentifier: accessory.context.ActiveIdentifier ?? 1,
@@ -112,12 +104,8 @@ export class TV extends irdeviceBase {
112
104
 
113
105
  // Initialize TelevisionSpeaker Service
114
106
  accessory.context.TelevisionSpeaker = accessory.context.TelevisionSpeaker ?? {};
115
- if (accessory.context.TelevisionSpeaker.Name) {
116
- accessory.context.TelevisionSpeaker.Name = this.validateAndCleanString(accessory.context.TelevisionSpeaker.Name,
117
- 'TelevisionSpeaker Name', accessory.context.TelevisionSpeaker.Name);
118
- }
119
107
  this.TelevisionSpeaker = {
120
- Name: accessory.context.TelevisionSpeaker.Name ?? `${accessory.displayName} ${device.remoteType} Speaker`,
108
+ Name: `${accessory.displayName} Speaker`,
121
109
  Service: accessory.getService(this.hap.Service.TelevisionSpeaker) ?? accessory.addService(this.hap.Service.TelevisionSpeaker) as Service,
122
110
  Active: accessory.context.Active ?? false,
123
111
  VolumeControlType: accessory.context.VolumeControlType ?? this.hap.Characteristic.VolumeControlType.ABSOLUTE,
@@ -33,12 +33,8 @@ export class VacuumCleaner extends irdeviceBase {
33
33
 
34
34
  // Initialize Switch Service
35
35
  accessory.context.Switch = accessory.context.Switch ?? {};
36
- if (accessory.context.Switch.Name) {
37
- accessory.context.Switch.Name = this.validateAndCleanString(accessory.context.Switch.Name,
38
- 'Switch Name', accessory.context.Switch.Name);
39
- }
40
36
  this.Switch = {
41
- Name: accessory.context.Switch.Name ?? `${accessory.displayName} ${device.remoteType}`,
37
+ Name: accessory.displayName,
42
38
  Service: accessory.getService(this.hap.Service.Switch) ?? accessory.addService(this.hap.Service.Switch) as Service,
43
39
  On: accessory.context.On ?? false,
44
40
  };
@@ -34,7 +34,7 @@ export class WaterHeater extends irdeviceBase {
34
34
  // Initialize Switch Service
35
35
  accessory.context.Valve = accessory.context.Valve ?? {};
36
36
  this.Valve = {
37
- Name: accessory.context.Valve.Name ?? `${accessory.displayName} ${device.remoteType}`,
37
+ Name: accessory.displayName,
38
38
  Service: accessory.getService(this.hap.Service.Valve) ?? accessory.addService(this.hap.Service.Valve) as Service,
39
39
  Active: accessory.context.Active ?? this.hap.Characteristic.Active.INACTIVE,
40
40
  };