homebridge-savantlightingcn 1.0.2

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 (60) hide show
  1. package/README.md +45 -0
  2. package/accessories/alarm_control_panel.js +187 -0
  3. package/accessories/binary_sensor.js +243 -0
  4. package/accessories/climate.js +526 -0
  5. package/accessories/cover.js +214 -0
  6. package/accessories/device_tracker.js +152 -0
  7. package/accessories/fan.js +254 -0
  8. package/accessories/floor_heating.js +266 -0
  9. package/accessories/light.js +519 -0
  10. package/accessories/lock.js +177 -0
  11. package/accessories/media_player.js +276 -0
  12. package/accessories/sensor.js +225 -0
  13. package/accessories/switch.js +217 -0
  14. package/dist/css/app.ddbde395.css +1 -0
  15. package/dist/css/chunk-vendors.f2db5e15.css +1 -0
  16. package/dist/css/test.0ebe5642.css +0 -0
  17. package/dist/favicon.ico +0 -0
  18. package/dist/index.html +1 -0
  19. package/dist/js/about.7c566887.js +2 -0
  20. package/dist/js/about.7c566887.js.map +1 -0
  21. package/dist/js/about.ecf592a0.js +2 -0
  22. package/dist/js/about.ecf592a0.js.map +1 -0
  23. package/dist/js/app.01e8fa44.js +2 -0
  24. package/dist/js/app.01e8fa44.js.map +1 -0
  25. package/dist/js/app.15ed2e3b.js +2 -0
  26. package/dist/js/app.15ed2e3b.js.map +1 -0
  27. package/dist/js/app.25976869.js +2 -0
  28. package/dist/js/app.25976869.js.map +1 -0
  29. package/dist/js/app.3112044b.js +2 -0
  30. package/dist/js/app.3112044b.js.map +1 -0
  31. package/dist/js/app.3a289bce.js +2 -0
  32. package/dist/js/app.3a289bce.js.map +1 -0
  33. package/dist/js/app.734f9d85.js +2 -0
  34. package/dist/js/app.734f9d85.js.map +1 -0
  35. package/dist/js/app.83545550.js +2 -0
  36. package/dist/js/app.83545550.js.map +1 -0
  37. package/dist/js/app.926ce9ff.js +2 -0
  38. package/dist/js/app.926ce9ff.js.map +1 -0
  39. package/dist/js/app.a6ba37fb.js +2 -0
  40. package/dist/js/app.a6ba37fb.js.map +1 -0
  41. package/dist/js/app.aa309e99.js +2 -0
  42. package/dist/js/app.aa309e99.js.map +1 -0
  43. package/dist/js/app.b2b4f482.js +2 -0
  44. package/dist/js/app.b2b4f482.js.map +1 -0
  45. package/dist/js/app.f9643858.js +2 -0
  46. package/dist/js/app.f9643858.js.map +1 -0
  47. package/dist/js/chunk-vendors.372a828c.js +52 -0
  48. package/dist/js/chunk-vendors.372a828c.js.map +1 -0
  49. package/dist/js/chunk-vendors.4b731e62.js +52 -0
  50. package/dist/js/chunk-vendors.4b731e62.js.map +1 -0
  51. package/dist/js/chunk-vendors.941b76e9.js +46 -0
  52. package/dist/js/chunk-vendors.941b76e9.js.map +1 -0
  53. package/dist/js/test.041333f7.js +2 -0
  54. package/dist/js/test.041333f7.js.map +1 -0
  55. package/dist/js/test.70bf0852.js +8 -0
  56. package/dist/js/test.70bf0852.js.map +1 -0
  57. package/dist/js/test.840bc653.js +2 -0
  58. package/dist/js/test.840bc653.js.map +1 -0
  59. package/index.js +1635 -0
  60. package/package.json +44 -0
