diff --git a/README.md b/README.md index 1b84496..670daa4 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,13 @@ If you like my work, please consider a personal donation +### 0.2.3 (2021-06-29) +* (Jey-Cee) Bugfix : Light component state not changed [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74) +* (DutchmanNL) Update compatibility to version 1.19.4 of ESPHome Dashboard + ### 0.2.2 (2021-06-24) * (DutchmanNL) [!!! Breaking !!!] Make YAML file persistent, backup your configuration before updating ! solves [#57](https://github.com/DrozmotiX/ioBroker.esphome/issues/57) * (DutchmanNL) Update ESPHome Dashboard to 1.18.0, requires Python >=3.7 (and ensure <4.0!) diff --git a/io-package.json b/io-package.json index 4b2b642..0600f07 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,20 @@ { "common": { "name": "esphome", - "version": "0.2.2", + "version": "0.2.3", "news": { + "0.2.3": { + "en": "Bugfix : Light component state not changed [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nUpdate compatibility to version 1.19.4 of ESPHome Dashboard", + "de": "Bugfix : Lichtkomponentenstatus nicht geändert [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nUpdate-Kompatibilität auf Version 1.19.4 von ESPHome Dashboard", + "ru": "Исправление: состояние компонента Light не изменялось [# 74] (https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nОбновите совместимость до версии 1.19.4 ESPHome Dashboard", + "pt": "Correção de bug: o estado do componente leve não foi alterado [# 74] (https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nAtualizar compatibilidade para a versão 1.19.4 do ESPHome Dashboard", + "nl": "Bugfix: Status lichtcomponent niet gewijzigd [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nCompatibiliteit bijwerken naar versie 1.19.4 van ESPHome Dashboard", + "fr": "Correction de bug : l'état du composant Light n'a pas changé [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nMettre à jour la compatibilité vers la version 1.19.4 d'ESPHome Dashboard", + "it": "Bugfix: lo stato del componente Light non è cambiato [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nAggiorna la compatibilità alla versione 1.19.4 di ESPHome Dashboard", + "es": "Corrección de error: el estado del componente de luz no ha cambiado [# 74] (https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nActualizar la compatibilidad a la versión 1.19.4 de ESPHome Dashboard", + "pl": "Poprawka błędu: stan lekkiego komponentu nie uległ zmianie [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\nZaktualizuj kompatybilność do wersji 1.19.4 ESPHome Dashboard", + "zh-cn": "修正:轻组件状态没有改变 [#74](https://github.com/DrozmotiX/ioBroker.esphome/issues/74)\n更新与 ESPHome Dashboard 1.19.4 版的兼容性" + }, "0.2.2": { "en": "[!!! Breaking !!!] Make YAML file persistent, backup your configuration before updating ! solves [#57](https://github.com/DrozmotiX/ioBroker.esphome/issues/57)\nUpdate ESPHome Dashboard to 1.18.0, requires Python >=3.7 (and ensure <4.0!)\nBugfix : Reconnect to devices without autodiscovery / MDNS-Broadcast in network, solves [#66](https://github.com/DrozmotiX/ioBroker.esphome/issues/66)", "de": "[!!! Breaking !!!] Machen Sie die YAML-Datei persistent, sichern Sie Ihre Konfiguration vor dem Update! löst [#57](https://github.com/DrozmotiX/ioBroker.esphome/issues/57)\nAktualisieren Sie das ESPHome-Dashboard auf 1.18.0, erfordert Python >=3.7 (und stellen Sie sicher <4.0!)\nBugfix : Reconnect zu Geräten ohne Autodiscovery / MDNS-Broadcast im Netzwerk, behebt [#66](https://github.com/DrozmotiX/ioBroker.esphome/issues/66)", diff --git a/main.js b/main.js index 7cda35a..6d6c3bd 100644 --- a/main.js +++ b/main.js @@ -1020,32 +1020,32 @@ class Esphome extends utils.Adapter { this.deviceInfo[deviceIP][device[4]].states[device[5]] = writeValue; } else if (device[5] === 'state') { - this.deviceInfo[deviceIP][device[4]].states.state = writeValue; - } + this.deviceInfo[deviceIP][device[4]].states.state = writeValue; + } - let data = { + const data = { key: this.deviceInfo[deviceIP][device[4]].states.key, - state: this.deviceInfo[deviceIP][device[4]].states.state, - transitionLength: this.deviceInfo[deviceIP][device[4]].states.transitionLength - } + state: this.deviceInfo[deviceIP][device[4]].states.state, + transitionLength: this.deviceInfo[deviceIP][device[4]].states.transitionLength + }; if(this.deviceInfo[deviceIP][device[4]].config.supportsBrightness === true){ - data.brightness = this.deviceInfo[deviceIP][device[4]].states.brightness; - } + data.brightness = this.deviceInfo[deviceIP][device[4]].states.brightness; + } if(this.deviceInfo[deviceIP][device[4]].config.supportsRgb === true){ - data.red = this.deviceInfo[deviceIP][device[4]].states.red; - data.green = this.deviceInfo[deviceIP][device[4]].states.green; - data.blue = this.deviceInfo[deviceIP][device[4]].states.blue; - } + data.red = this.deviceInfo[deviceIP][device[4]].states.red; + data.green = this.deviceInfo[deviceIP][device[4]].states.green; + data.blue = this.deviceInfo[deviceIP][device[4]].states.blue; + } if(this.deviceInfo[deviceIP][device[4]].config.supportsWhiteValue === true){ - data.white = this.deviceInfo[deviceIP][device[4]].states.white; - } + data.white = this.deviceInfo[deviceIP][device[4]].states.white; + } if(this.deviceInfo[deviceIP][device[4]].config.supportsColorTemperature === true){ - data.colorTemperature = this.deviceInfo[deviceIP][device[4]].states.colorTemperature; - } + data.colorTemperature = this.deviceInfo[deviceIP][device[4]].states.colorTemperature; + } const effect = this.deviceInfo[deviceIP][device[4]].states.effect; if(effect !== '' && effect !== null && effect !== undefined){ - data.effect = effect; - } + data.effect = effect; + } this.log.debug(`Send Light values ${JSON.stringify(data)}`); await client[deviceIP].connection.lightCommandService(data); diff --git a/package-lock.json b/package-lock.json index d9f27b4..d608b3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "iobroker.esphome", - "version": "0.2.2", + "version": "0.2.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 660efed..48ae397 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.esphome", - "version": "0.2.2", + "version": "0.2.3", "description": "Control your ESP8266/ESP32 with simple yet powerful configuration files created and managed by ESPHome", "author": { "name": "DutchmanNL",