iobroker.esphome 0.6.1 → 0.6.2

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_OLD.md CHANGED
@@ -1,4 +1,14 @@
1
1
  # Older changes
2
+ ## 0.5.0-beta.0 (2023-11-12) - Rebuild Admin Interface & Connection handler
3
+ * (DutchmanNL) Admin interface redesigned to JSON-Config relates #171
4
+ * (DutchmanNL) Backend massages implemented to Add/Modify/Delete devices
5
+ * (DutchmanNL) Device connection handling and visibility of devices improved
6
+ * (DutchmanNL) Auto device discovery temporary disabled due to external bug, relates #175
7
+ * (DutchmanNL) Possibility added to exclude IP-Addresses from device discovery, relates #175
8
+ * (DutchmanNL) Allow Selection to listen on specific interface or all for device discovery resolves #67
9
+ * (DutchmanNL) State implemented to show current connection status (unreachable/disconnected/connected) to improve management of devices
10
+ * (DutchmanNL) Several bugfixes, resolves #181 resolves #
11
+
2
12
  ## 0.4.1 (2023-11-05)
3
13
  * (DutchmanNL) Bugfix: Password / connection issues in previous beta resolves #179
4
14
  * (DutchmanNL) Bugfix: Allow individual API password or encryption keys for devices, resolves #174
package/README.md CHANGED
@@ -198,6 +198,11 @@ If you like my work, please consider a personal donation
198
198
  ### __WORK IN PROGRESS__
199
199
  * (DutchmanNL)
200
200
  -->
201
+ ### 0.6.2 (2025-08-08)
202
+ * (@SimonFischer04) add support for text device type #141, displays #103
203
+ * (@SimonFischer04) fix cover device type #156
204
+ * (@SimonFischer04) workaround: downgrade python for now. fixes #259
205
+
201
206
  ### 0.6.1 (2025-05-24)
202
207
  * (@SimonFischer04) Update esphome
203
208
  * (@ticaki) Optimize admin configuration interface
@@ -215,16 +220,6 @@ If you like my work, please consider a personal donation
215
220
  ### 0.5.0-beta.1 (2023-11-12)
216
221
  * (DutchmanNL) Only show error messages once for unreachable devices
217
222
 
218
- ### 0.5.0-beta.0 (2023-11-12) - Rebuild Admin Interface & Connection handler
219
- * (DutchmanNL) Admin interface redesigned to JSON-Config relates #171
220
- * (DutchmanNL) Backend massages implemented to Add/Modify/Delete devices
221
- * (DutchmanNL) Device connection handling and visibility of devices improved
222
- * (DutchmanNL) Auto device discovery temporary disabled due to external bug, relates #175
223
- * (DutchmanNL) Possibility added to exclude IP-Addresses from device discovery, relates #175
224
- * (DutchmanNL) Allow Selection to listen on specific interface or all for device discovery resolves #67
225
- * (DutchmanNL) State implemented to show current connection status (unreachable/disconnected/connected) to improve management of devices
226
- * (DutchmanNL) Several bugfixes, resolves #181 resolves #
227
-
228
223
  ## License
229
224
  MIT License
