iobroker.esphome 1.0.0-beta.2 → 1.0.0

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/README.md CHANGED
@@ -440,6 +440,12 @@ If you like my work, please consider a personal donation
440
440
  ### __WORK IN PROGRESS__
441
441
  * (DutchmanNL)
442
442
  -->
443
+ ### 1.0.0 (2026-09-26) - Public Stable Release
444
+
445
+ - (@arteck) **FIXED**: A device that drops while its entities are still being announced no longer throws "Not connected", the state subscription is left to the reconnect
446
+ - (@arteck) **FIXED**: A connection loss logs one "Connection destroyed" warning per device instead of one per entity
447
+ - (@DutchmanNL) **ENHANCED**: Updated @iobroker/testing to 6.2.2 and @iobroker/adapter-core to 3.4.3
448
+ - (@DutchmanNL) **ENHANCED**: Tests now cover Node.js 22, 24 and 26 and the websocket library ws was updated to 8.21.3
443
449
 
444
450
  ### 1.0.0-beta.2 (2026-07-30)
445
451
 
@@ -477,12 +483,6 @@ If you like my work, please consider a personal donation
477
483
  - (@copilot) **FIXED**: Invalid jsonConfig warning on adapter installation
478
484
  - (DutchmanNL) **FIXED**: ESLint errors by code refactoring
479
485
 
