homebridge-tasmota-control 0.13.0 → 0.13.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.
- package/CHANGELOG.md +1 -1
- package/index.js +3 -3
- package/package.json +1 -1
- package/src/tasmotadevice.js +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## Changes
|
|
11
11
|
|
|
12
|
-
- add room and outdoor temperature sensors services
|
|
12
|
+
- add room and outdoor temperature sensors services for MiElHVAC
|
|
13
13
|
- config.schema update
|
|
14
14
|
- redme update
|
|
15
15
|
- cleanup
|
package/index.js
CHANGED
|
@@ -42,8 +42,7 @@ class tasmotaPlatform {
|
|
|
42
42
|
const postFix = device.host.split('.').join('');
|
|
43
43
|
const defaultHeatingSetTemperatureFile = `${prefDir}/defaultHeatingSetTemperature_${postFix}`;
|
|
44
44
|
const defaultCoolingSetTemperatureFile = `${prefDir}/defaultCoolingSetTemperature_${postFix}`;
|
|
45
|
-
|
|
46
|
-
const swingHFile = `${prefDir}/swingH_${postFix}`;
|
|
45
|
+
|
|
47
46
|
try {
|
|
48
47
|
const files = [
|
|
49
48
|
defaultHeatingSetTemperatureFile,
|
|
@@ -63,7 +62,8 @@ class tasmotaPlatform {
|
|
|
63
62
|
|
|
64
63
|
//tasmota device
|
|
65
64
|
try {
|
|
66
|
-
|
|
65
|
+
const miElHvac = device.miElHvac ?? {};
|
|
66
|
+
this.tasmotaDevice = new TasmotaDevice(api, device, miElHvac, defaultHeatingSetTemperatureFile, defaultCoolingSetTemperatureFile);
|
|
67
67
|
this.tasmotaDevice.on('publishAccessory', (accessory) => {
|
|
68
68
|
api.publishExternalAccessories(CONSTANTS.PluginName, [accessory]);
|
|
69
69
|
log.success(`Device: ${device.host} ${device.name}, published as external accessory.`);
|
package/package.json
CHANGED
package/src/tasmotadevice.js
CHANGED
|
@@ -8,7 +8,7 @@ const CONSTANTS = require('./constants.json');
|
|
|
8
8
|
let Accessory, Characteristic, Service, Categories, AccessoryUUID;
|
|
9
9
|
|
|
10
10
|
class TasmotaDevice extends EventEmitter {
|
|
11
|
-
constructor(api, config, defaultHeatingSetTemperatureFile, defaultCoolingSetTemperatureFile) {
|
|
11
|
+
constructor(api, config, miElHvac, defaultHeatingSetTemperatureFile, defaultCoolingSetTemperatureFile) {
|
|
12
12
|
super();
|
|
13
13
|
|
|
14
14
|
Accessory = api.platformAccessory;
|
|
@@ -23,11 +23,6 @@ class TasmotaDevice extends EventEmitter {
|
|
|
23
23
|
this.auth = config.auth || false;
|
|
24
24
|
this.user = config.user || '';
|
|
25
25
|
this.passwd = config.passwd || '';
|
|
26
|
-
this.heatDryFanMode = config.miElHvac.heatDryFanMode || 1; //NONE, HEAT, DRY, FAN
|
|
27
|
-
this.coolDryFanMode = config.miElHvac.coolDryFanMode || 1; //NONE, COOL, DRY, FAN
|
|
28
|
-
this.autoDryFanMode = config.miElHvac.autoDryFanMode || 1; //NONE, COOL, DRY, FAN
|
|
29
|
-
this.temperatureSensor = config.miElHvac.temperatureSensor || false;
|
|
30
|
-
this.temperatureSensorOutdoor = config.miElHvac.temperatureSensorOutdoor || false;
|
|
31
26
|
this.relaysDisplayType = config.relaysDisplayType || 0;
|
|
32
27
|
this.relaysNamePrefix = config.relaysNamePrefix || false;
|
|
33
28
|
this.lightsNamePrefix = config.lightsNamePrefix || false;
|
|
@@ -37,6 +32,13 @@ class TasmotaDevice extends EventEmitter {
|
|
|
37
32
|
this.disableLogDeviceInfo = config.disableLogDeviceInfo || false;
|
|
38
33
|
this.loadNameFromDevice = config.loadNameFromDevice || false;
|
|
39
34
|
this.refreshInterval = config.refreshInterval * 1000 || 5000;
|
|
35
|
+
|
|
36
|
+
//mitsubishi ac
|
|
37
|
+
this.heatDryFanMode = miElHvac.heatDryFanMode || 1; //NONE, HEAT, DRY, FAN
|
|
38
|
+
this.coolDryFanMode = miElHvac.coolDryFanMode || 1; //NONE, COOL, DRY, FAN
|
|
39
|
+
this.autoDryFanMode = miElHvac.autoDryFanMode || 1; //NONE, COOL, DRY, FAN
|
|
40
|
+
this.temperatureSensor = miElHvac.temperatureSensor || false;
|
|
41
|
+
this.temperatureSensorOutdoor = miElHvac.temperatureSensorOutdoor || false;
|
|
40
42
|
this.defaultHeatingSetTemperatureFile = defaultHeatingSetTemperatureFile;
|
|
41
43
|
this.defaultCoolingSetTemperatureFile = defaultCoolingSetTemperatureFile;
|
|
42
44
|
|