homebridge-melcloud-control 4.1.2-beta.52 → 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,8 +105,7 @@
|
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
const accounts = pluginConfig.accounts || [];
|
|
108
|
+
const accounts = pluginConfig[0].accounts || [];
|
|
110
109
|
const accountsCount = accounts.length;
|
|
111
110
|
|
|
112
111
|
const container = document.getElementById("accountButton");
|
|
@@ -131,6 +130,8 @@
|
|
|
131
130
|
|
|
132
131
|
// Tworzenie przycisków
|
|
133
132
|
accounts.forEach((account, i) => {
|
|
133
|
+
this.account = account;
|
|
134
|
+
|
|
134
135
|
const button = document.createElement("button");
|
|
135
136
|
button.type = "button";
|
|
136
137
|
button.id = `button${i}`;
|
|
@@ -141,7 +142,6 @@
|
|
|
141
142
|
|
|
142
143
|
button.addEventListener('click', async () => {
|
|
143
144
|
this.account = account;
|
|
144
|
-
this.accountIndex = i;
|
|
145
145
|
|
|
146
146
|
// Zmieniamy klasę wszystkich przycisków
|
|
147
147
|
accounts.forEach((_, j) => {
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
|
|
168
168
|
// Jeden listener input dla całego formularza
|
|
169
169
|
document.getElementById('configForm').addEventListener('input', async () => {
|
|
170
|
-
const account =
|
|
170
|
+
const account = this.account;
|
|
171
171
|
if (!account) return;
|
|
172
172
|
|
|
173
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",
|