480
- ### 0.7.0-beta.4 (2026-02-21)
481
-
482
- - (DutchmanNL) **FIXED**: ESLint errors by code refactoring
483
- - (@copilot) **FIXED**: Restore missing `configStates` option in admin UI to allow configuring whether configuration states are shown per entity
484
- - (@copilot) **NEW**: Per-device `rgbAutoWhite` toggle in the light config channel for automatic white-channel routing on RGBW lights (see [Controlling RGBW Lights](#controlling-rgbw-lights))
485
-
486
486
  [Older changelogs can be found there](CHANGELOG_OLD.md)
487
487
 
488
488
  ## License
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "esphome",
4
- "version": "1.0.0-beta.2",
4
+ "version": "1.0.0",
5
5
  "news": {
6
+ "1.0.0": {
7
+ "en": "**FIXED**: A device that drops while its entities are still being announced no longer throws \"Not connected\", the state subscription is left to the reconnect\n**FIXED**: A connection loss logs one \"Connection destroyed\" warning per device instead of one per entity\n**ENHANCED**: Updated @iobroker/testing to 6.2.2 and @iobroker/adapter-core to 3.4.3\n**ENHANCED**: Tests now cover Node.js 22, 24 and 26 and the websocket library ws was updated to 8.21.3",
8
+ "de": "**BEHOBEN**: Ein Gerät, das abbricht, während seine Entitäten noch angekündigt werden, gibt nicht mehr „Nicht verbunden“ aus, das Statusabonnement bleibt der erneuten Verbindung überlassen\n**BEHOBEN**: Bei einem Verbindungsverlust wird eine Warnung „Verbindung zerstört“ pro Gerät protokolliert statt einer pro Entität\n**VERBESSERT**: @iobroker/testing auf 6.2.2 und @iobroker/adapter-core auf 3.4.3 aktualisiert\n**VERBESSERT**: Tests decken jetzt Node.js 22, 24 und 26 ab und die Websocket-Bibliothek ws wurde auf 8.21.3 aktualisiert",
9
+ "ru": "**ИСПРАВЛЕНО**: устройство, которое отключается, пока его объекты все еще объявляются, больше не выдает сообщение «Не подключено», государственная подписка остается на повторное подключение.\n**ИСПРАВЛЕНО**: при потере соединения регистрируется одно предупреждение «Соединение разрушено» для каждого устройства вместо одного для каждого объекта.\n**УЛУЧШЕНО**: @iobroker/testing обновлен до версии 6.2.2 и @iobroker/adapter-core до версии 3.4.3.\n**УЛУЧШЕНО**: тесты теперь охватывают Node.js 22, 24 и 26, а библиотека веб-сокетов ws обновлена до версии 8.21.3.",
10
+ "pt": "**CORRIGIDO**: Um dispositivo que cai enquanto suas entidades ainda estão sendo anunciadas não gera mais \"Não conectado\", a assinatura do estado fica para a reconexão\n**CORRIGIDO**: uma perda de conexão registra um aviso de \"Conexão destruída\" por dispositivo em vez de um por entidade\n**MELHORADO**: @iobroker/testing atualizado para 6.2.2 e @iobroker/adapter-core para 3.4.3\n**MELHORADO**: Os testes agora cobrem o Node.js 22, 24 e 26 e a biblioteca websocket ws foi atualizada para 8.21.3",
11
+ "nl": "**OPGELOST**: een apparaat dat uitvalt terwijl de entiteiten nog worden aangekondigd, geeft niet langer de melding \"Niet verbonden\", het statusabonnement wordt overgelaten aan het opnieuw verbinden\n**OPGELOST**: Bij verbindingsverlies wordt één waarschuwing 'Verbinding vernietigd' per apparaat geregistreerd in plaats van één per entiteit\n**VERBETERD**: @iobroker/testing bijgewerkt naar 6.2.2 en @iobroker/adapter-core naar 3.4.3\n**VERBETERD**: tests omvatten nu Node.js 22, 24 en 26 en de websocketbibliotheek ws is bijgewerkt naar 8.21.3",
12
+ "fr": "**CORRIGÉ** : Un appareil qui tombe alors que ses entités sont encore annoncées ne lance plus \"Non connecté\", l'abonnement de l'état est laissé à la reconnexion\n**CORRIGÉ** : Une perte de connexion enregistre un avertissement « Connexion détruite » par appareil au lieu d'un par entité.\n**AMÉLIORÉ** : mise à jour de @iobroker/testing vers 6.2.2 et de @iobroker/adapter-core vers 3.4.3\n**AMÉLIORÉ** : les tests couvrent désormais Node.js 22, 24 et 26 et la bibliothèque websocket ws a été mise à jour vers 8.21.3",
13
+ "it": "**RISOLTO**: Un dispositivo che cade mentre le sue entità vengono ancora annunciate non lancia più \"Non connesso\", l'abbonamento statale viene lasciato alla riconnessione\n**RISOLTO**: una perdita di connessione registra un avviso \"Connessione distrutta\" per dispositivo anziché uno per entità\n**MIGLIORATO**: aggiornato @iobroker/testing alla 6.2.2 e @iobroker/adapter-core alla 3.4.3\n**MIGLIORATO**: i test ora coprono Node.js 22, 24 e 26 e la libreria websocket ws è stata aggiornata alla versione 8.21.3",
14
+ "es": "**CORREGIDO**: Un dispositivo que se cae mientras sus entidades aún se están anunciando ya no arroja \"No conectado\", la suscripción estatal se deja para la reconexión\n**SOLUCIONADO**: Una pérdida de conexión registra una advertencia de \"Conexión destruida\" por dispositivo en lugar de una por entidad\n**MEJORADO**: @iobroker/testing actualizado a 6.2.2 y @iobroker/adapter-core a 3.4.3\n**MEJORADO**: Las pruebas ahora cubren Node.js 22, 24 y 26 y la biblioteca websocket ws se actualizó a 8.21.3",
15
+ "pl": "**NAPRAWIONO**: Urządzenie, które zostanie utracone, gdy nadal ogłaszane są jego elementy, nie wyświetla już komunikatu „Brak połączenia”, subskrypcja stanowa pozostaje do ponownego połączenia\n**NAPRAWIONO**: W przypadku utraty połączenia rejestrowane jest jedno ostrzeżenie „Połączenie zniszczone” na każde urządzenie zamiast jednego na jednostkę\n**ULEPSZONE**: Zaktualizowano @iobroker/testing do wersji 6.2.2 i @iobroker/adapter-core do wersji 3.4.3\n**ULEPSZONE**: Testy obejmują teraz Node.js 22, 24 i 26, a biblioteka websocket ws została zaktualizowana do wersji 8.21.3",
16
+ "uk": "**ВИПРАВЛЕНО**: пристрій, який відключається, поки його об’єкти все ще оголошуються, більше не видає повідомлення «Не підключено», підписка на стан залишається для повторного підключення\n**ВИПРАВЛЕНО**: втрата з’єднання реєструє одне попередження «З’єднання зруйновано» на пристрій замість одного на об’єкт.\n**ПОКРАЩЕНО**: оновлено @iobroker/testing до 6.2.2 і @iobroker/adapter-core до 3.4.3\n**ПОКРАЩЕНО**: тепер тести охоплюють Node.js 22, 24 і 26, а бібліотеку websocket ws оновлено до 8.21.3",
17
+ "zh-cn": "**已修复**:在其实体仍在宣布时掉落的设备不再抛出“未连接”,状态订阅将留给重新连接\n**已修复**:连接丢失会为每个设备记录一个“连接已损坏”警告,而不是每个实体一个\n**增强**:将 @iobroker/testing 更新至 6.2.2,将 @iobroker/adapter-core 更新至 3.4.3\n**增强**:测试现在涵盖 Node.js 22、24 和 26,并且 websocket 库 ws 已更新至 8.21.3"
18
+ },
6
19
  "1.0.0-beta.2": {
7
20
  "en": "**FIXED**: ESPHome Dashboard 2026.6.5 and Pillow 12.2.0 are used instead of the latest available release, the 2026.7.x releases currently fail to install (#463)\n**FIXED**: Installations still set to \"Always last available\" are migrated to those versions once, so an update no longer leaves behind a dashboard that cannot be installed (#463)\n**NEW**: Selecting \"Always last available\" again is respected, the migration runs only once and such a setup only gets a warning at startup (#463)\n**FIXED**: Falling back to the latest ESPHome or Pillow release no longer aborts the dashboard setup, the requirement was passed to pip without a version specifier\n**FIXED**: Added the missing \"pingInterval\" and \"pingAttempts\" defaults to io-package.json, they were only defined in the admin configuration\n**ENHANCED**: \"npm run check\" is free of type errors, so type regressions are visible again",
8
21
  "de": "**BEHOBEN**: ESPHome Dashboard 2026.6.5 und Pillow 12.2.0 werden anstelle der neuesten verfügbaren Version verwendet, die 2026.7.x-Versionen können derzeit nicht installiert werden (#463)\n**BEHOBEN**: Installationen, die noch auf „Immer zuletzt verfügbar“ eingestellt sind, werden einmal auf diese Versionen migriert, sodass ein Update kein Dashboard mehr hinterlässt, das nicht installiert werden kann (#463)\n**NEU**: Die erneute Auswahl von „Immer zuletzt verfügbar“ wird berücksichtigt, die Migration wird nur einmal ausgeführt und ein solches Setup erhält nur beim Start eine Warnung (#463)\n**BEHOBEN**: Beim Zurückgreifen auf die neueste ESPHome- oder Pillow-Version wird die Dashboard-Einrichtung nicht mehr abgebrochen. Die Anforderung wurde ohne Versionsspezifizierer an pip übergeben\n**BEHOBEN**: Die fehlenden Standardeinstellungen „pingInterval“ und „pingAttempts“ wurden zu io-package.json hinzugefügt. Sie wurden nur in der Administratorkonfiguration definiert\n**VERBESSERT**: „npm run check“ ist frei von Typfehlern, sodass Typregressionen wieder sichtbar sind",
@@ -80,19 +93,6 @@
80
93
  "pl": "ulepszenie README\nfix # 394, actually fix # 340, # 356\n* *FIXED* *: Element wentylatora nie działa # 205 \n* *NOWOŚĆ* *: Zezwalaj na personalizację wersji Poduszki używanej przez ESPHome Dashboard, podobną do wyboru wersji ESPHome \n* *NOWOŚĆ* *: Dodaj przycisk \"Clear Autopy Cache\" w zakładce Konfiguracja tablicy rozdzielczej ESPHome, aby rozwiązać problemy z załadowaniem tablicy rozdzielczej (# 209) ",
81
94
  "uk": "покращити резюме\nвиправити #394, насправді виправити #340, #356\n**FIXED***: Компонент вентилятора не працює #205\n**NEW**: Дозволяє налаштування версії Pillow, що використовується ESPHome Dashboard, схожим на ESPHome версія selector\n**NEW**: Додати кнопку \"Зареєструвати Autopy Cache\" у вкладці конфігурації ESPHome Dashboard для вирішення проблем завантаження панелі (#209)",
82
95
  "zh-cn": "改进读取\n修复394号,实际修复340号,356号\n** FIXED**:粉丝组件不工作#205\n**NEW**:允许定制ESPHome Dashboard使用的Pillow版本,类似于ESPHome版本选择器\n**NEW**:在ESPHome Dashboard配置标签中添加\"清除自动缓存\"按钮以解决仪表板加载问题(# 209)"
83
- },
84
- "0.7.0-beta.1": {
85
- "en": "improve dashboard testing",
86
- "de": "dashboard testen",
87
- "ru": "улучшить тестирование приборной панели",
88
- "pt": "melhorar o teste do painel",
89
- "nl": "verbeteren van dashboard testen",
90
- "fr": "améliorer les essais de tableau de bord",
91
- "it": "migliorare il test del cruscotto",
92
- "es": "mejorar las pruebas de dashboard",
93
- "pl": "poprawić testowanie płyt rozdzielczych",
94
- "uk": "поліпшити тестування панелі приладів",
95
- "zh-cn": "改进仪表板测试"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/lib/helpers.js CHANGED
@@ -16,6 +16,7 @@ class DeviceInfo {
16
16
  connected = false;
17
17
  connecting = false;
18
18
  connectionError = false;
19
+ connectionDestroyedLogged = false;
19
20
  connectStatus = 'Initialisation needed';
20
21
  deletionRequested = false;
21
22
  /** @type {string | null} */
package/main.js CHANGED
@@ -639,6 +639,8 @@ class Esphome extends utils.Adapter {
639
639
  this.log.info(`ESPHome client ${host} connected`);
640
640
  // Clear possible present warning messages for devices from previous connection
641
641
  delete warnMessages[host];
642
+ // Allow the next connection-loss event to log a "Connection destroyed" warning again
643
+ clientDetails[host].connectionDestroyedLogged = false;
642
644
 
643
645
  // Check if device connection is caused by adding device from admin, if yes send OK message
644
646
  if (this.messageResponse[host]) {
@@ -919,8 +921,19 @@ class Esphome extends utils.Adapter {
919
921
 
920
922
  await this.createNonStateDevices(host, entity);
921
923
 
922
- // Request current state values
923
- await clientDetails[host].client.connection.subscribeStatesService();
924
+ // Request current state values. If the connection dropped while entities were
925
+ // still being announced, `newEntity` fires again on the stale connection and
926
+ // subscribeStatesService() throws "Not connected". Skip it silently here; the
927
+ // reconnection cycle handles the fresh subscription.
928
+ if (clientDetails[host].client.connection.connected) {
929
+ try {
930
+ await clientDetails[host].client.connection.subscribeStatesService();
931
+ } catch (e) {
932
+ this.log.debug(
933
+ `[subscribeStates] ${clientDetails[host].deviceFriendlyName}: ${e instanceof Error ? e.message : e}`,
934
+ );
935
+ }
936
+ }
924
937
  this.log.debug(
925
938
  `[DeviceInfoData] ${clientDetails[host].deviceFriendlyName} ${JSON.stringify(clientDetails[host].deviceInfo)}`,
926
939
  );
@@ -1044,6 +1057,14 @@ class Esphome extends utils.Adapter {
1044
1057
 
1045
1058
  entity.on(`destroyed`, async state => {
1046
1059
  try {
1060
+ // `destroyed` fires once per entity when the connection goes down.
1061
+ // Log only the first one per connection-loss event and let the
1062
+ // 'disconnected' handler summarize the device that went away.
1063
+ if (clientDetails[host].connectionDestroyedLogged) {
1064
+ return;
1065
+ }
1066
+ clientDetails[host].connectionDestroyedLogged = true;
1067
+
1047
1068
  const entityIdentity = entity?.name || entity?.id || host || 'unknown';
1048
1069
  if (state !== undefined) {
1049
1070
  this.log.warn(`Connection destroyed for ${state} (${entityIdentity})`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.esphome",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0",
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",
@@ -31,20 +31,20 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@2colors/esphome-native-api": "^1.3.6",
34
- "@iobroker/adapter-core": "^3.4.1",
34
+ "@iobroker/adapter-core": "^3.4.3",
35
35
  "autopy": "github:SimonFischer04/autopy#fbe016f35e13e335e1c44783a1e7273bbb2a08c1",
36
- "ws": "^8.21.1"
36
+ "ws": "^8.21.3"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@alcalzone/release-script": "^5.2.1",
40
40
  "@alcalzone/release-script-plugin-iobroker": "^5.2.0",
41
- "@alcalzone/release-script-plugin-license": "^5.2.0",
41
+ "@alcalzone/release-script-plugin-license": "^5.2.2",
42
42
  "@alcalzone/release-script-plugin-manual-review": "^5.2.0",
43
43
  "@iobroker/adapter-dev": "^1.5.0",
44
44
  "@iobroker/dev-server": "^0.8.0",
45
45
  "@iobroker/eslint-config": "^2.3.4",
46
- "@iobroker/testing": "^5.3.0",
47
- "@tsconfig/node22": "^22.0.5",
46
+ "@iobroker/testing": "^6.2.2",
47
+ "@tsconfig/node22": "^22.0.6",
48
48
  "@types/node": "^22.0.5",
49
49
  "promisify": "~0.0.3",
50
50
  "typescript": "~5.9.3"