homebridge-melcloud-control 4.1.2-beta.51 → 4.1.2-beta.53
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.
|
@@ -105,9 +105,7 @@
|
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
this.accountIndex = 0;
|
|
109
108
|
const accounts = pluginConfig[0].accounts || [];
|
|
110
|
-
console.log(pluginConfig)
|
|
111
109
|
const accountsCount = accounts.length;
|
|
112
110
|
|
|
113
111
|
const container = document.getElementById("accountButton");
|
|
@@ -132,6 +130,8 @@
|
|
|
132
130
|
|
|
133
131
|
// Tworzenie przycisków
|
|
134
132
|
accounts.forEach((account, i) => {
|
|
133
|
+
this.account = account;
|
|
134
|
+
|
|
135
135
|
const button = document.createElement("button");
|
|
136
136
|
button.type = "button";
|
|
137
137
|
button.id = `button${i}`;
|
|
@@ -142,7 +142,6 @@
|
|
|
142
142
|
|
|
143
143
|
button.addEventListener('click', async () => {
|
|
144
144
|
this.account = account;
|
|
145
|
-
this.accountIndex = i;
|
|
146
145
|
|
|
147
146
|
// Zmieniamy klasę wszystkich przycisków
|
|
148
147
|
accounts.forEach((_, j) => {
|
|
@@ -168,7 +167,7 @@
|
|
|
168
167
|
|
|
169
168
|
// Jeden listener input dla całego formularza
|
|
170
169
|
document.getElementById('configForm').addEventListener('input', async () => {
|
|
171
|
-
const account =
|
|
170
|
+
const account = this.account;
|
|
172
171
|
if (!account) return;
|
|
173
172
|
|
|
174
173
|
account.name = formElements.name.value;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.1.2-beta.
|
|
4
|
+
"version": "4.1.2-beta.53",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|