@@ -0,0 +1,526 @@
1
+ var Service;
2
+ var Characteristic;
3
+ var communicationError;
4
+
5
+
6
+ function fahrenheitToCelsius(temperature) {
7
+ return (temperature - 32) / 1.8;
8
+ }
9
+
10
+ function celsiusToFahrenheit(temperature) {
11
+ return Math.round((temperature * 1.8) + 32);
12
+ }
13
+
14
+ function getTempUnits(data) {
15
+ // determine HomeAssistant temp. units (celsius vs. fahrenheit)
16
+ // defaults to celsius
17
+ return (data.attributes && data.attributes.unit_of_measurement && data.attributes.unit_of_measurement === '°F') ? 'FAHRENHEIT' : 'CELSIUS';
18
+ }
19
+
20
+ function HomeAssistantClimate(log, data, client, firmware) {
21
+ // device info
22
+
23
+ this.domain = 'climate';
24
+ this.data = data;
25
+ this.entity_id = data.entity_id;
26
+ this.uuid_base = data.entity_id;
27
+ this.firmware = firmware;
28
+ if (data.attributes && data.attributes.friendly_name) {
29
+ this.name = data.attributes.friendly_name;
30
+ } else {
31
+ this.name = data.entity_id.split('.').pop().replace(/_/g, ' ');
32
+ }
33
+ if (data.attributes && data.attributes.homebridge_manufacturer) {
34
+ this.manufacturer = String(data.attributes.homebridge_manufacturer);
35
+ } else {
36
+ this.manufacturer = 'Home Assistant';
37
+ }
38
+ if (data.attributes && data.attributes.homebridge_model) {
39
+ this.model = String(data.attributes.homebridge_model);
40
+ } else {
41
+ this.model = 'Climate';
42
+ }
43
+ if (data.attributes && data.attributes.homebridge_serial) {
44
+ this.serial = String(data.attributes.homebridge_serial);
45
+ } else {
46
+ this.serial = data.entity_id;
47
+ }
48
+ this.client = client;
49
+ this.log = log;
50
+
51
+ var fanList = data.attributes.fan_list;
52
+ if (fanList) {
53
+ this.maxFanRotationValue = fanList.length - 1;
54
+ } else {
55
+ this.maxFanRotationValue = 100;
56
+ }
57
+ }
58
+ HomeAssistantClimate.prototype = {
59
+ onEvent: function (oldState, newState) {
60
+ if (newState.state) {
61
+ const modeList = {
62
+ idle: 0, heat: 1, cool: 2, auto: 3, off: 0, dehumidify: 0
63
+ };
64
+ const speedList = {
65
+ low: 30, medium: 60, high: 100, off: 0
66
+ };
67
+ this.ThermostatService.updateCharacteristic(Characteristic.CurrentTemperature, newState.attributes.current_temperature || newState.attributes.temperature);
68
+ //this.ThermostatService.getCharacteristic(Characteristic.CurrentTemperature).setValue(newState.attributes.current_temperature || newState.attributes.temperature, null, 'internal');
69
+ this.ThermostatService.updateCharacteristic(Characteristic.TargetTemperature, newState.attributes.temperature);
70
+ //this.ThermostatService.getCharacteristic(Characteristic.TargetTemperature).setValue(newState.attributes.temperature, null, 'internal');
71
+ if (newState.state == "on") {
72
+ this.ThermostatService.updateCharacteristic(Characteristic.TargetHeatingCoolingState, modeList[newState.attributes.operation_mode] || 0);
73
+ //this.ThermostatService.getCharacteristic(Characteristic.TargetHeatingCoolingState).setValue(modeList[newState.attributes.operation_mode] || 3, null, 'internal');
74
+ this.fanService.updateCharacteristic(Characteristic.RotationSpeed, speedList[newState.attributes.current_fan_mode] || 0);
75
+ //this.fanService.getCharacteristic(Characteristic.RotationSpeed).setValue(speedList[newState.attributes.current_fan_mode] || 0, null, 'internal');
76
+ this.humidifierService.updateCharacteristic(Characteristic.Active, newState.attributes.operation_mode == "dehumidify" ? 1 : 0);
77
+ this.humidifierService.updateCharacteristic(Characteristic.TargetHumidifierDehumidifierState, newState.attributes.operation_mode == "dehumidify" ? 2 : 0);
78
+ } else {
79
+ this.ThermostatService.updateCharacteristic(Characteristic.TargetHeatingCoolingState, 0);
80
+ this.humidifierService.updateCharacteristic(Characteristic.Active, 0);
81
+ //this.ThermostatService.getCharacteristic(Characteristic.TargetHeatingCoolingState).setValue(0, null, 'internal');
82
+ }
83
+ }
84
+ },
85
+ getCurrentTemp: function (callback) {
86
+ this.log("getCurrentTemp")
87
+ this.client.fetchState(this.entity_id, function (data) {
88
+ if (data) {
89
+ if (getTempUnits(data) === 'FAHRENHEIT') {
90
+ callback(null, fahrenheitToCelsius(data.attributes.current_temperature));
91
+ } else {
92
+ callback(null, data.attributes.current_temperature);
93
+ }
94
+ } else {
95
+ callback(communicationError);
96
+ }
97
+ });
98
+ },
99
+ getTargetTemp: function (callback) {
100
+ this.log("getCurrentTemp")
101
+ this.client.fetchState(this.entity_id, function (data) {
102
+ if (data) {
103
+ if (getTempUnits(data) === 'FAHRENHEIT') {
104
+ callback(null, fahrenheitToCelsius(data.attributes.temperature));
105
+ } else {
106
+ callback(null, data.attributes.temperature);
107
+ }
108
+ } else {
109
+ callback(communicationError);
110
+ }
111
+ });
112
+ },
113
+ setTargetTemp: function (value, callback, context) {
114
+ if (context === 'internal') {
115
+ callback();
116
+ return;
117
+ }
118
+
119
+ var that = this;
120
+ var serviceData = {};
121
+ serviceData.entity_id = this.entity_id;
122
+ serviceData.temperature = value;
123
+
124
+ if (getTempUnits(this.data) === 'FAHRENHEIT') {
125
+ serviceData.temperature = celsiusToFahrenheit(serviceData.temperature);
126
+ }
127
+
128
+ this.log(`Setting temperature on the '${this.name}' to ${serviceData.temperature}`);
129
+
130
+ this.client.callService(this.domain, 'set_temperature', serviceData, function (data) {
131
+ if (data) {
132
+ that.log(`Successfully set temperature of '${that.name}'`);
133
+ callback();
134
+ } else {
135
+ callback(communicationError);
136
+ }
137
+ });
138
+ },
139
+ getTargetHeatingCoolingState: function (callback) {
140
+ this.log('fetching Current Heating Cooling state for: ' + this.name);
141
+
142
+ this.client.fetchState(this.entity_id, function (data) {
143
+ if (data && data.attributes && data.attributes.operation_mode) {
144
+ var state;
145
+ switch (data.attributes.operation_mode) {
146
+ case 'auto':
147
+ state = Characteristic.TargetHeatingCoolingState.AUTO;
148
+ break;
149
+ case 'cool':
150
+ state = Characteristic.TargetHeatingCoolingState.COOL;
151
+ break;
152
+ case 'heat':
153
+ state = Characteristic.TargetHeatingCoolingState.HEAT;
154
+ break;
155
+ case 'off':
156
+ default:
157
+ state = Characteristic.TargetHeatingCoolingState.OFF;
158
+ break;
159
+ }
160
+ callback(null, state);
161
+ } else {
162
+ callback(communicationError);
163
+ }
164
+ });
165
+ },
166
+
167
+ setTargetHeatingCoolingState: function (value, callback, context) {
168
+ if (context === 'internal') {
169
+ callback();
170
+ return;
171
+ }
172
+ var serviceData = {};
173
+ serviceData.entity_id = this.entity_id;
174
+
175
+ var mode = '';
176
+ switch (value) {
177
+ case Characteristic.TargetHeatingCoolingState.AUTO:
178
+ mode = 'auto';
179
+ break;
180
+ case Characteristic.TargetHeatingCoolingState.COOL:
181
+ mode = 'cool';
182
+ break;
183
+ case Characteristic.TargetHeatingCoolingState.HEAT:
184
+ mode = 'heat';
185
+ break;
186
+ case Characteristic.TargetHeatingCoolingState.OFF:
187
+ default:
188
+ mode = 'off';
189
+ break;
190
+ }
191
+
192
+ serviceData.operation_mode = mode;
193
+ this.log(`Setting Current Heating Cooling state on the '${this.name}' to ${mode}`);
194
+
195
+ var that = this;
196
+
197
+ if (mode === 'idle') {
198
+ this.fanService.getCharacteristic(Characteristic.On)
199
+ .setValue(false, null, 'internal');
200
+ } else {
201
+ this.fanService.getCharacteristic(Characteristic.On)
202
+ .setValue(true, null, 'internal');
203
+ }
204
+
205
+ this.client.callService(this.domain, 'set_operation_mode', serviceData, function (data) {
206
+ if (data) {
207
+ that.log(`Successfully set current heating cooling state of '${that.name}'`);
208
+ callback();
209
+ } else {
210
+ callback(communicationError);
211
+ }
212
+ });
213
+ },
214
+ getFanPowerState(callback) {
215
+ this.client.fetchState(this.entity_id, (data) => {
216
+ if (data) {
217
+ this.log("operation_mode = ", data.attributes.operation_mode);
218
+ const powerState = data.attributes.operation_mode !== 'off';
219
+ callback(null, powerState);
220
+ } else {
221
+ callback(communicationError);
222
+ }
223
+ });
224
+ },
225
+ getRotationSpeed(callback) {
226
+ this.client.fetchState(this.entity_id, (data) => {
227
+ if (data) {
228
+ if (data.attributes.operation_mode === 'idle') {
229
+ callback(null, 0);
230
+ } else {
231
+ var fanList = data.attributes.fan_list;
232
+ if (fanList) {
233
+ if (fanList.length > 2) {
234
+ var index = fanList.indexOf(data.attributes.current_fan_mode);
235
+ callback(null, index);
236
+ }
237
+ } else {
238
+ switch (data.attributes.current_fan_mode) {
239
+ case 'low':
240
+ callback(null, 30);
241
+ break;
242
+ case 'medium':
243
+ callback(null, 60);
244
+ break;
245
+ case 'high':
246
+ callback(null, 100);
247
+ break;
248
+ default:
249
+ callback(null, 0);
250
+ }
251
+ }
252
+ }
253
+ } else {
254
+ callback(communicationError);
255
+ }
256
+ });
257
+ },
258
+ setRotationSpeed(speed, callback, context) {
259
+ if (context === 'internal') {
260
+ callback();
261
+ return;
262
+ }
263
+
264
+ const that = this;
265
+ const serviceData = {};
266
+ serviceData.entity_id = this.entity_id;
267
+ this.log("setRotationSpeed")
268
+ this.client.fetchState(this.entity_id, (data) => {
269
+ if (data) {
270
+ var fanList = data.attributes.fan_list;
271
+ if (fanList) {
272
+ for (var index = 0; index < fanList.length - 1; index += 1) {
273
+ if (speed === index) {
274
+ serviceData.fan_mode = fanList[index];
275
+ break;
276
+ }
277
+ }
278
+ if (!serviceData.fan_mode) {
279
+ serviceData.fan_mode = fanList[fanList.length - 1];
280
+ }
281
+ } else if (speed <= 30) {
282
+ serviceData.fan_mode = 'low';
283
+ } else if (speed <= 60) {
284
+ serviceData.fan_mode = 'medium';
285
+ } else if (speed <= 100) {
286
+ serviceData.fan_mode = 'high';
287
+ }
288
+ this.log(`Setting fan mode on the '${this.name}' to ${serviceData.fan_mode}`);
289
+
290
+ this.client.callService(this.domain, 'set_fan_mode', serviceData, (data2) => {
291
+ if (data2) {
292
+ that.log(`Successfully set fan mode on the '${that.name}' to ${serviceData.fan_mode}`);
293
+ callback();
294
+ } else {
295
+ callback(communicationError);
296
+ }
297
+ });
298
+ } else {
299
+ callback(communicationError);
300
+ }
301
+ });
302
+ },
303
+ /**
304
+ *处理请求以获取“活动”特性的当前值
305
+ */
306
+ handleActiveGet() {
307
+ this.log.debug('Triggered GET Active');
308
+
309
+ //将其设置为Active的有效值
310
+ var currentValue = Characteristic.Active.INACTIVE;
311
+ this.client.fetchState(this.entity_id, function (data) {
312
+ if (data && data.attributes && data.attributes.operation_mode) {
313
+ switch (data.attributes.operation_mode) {
314
+ case 'dehumidify':
315
+ currentValue = 1;
316
+ break;
317
+ default:
318
+ currentValue = 0;
319
+ break;
320
+ }
321
+ return currentValue;
322
+ } else {
323
+ return 0;
324
+ }
325
+ });
326
+
327
+ return currentValue;
328
+ },
329
+
330
+ /**
331
+ *处理设置“活动”特性的请求
332
+ */
333
+ handleActiveSet(value) {
334
+ this.log.debug('Triggered SET Active:', value);
335
+ var serviceData = {};
336
+ serviceData.entity_id = this.entity_id;
337
+ if (value == 0) {
338
+ serviceData.operation_mode = "off";
339
+ } else {
340
+ serviceData.operation_mode = "dehumidify";
341
+ }
342
+ this.client.callService(this.domain, 'set_dehumidifier_mode', serviceData, function (data) { });
343
+ },
344
+
345
+ /**
346
+ *处理请求以获取“当前加湿器-除湿机状态”特性的当前值
347
+ */
348
+ handleCurrentHumidifierDehumidifierStateGet() {
349
+ this.log.debug('Triggered GET CurrentHumidifierDehumidifierState');
350
+
351
+ //将其设置为Current加湿器除湿状态的有效值
352
+ const currentValue = Characteristic.CurrentHumidifierDehumidifierState.INACTIVE;
353
+
354
+ return currentValue;
355
+ },
356
+
357
+
358
+ /**
359
+ *处理请求以获取“目标加湿器-除湿机状态”特性的当前值
360
+ */
361
+ handleTargetHumidifierDehumidifierStateGet() {
362
+ this.log.debug('Triggered GET TargetHumidifierDehumidifierState');
363
+
364
+ //将其设置为Target加湿器除湿状态的有效值
365
+ this.client.fetchState(this.entity_id, function (data) {
366
+ if (data && data.attributes && data.attributes.operation_mode) {
367
+ var currentValue = 0;
368
+ switch (data.attributes.operation_mode) {
369
+ case 'dehumidify':
370
+ currentValue = 2;
371
+ break;
372
+ default:
373
+ currentValue = 0;
374
+ break;
375
+ }
376
+ return currentValue;
377
+ } else {
378
+ return 0;
379
+ }
380
+ });
381
+ },
382
+
383
+ /**
384
+ *处理设置“目标加湿器-除湿机状态”特性的请求
385
+ */
386
+ handleTargetHumidifierDehumidifierStateSet(value) {
387
+ this.log.debug('Triggered SET TargetHumidifierDehumidifierState:', value);
388
+ var serviceData = {};
389
+ serviceData.entity_id = this.entity_id;
390
+ if (value == 0) {
391
+ serviceData.operation_mode = "off";
392
+ } else {
393
+ serviceData.operation_mode = "dehumidify";
394
+ }
395
+ this.client.callService(this.domain, 'set_dehumidifier_mode', serviceData, function (data) { });
396
+ },
397
+
398
+ /**
399
+ *处理请求以获取“当前相对湿度”特性的当前值
400
+ */
401
+ handleCurrentRelativeHumidityGet() {
402
+ this.log.debug('Triggered GET CurrentRelativeHumidity');
403
+
404
+ //将其设置为当前相对湿度的有效值
405
+ const currentValue = 1;
406
+
407
+ return currentValue;
408
+ },
409
+
410
+ getServices: function () {
411
+ this.ThermostatService = new Service.Thermostat();
412
+ var informationService = new Service.AccessoryInformation();
413
+
414
+ informationService
415
+ .setCharacteristic(Characteristic.Manufacturer, this.manufacturer)
416
+ .setCharacteristic(Characteristic.Model, this.model)
417
+ .setCharacteristic(Characteristic.SerialNumber, this.serial)
418
+ .setCharacteristic(Characteristic.FirmwareRevision, this.firmware);
419
+
420
+ // get our unit var -- default to celsius
421
+ var units = (getTempUnits(this.data) === 'FAHRENHEIT') ? Characteristic.TemperatureDisplayUnits.FAHRENHEIT : Characteristic.TemperatureDisplayUnits.CELSIUS;
422
+
423
+ this.ThermostatService
424
+ .getCharacteristic(Characteristic.CurrentTemperature)
425
+ .on('get', this.getCurrentTemp.bind(this));
426
+
427
+ // default min/max/step for temperature
428
+ var minTemp = 16;
429
+ var maxTemp = 35;
430
+ var tempStep = 1;
431
+
432
+ if (units === Characteristic.TemperatureDisplayUnits.FAHRENHEIT) {
433
+ if (this.data && this.data.attributes) {
434
+ if (this.data.attributes.min_temp) {
435
+ minTemp = fahrenheitToCelsius(this.data.attributes.min_temp);
436
+ }
437
+ if (this.data.attributes.max_temp) {
438
+ maxTemp = fahrenheitToCelsius(this.data.attributes.max_temp);
439
+ }
440
+ if (this.data.attributes.target_temp_step) {
441
+ tempStep = this.data.attributes.target_temp_step;
442
+ }
443
+ }
444
+ } else if (this.data && this.data.attributes) {
445
+ if (this.data.attributes.min_temp) {
446
+ minTemp = this.data.attributes.min_temp;
447
+ }
448
+ if (this.data.attributes.max_temp) {
449
+ maxTemp = this.data.attributes.max_temp;
450
+ }
451
+ if (this.data.attributes.target_temp_step) {
452
+ tempStep = this.data.attributes.target_temp_step;
453
+ }
454
+ }
455
+
456
+ this.ThermostatService
457
+ .getCharacteristic(Characteristic.TargetTemperature)
458
+ .setProps({ minValue: minTemp, maxValue: maxTemp, minStep: tempStep })
459
+ .on('get', this.getTargetTemp.bind(this))
460
+ .on('set', this.setTargetTemp.bind(this));
461
+
462
+ this.ThermostatService
463
+ .getCharacteristic(Characteristic.TargetHeatingCoolingState)
464
+ .on('get', this.getTargetHeatingCoolingState.bind(this))
465
+ .on('set', this.setTargetHeatingCoolingState.bind(this));
466
+
467
+ this.ThermostatService.setCharacteristic(Characteristic.TemperatureDisplayUnits, units);
468
+
469
+ this.fanService = new Service.Fan();
470
+ this.fanService
471
+ .getCharacteristic(Characteristic.On)
472
+ .on('get', this.getFanPowerState.bind(this));
473
+ this.fanService
474
+ .getCharacteristic(Characteristic.RotationSpeed)
475
+ .setProps({
476
+ minValue: 0,
477
+ maxValue: this.maxFanRotationValue,
478
+ minStep: 1
479
+ })
480
+ .on('get', this.getRotationSpeed.bind(this))
481
+ .on('set', this.setRotationSpeed.bind(this));
482
+
483
+ this.humidifierService = new Service.HumidifierDehumidifier();
484
+ //this.humidifierService = new Service(Service.HumidifierDehumidifier);
485
+
486
+ // create handlers for required characteristics
487
+ this.humidifierService.getCharacteristic(Characteristic.Active)
488
+ .onGet(this.handleActiveGet.bind(this))
489
+ .onSet(this.handleActiveSet.bind(this));
490
+
491
+ this.humidifierService.getCharacteristic(Characteristic.TargetHumidifierDehumidifierState)
492
+ //.onGet(this.handleTargetHumidifierDehumidifierStateGet.bind(this))
493
+ .onSet(this.handleTargetHumidifierDehumidifierStateSet.bind(this));
494
+
495
+ /*var motionDetected = 0;
496
+ setInterval(() => {
497
+ if (motionDetected < 3) {
498
+ this.humidifierService.updateCharacteristic(Characteristic.Active, 1);
499
+ this.humidifierService.updateCharacteristic(Characteristic.TargetHumidifierDehumidifierState, motionDetected);
500
+ this.log("set TargetHumidifierDehumidifierState", motionDetected)
501
+ motionDetected += 1;
502
+ } else {
503
+ this.humidifierService.updateCharacteristic(Characteristic.Active, 0);
504
+ this.log("set Active", motionDetected)
505
+ motionDetected = 0;
506
+ }
507
+ //this.ThermostatService.updateCharacteristic(Characteristic.TargetHeatingCoolingState, motionDetected);
508
+ //this.log("set TargetHeatingCoolingState", motionDetected)
509
+ }, 2000);*/
510
+
511
+ return [informationService, this.ThermostatService, this.fanService, this.humidifierService];
512
+ }
513
+
514
+
515
+ };
516
+
517
+ function HomeAssistantClimatePlatform(oService, oCharacteristic, oCommunicationError) {
518
+ Service = oService;
519
+ Characteristic = oCharacteristic;
520
+ communicationError = oCommunicationError;
521
+
522
+ return HomeAssistantClimate;
523
+ }
524
+
525
+ module.exports = HomeAssistantClimatePlatform;
526
+ module.exports.HomeAssistantClimate = HomeAssistantClimate;