@homebridge-plugins/homebridge-tado 7.5.2 → 7.5.3
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 +3 -0
- package/README.md +2 -3
- package/package.json +2 -2
- package/src/platform.js +6 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
11
11
|
[](https://buymeacoffee.com/smart7324)
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Info
|
|
14
14
|
|
|
15
|
-
This plugin
|
|
15
|
+
This plugin has originally been created by [Seydx](https://github.com/seydx/). Donate to him: [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NP4T3KASWQLD8)
|
|
16
16
|
|
|
17
|
-
## Info
|
|
18
17
|
|
|
19
18
|
**Homebridge Tado** is possibly the biggest homebridge plugin for Tado devices.
|
|
20
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homebridge-plugins/homebridge-tado",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.3",
|
|
4
4
|
"description": "Homebridge plugin for controlling tado° devices.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"globals": "^16.0.0",
|
|
52
52
|
"prettier": "^3.5.3"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
package/src/platform.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import DeviceHandler from './helper/handler.js';
|
|
2
2
|
import Logger from './helper/logger.js';
|
|
3
|
-
import packageFile from '../package.json' with { type: 'json' };
|
|
4
3
|
import TadoConfig from './tado/tado-config.js';
|
|
5
4
|
import fakeGatoHistory from 'fakegato-history';
|
|
5
|
+
import { readFileSync } from 'fs';
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import { join, dirname } from "path";
|
|
6
8
|
|
|
7
9
|
// Accessories
|
|
8
10
|
import ContactAccessory from './accessories/contact.js';
|
|
@@ -48,9 +50,8 @@ function TadoPlatform(log, config, api) {
|
|
|
48
50
|
this.api = api;
|
|
49
51
|
this.accessories = [];
|
|
50
52
|
this.config = config;
|
|
51
|
-
|
|
52
53
|
this.user = [];
|
|
53
|
-
|
|
54
|
+
this.packageJson = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), "..", "package.json"), "utf-8"));
|
|
54
55
|
const storagePath = this.api.user.storagePath();
|
|
55
56
|
|
|
56
57
|
//setup config/plugin
|
|
@@ -223,7 +224,7 @@ TadoPlatform.prototype = {
|
|
|
223
224
|
AccessoryInformation.setCharacteristic(this.api.hap.Characteristic.Manufacturer, manufacturer)
|
|
224
225
|
.setCharacteristic(this.api.hap.Characteristic.Model, model)
|
|
225
226
|
.setCharacteristic(this.api.hap.Characteristic.SerialNumber, serialNumber)
|
|
226
|
-
.setCharacteristic(this.api.hap.Characteristic.FirmwareRevision,
|
|
227
|
+
.setCharacteristic(this.api.hap.Characteristic.FirmwareRevision, this.packageJson.version);
|
|
227
228
|
|
|
228
229
|
const tado = device.tado;
|
|
229
230
|
|
|
@@ -325,4 +326,4 @@ TadoPlatform.prototype = {
|
|
|
325
326
|
|
|
326
327
|
this.api.unregisterPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
|
|
327
328
|
},
|
|
328
|
-
};
|
|
329
|
+
};
|