230
225
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "esphome",
4
- "version": "0.6.1",
4
+ "version": "0.6.2",
5
5
  "news": {
6
+ "0.6.2": {
7
+ "en": "add support for text device type #141, displays #103\nfix cover device type #156\nworkaround: downgrade python for now. fixes #259",
8
+ "de": "unterstützung für textgerät typ #141, anzeigen #103\nbefestigungsabdeckung typ #156\narbeitsbereich: abbauen python für jetzt. fixes #259",
9
+ "ru": "добавить поддержку текстового устройства типа #141, дисплеев #103\nфиксировать крышку типа #156\nобходной путь: понижай питон пока. обсуждение #259",
10
+ "pt": "adicionar suporte para o tipo de dispositivo de texto #141, exibe #103\ncorrigir tipo de dispositivo de cobertura #156\nsolução alternativa: píton degradante por enquanto. corrige # 259",
11
+ "nl": "ondersteuning toevoegen voor tekst apparaat type #141, displays #103\nfix cover apparaat type #156\nwerkoplossing: downgrade python voor nu. fixes #259",
12
+ "fr": "ajouter le support pour le type de périphérique texte #141, affiche #103\ndispositif de protection de type #156\nla solution de rechange: python de qualité inférieure pour l'instant. correctifs #259",
13
+ "it": "aggiungere il supporto per il tipo di dispositivo di testo #141, visualizza #103\ncorretto tipo di dispositivo di copertura #156\na tutto: pitone per ora. correzioni #259",
14
+ "es": "añadir soporte para el tipo de dispositivo de texto #141, pantallas #103\ntipo de dispositivo de tapa fija #156\ntodo el trabajo: por ahora. fijaciones #259",
15
+ "pl": "dodaj obsługę urządzenia tekstowego typu # 141, wyświetla # 103\nurządzenie mocujące typu # 156\npraca wokół: na razie pyton w dół. poprawki # 259",
16
+ "uk": "додавання підтримки типу текстового пристрою #141, відображення #103\nзафіксувати тип пристрою кришки #156\nробота: python тепер. застібки #259",
17
+ "zh-cn": "添加文本设备类型 # 141, 显示 # 103\n固定封面设备类型 # 156\n工作间距: 现在降级的蟒蛇。 修正 # 259"
18
+ },
6
19
  "0.6.1": {
7
20
  "en": "Update esphome\nOptimize admin configuration interface\nOptimize backend handling of device discovery\nCapability to select ESPHome Dashboard version added, resolves #118",
8
21
  "de": "Update esphome\nOptimieren der Admin-Konfigurationsschnittstelle\nOptimieren Sie das Backend-Handling der Geräteentdeckung\nMöglichkeit, ESPHome Dashboard-Version hinzugefügt zu wählen, löst #118",
@@ -80,19 +93,6 @@
80
93
  "pl": "Bugfix: Password / Problemy połączenia w poprzednich beta rozwiązały numer #179\nBugfix: Allow indywidualny API password lub klucze szyfrujące dla urządzeń, rozwiązał numer #174\nWsparcie ESPHome: Encryption Key (you powinien wyemigrować z hasła API do Encryption Key ! Rozwiązanie #152",
81
94
  "uk": "Помилки: Пароль / питання з'єднання у попередніх бета-рішеннях #179\nПомилки: Дозволити індивідуальний пароль API або ключі шифрування для пристроїв, вирішує #174\nПідтримка ESPHome пристрій шифрування ключа (Ви повинні мигратувати від API пароля до ключа шифрування ! розчини #152)",
82
95
  "zh-cn": "Bugfix:在前几批被盗用词/联系问题\nBugfix: 允许个人的通用或加密装置的关键,第174号行动\n支持ESPHome装置的加密关键(you应从API密码移到恩加密的关键! 第152号决议)"
83
- },
84
- "0.4.0": {
85
- "en": "Added cleanup capability for unused channels & states after initialisation of device, resolves #39\nAdded button to info channel which allows to delete all offline devices from adapter tree. resolves #39\n[Breaking] Backup strategy changed, requires [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) and activate option for ESPHome, fixes #129",
86
- "de": "Zusätzliche Reinigungsfähigkeit für ungenutzte Kanäle & Zustände nach der Initialisierung des Geräts, löst #39\nZusätzlicher Button zum Info-Kanal, der alle Offline-Geräte aus dem Adapterbaum löschen kann. löst #39\n[Breaking] Backup-Strategie geändert, erfordert [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) und aktiviert Option für ESPHome, repariert #129",
87
- "ru": "Добавлена возможность очистки неиспользуемых каналов и государств после инициализации устройства, решает #39\nДобавлена кнопка к информационному каналу, что позволяет удалить все оффлайн устройства из дерева адаптера. решает #39\n[Breaking] Стратегия резервного копирования изменена, требует [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) и активировать вариант для ESPHome, исправлений #129",
88
- "pt": "Adicionado capacidade de limpeza para canais não utilizados & estados após a inicialização do dispositivo, resolve #39\nAdicionado botão para info canal que permite excluir todos os dispositivos off-line da árvore do adaptador. resolve #39\n[Breaking] Estratégia de backup alterada, requer [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) e opção ativa para ESPHome, correções #129",
89
- "nl": "Vervoegde schoonmaak capaciteit voor onbruikbare kanalen apparaat na de initialisatie van 39\nKnop toegevoegd aan info kanaal dat alle offline apparaten van adapter boom laat verwijderen. 39\nOndersteuningsstrategie veranderde, vereist [Backitup v2.9.1, htps:com/simateioBroker, en tactiveer de optie van 12 uur",
90
- "fr": "Ajout d'une capacité de nettoyage pour les canaux non utilisés & états après l'initialisation du dispositif, résout #39\nAjout du bouton sur le canal d'info qui permet de supprimer tous les périphériques hors ligne de l'arbre d'adaptateur. résolution #39\n[Breaking] La stratégie de sauvegarde a changé, nécessite [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) et l'option active pour ESPHome, corrige #129",
91
- "it": "Aggiunta funzionalità di pulizia per canali e stati non utilizzati dopo l'inizializzazione del dispositivo, risolve #39\nPulsante aggiunto al canale info che consente di eliminare tutti i dispositivi offline dall'albero dell'adattatore. risolve #39\n[Breaking] La strategia di backup è cambiata, richiede [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) e attiva l'opzione per ESPHome, corregge #129",
92
- "es": "Capacidad de limpieza agregada para canales no utilizados \" estados después de la inicialización del dispositivo, resuelve #39\nSe agregó botón a canal de información que permite eliminar todos los dispositivos fuera de línea del árbol del adaptador. resuelve #39\n[Breaking] La estrategia de respaldo cambió, requiere [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) y activar la opción para ESPHome, fija #129",
93
- "pl": "Po zainicjowaniu możliwości usuwania nieużywanych kanałów i stanów po inicjalizacji urządzenia, rozwiązał #39\nNaciśnięty przycisk do kanału informacyjnego, który umożliwia usunięcie wszystkich urządzeń offline z drzewa adapterowego. Rozwiązanie #39\n(Po zmianie strategii Backupa, wymaga od BOATUTUp v2.9.1(https:/github.com/simatec/ioBroker.backitup) i aktywacji opcji dla ESPHome, naprawa #129",
94
- "uk": "Додано можливість очищення каналів і станів після ініціалізації пристрою, вирішує #39\nДодано кнопку на інформаційний канал, який дозволяє видалити всі offline пристрої з дерева адаптера. розчини #39\n[Breaking] Стратегія резервного копіювання змінено, вимагає [BackitUp v2.9.1](https://github.com/simatec/ioBroker.backitup) і активувати варіант для ESPHome, фіксує #129",
95
- "zh-cn": "在装置初始化后增加无用渠道和各州的清洁能力,第39号决定\n添加但道托顿以电器,使所有线装置能够从适应树中删除。 行动39\n[Breaking] Backup战略改变,要求[BackitUp v2.9.1](http://github.com/simatec/ioBroker.backitup)和“ESPHome”的主动选择,第129号行动。"
96
96
  }
97
97
  },
