homebridge-fire-detector 1.0.0 → 1.0.1

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/index.js +3 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -9,11 +9,11 @@ class FireDetector {
9
9
  this.log = log;
10
10
  this.api = api;
11
11
  this.name = config.name || 'Fire Detector';
12
- this.sensors = config.sensors || []; // Danh sách các cảm biến từ cấu hình
12
+ this.sensors = config.sensors || []; // Danh sách cảm biến từ cấu hình
13
13
 
14
14
  this.services = [];
15
15
 
16
- // Tạo mỗi công tắc và cảm biến tương ứng
16
+ // Tạo công tắc và cảm biến cho từng cảm biến cấu hình
17
17
  this.sensors.forEach((sensor, index) => {
18
18
  const switchService = new Service.Switch(`Switch - ${sensor.name || `Sensor ${index + 1}`}`);
19
19
  const sensorService = new Service.MotionSensor(sensor.name || `Sensor ${index + 1}`);
@@ -26,7 +26,7 @@ class FireDetector {
26
26
  .onGet(() => isFireDetected)
27
27
  .onSet((value) => {
28
28
  isFireDetected = value;
29
- this.log(`Switch for ${sensor.name || `Sensor ${index + 1}`} set to: ${value}`);
29
+ this.log(`${sensor.name || `Sensor ${index + 1}`} set to: ${value}`);
30
30
  sensorService
31
31
  .getCharacteristic(Characteristic.MotionDetected)
32
32
  .updateValue(isFireDetected);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-fire-detector",
3
- "version": "1.0.0",
4
- "description": "A Homebridge plugin to create virtual fire detection sensors.",
3
+ "version": "1.0.1",
4
+ "description": "A Homebridge plugin to create virtual fire detection sensors and switches.",
5
5
  "main": "index.js",
6
6
  "author": "DINH THAI AIGLOBAL",
7
7
  "license": "MIT",