homebridge-melcloud-control 4.6.1-beta.16 → 4.6.1-beta.18

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.
@@ -84,7 +84,6 @@
84
84
  <script>
85
85
  (async () => {
86
86
  const pluginConfig = await homebridge.getPluginConfig();
87
- this.themeMode = homebridge.userCurrentLightingMode(); //return light, dark
88
87
 
89
88
  if (!pluginConfig.length) {
90
89
  pluginConfig.push({});
@@ -240,9 +239,12 @@
240
239
  // Login & Sync Logic
241
240
  document.getElementById('logIn').addEventListener('click', async () => {
242
241
  document.getElementById('logIn').className = "btn btn-primary";
243
- updateInfo('info', 'Connecting to MELCloud', 'white');
244
- updateInfo('info1', '', 'white');
245
- updateInfo('info2', '', 'white');
242
+ const lightingMode = homebridge.userCurrentLightingMode();
243
+ const fontColor = lightingMode === 'dark' ? 'black' : 'white';
244
+
245
+ updateInfo('info', 'Connecting to MELCloud', fontColor);
246
+ updateInfo('info1', '', fontColor);
247
+ updateInfo('info2', '', fontColor);
246
248
  homebridge.showSpinner();
247
249
 
248
250
  try {
@@ -378,7 +380,6 @@
378
380
  const removedSchedulesCount = removedFromConfig.schedules.length;
379
381
  const removedScenesCount = removedFromConfig.scenes.length;
380
382
 
381
- const fontColor = this.themeMode === 'dark' ? 'white' : 'black';
382
383
  if (!newDevicesCount && !newPresetsCount && !newSchedulesCount && !newScenesCount && !removedDevicesCount && !removedPresetsCount && !removedSchedulesCount && !removedScenesCount) {
383
384
  updateInfo('info', 'No changes detected.', fontColor);
384
385
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.6.1-beta.16",
4
+ "version": "4.6.1-beta.18",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",