homebridge-tasmota-control 0.4.2 → 0.4.45-beta.0

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 CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.4.4] - (23.07.2022)
8
+ ## Changes
9
+ - refactor information service
10
+
7
11
  ## [0.4.2] - (25.04.2022)
8
12
  ## Changes
9
13
  - update dependencies
package/index.js CHANGED
@@ -156,7 +156,7 @@ class tasmotaDevice {
156
156
  this.powerState = new Array();
157
157
  for (let i = 0; i < this.channelsCount; i++) {
158
158
  const channel = this.channelsCount == 1 ? 'POWER' : 'POWER' + (i + 1);
159
- const powerState = (response.data[channel] == 'ON');
159
+ const powerState = (response.data[channel] == 'ON' || response.data[channel] == 1);
160
160
  if (this.tasmotaServices) {
161
161
  this.tasmotaServices[i]
162
162
  .updateCharacteristic(Characteristic.On, powerState)
@@ -191,15 +191,11 @@ class tasmotaDevice {
191
191
  const serialNumber = this.serialNumber;
192
192
  const firmwareRevision = this.firmwareRevision;
193
193
 
194
- accessory.removeService(accessory.getService(Service.AccessoryInformation));
195
- const informationService = new Service.AccessoryInformation();
196
- informationService
197
- .setCharacteristic(Characteristic.Name, accessoryName)
194
+ accessory.getService(Service.AccessoryInformation)
198
195
  .setCharacteristic(Characteristic.Manufacturer, manufacturer)
199
196
  .setCharacteristic(Characteristic.Model, modelName)
200
197
  .setCharacteristic(Characteristic.SerialNumber, serialNumber)
201
198
  .setCharacteristic(Characteristic.FirmwareRevision, firmwareRevision);
202
- accessory.addService(informationService);
203
199
 
204
200
  //Prepare service
205
201
  this.log.debug('prepareTasmotaService');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Tasmota Control",
3
3
  "name": "homebridge-tasmota-control",
4
- "version": "0.4.2",
4
+ "version": "0.4.45-beta.0",
5
5
  "description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Tasmota flashed devices.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -31,7 +31,7 @@
31
31
  "homebridge": ">=1.3.0"
32
32
  },
33
33
  "dependencies": {
34
- "axios": "^0.27.0"
34
+ "axios": "^0.27.2"
35
35
  },
36
36
  "keywords": [
37
37
  "homebridge",