¡Vaya, he hecho una implementación esta mañana!
Aproveché para reforzar la robustez de la integración, ya que había inestabilidades que se volvían aún más visibles con esta nueva funcionalidad.
En particular, el error del contenedor detenido: hasta ahora, en Gladys, si el contenedor Zigbee2mqtt ya estaba detenido, se emitía un error 304 y nunca se pasaba a la eliminación del contenedor. Esto se ha corregido para todas las integraciones
Lo he probado en muchos casos localmente en un mini-PC, ¡y funciona genial!
Las capturas de pantalla:
La PR:
master ← zigbee2mqtt-reset-button
ouvert 08:11AM - 06 Mar 26 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affect the code, did you write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new feature/service, did you run the integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([forum](https://community.gladysassistant.com/)) for testing before merging.
- [x] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
### Description of change
Implement https://community.gladysassistant.com/t/bouton-pour-reinitialiser-lintegration-zigbee2mqtt/10097
## Summary by CodeRabbit
* **New Features**
* Factory-reset for Zigbee2MQTT with a two-step confirmation flow (visible in local mode)
* New user-facing reset UI strings in English, French and German
* Reset action available from the integration setup (admin only)
* **Bug Fixes**
* Corrected i18n/JSON formatting for Zigbee2MQTT messages and links
* More robust cleanup handling so reset/disconnect proceeds even if containers are already stopped
* **Tests**
* Added API and unit tests covering the reset endpoint and workflow
La imagen Docker:
gladysassistant/gladys:zigbee2mqtt-reset-button
(Ya compilada en x64, en proceso de compilación para arm64)
Voy a hacer un lanzamiento esta tarde, si quieres probarlo antes, ¡es posible!