98
98
  "title": "Control ESPHome managed devices",
package/main.js CHANGED
@@ -179,7 +179,7 @@ class Esphome extends utils.Adapter {
179
179
  // Create a virtual environment with esphome installed.
180
180
  python = await getVenv({
181
181
  name: 'esphome',
182
- pythonVersion: '~3.13', // Use any Python 3.13.x version.
182
+ pythonVersion: '3.13.2', // Use any Python 3.13.x version.
183
183
  requirements: [{name: 'esphome', version: `==${useDashBoardVersion}`}, {name: 'pillow', version: '==10.4.0'}], // Use latest esphome
184
184
  });
185
185
  } catch (error) {
@@ -611,8 +611,9 @@ class Esphome extends utils.Adapter {
611
611
  break;
612
612
 
613
613
  case 'Cover':
614
- await this.stateSetCreate(`${clientDetails[host].deviceName}.${entity.type}.${entity.id}.position`, `Position`, 0, `%`, true);
615
- await this.stateSetCreate(`${clientDetails[host].deviceName}.${entity.type}.${entity.id}.tilt`, `Tilt`, 0, `%`, true);
614
+ // esphome send position and tilt as 0-1 value
615
+ await this.stateSetCreate(`${clientDetails[host].deviceName}.${entity.type}.${entity.id}.position`, `Position`, state.position * 100, `%`, true);
616
+ await this.stateSetCreate(`${clientDetails[host].deviceName}.${entity.type}.${entity.id}.tilt`, `Tilt`, state.tilt * 100, `%`, true);
616
617
  await this.stateSetCreate(`${clientDetails[host].deviceName}.${entity.type}.${entity.id}.stop`, `Stop`, false, ``, true);
617
618
  break;
618
619
 
@@ -641,6 +642,11 @@ class Esphome extends utils.Adapter {
641
642
  await this.handleRegularState(`${host}`, entity, state, true);
642
643
  break;
643
644
 
645
+ case 'Text': {
646
+ await this.handleRegularState(`${host}`, entity, state, true);
647
+ break;
648
+ }
649
+
644
650
  case 'Select': {
645
651
  await this.handleRegularState(`${host}`, entity, state, true);
646
652
  break;
@@ -1475,6 +1481,10 @@ class Esphome extends utils.Adapter {
1475
1481
  } else if (clientDetails[deviceIP][device[4]].type === `Number`) {
1476
1482
  await clientDetails[deviceIP].client.connection.numberCommandService({key: device[4], state: state.val});
1477
1483
 
1484
+ // Handle Text State
1485
+ } else if (clientDetails[deviceIP][device[4]].type === `Text`) {
1486
+ await clientDetails[deviceIP].client.connection.textCommandService({key: device[4], state: state.val});
1487
+
1478
1488
  // Handle Button State
1479
1489
  } else if (clientDetails[deviceIP][device[4]].type === `Button`) {
1480
1490
  await clientDetails[deviceIP].client.connection.buttonCommandService({key: device[4]});
@@ -1486,17 +1496,17 @@ class Esphome extends utils.Adapter {
1486
1496
  // Handle Cover Position
1487
1497
  } else if (device[5] === `position`) {
1488
1498
  // clientDetails[deviceIP][device[4]].states[device[5]] = state.val;
1489
- await clientDetails[deviceIP].client.connection.climateCommandService({'key': device[4], 'position': state.val});
1499
+ await clientDetails[deviceIP].client.connection.coverCommandService({'key': device[4], 'position': state.val});
1490
1500
 
1491
1501
  // Handle Cover Tilt
1492
1502
  } else if (device[5] === `tilt`) {
1493
1503
  // clientDetails[deviceIP][device[4]].states[device[5]] = state.val;
1494
- await clientDetails[deviceIP].client.connection.climateCommandService({'key': device[4], 'tilt': state.val});
1504
+ await clientDetails[deviceIP].client.connection.coverCommandService({'key': device[4], 'tilt': state.val});
1495
1505
 
1496
1506
  // Handle Cover Stop
1497
1507
  } else if (device[5] === `stop`) {
1498
1508
  // clientDetails[deviceIP][device[4]].states[device[5]] = state.val;
1499
- await clientDetails[deviceIP].client.connection.climateCommandService({'key': device[4], 'stop': true});
1509
+ await clientDetails[deviceIP].client.connection.coverCommandService({'key': device[4], 'stop': true});
1500
1510
 
1501
1511
  } else if (clientDetails[deviceIP][device[4]].type === `Light`) {
1502
1512
  let writeValue = state.val;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.esphome",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Control your ESP8266/ESP32 with simple yet powerful configuration files created and managed by ESPHome",
5
5
  "author": {
6
6
  "name": "DutchmanNL",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@2colors/esphome-native-api": "^1.3.2",
33
- "@iobroker/adapter-core": "^3.2.3",
33
+ "@iobroker/adapter-core": "^3.3.1",
34
34
  "autopy": "^1.1.1",
35
35
  "node-fetch": "^3.3.2"
36
36
  },
@@ -46,21 +46,21 @@
46
46
  "@types/chai-as-promised": "^8.0.2",
47
47
  "@types/gulp": "^4.0.17",
48
48
  "@types/mocha": "^10.0.10",
49
- "@types/node": "^22.15.21",
49
+ "@types/node": "^24.2.0",
50
50
  "@types/proxyquire": "^1.3.31",
51
51
  "@types/sinon": "^10.0.20",
52
52
  "@types/sinon-chai": "^3.2.12",
53
- "axios": "^1.9.0",
53
+ "axios": "^1.11.0",
54
54
  "chai": "^4.5.0",
55
55
  "chai-as-promised": "^7.1.2",
56
56
  "eslint": "^8.57.1",
57
57
  "gulp": "^4.0.2",
58
- "mocha": "^11.5.0",
58
+ "mocha": "^11.7.1",
59
59
  "promisify": "0.0.3",
60
60
  "proxyquire": "^2.1.3",
61
61
  "sinon": "^16.1.3",
62
62
  "sinon-chai": "^3.7.0",
63
- "typescript": "~5.8.3"
63
+ "typescript": "~5.9.2"
64
64
  },
65
65
  "main": "main.js",
66
66
  "scripts": {