Hola,
cuando se hace clic en Guardar en un dispositivo Z2M después de una actualización de la habitación, por ejemplo, el enlace a zigbee2mqtt desaparece hasta el próximo actualizar de la página.
¿Es este un comportamiento esperado?
No, no era mi intención. Lo miro en cuanto pueda
aquí tienes una corrección
master ← William-De71:fix/zigbee2mqtt-device-ieee-link
ouvert 01:55PM - 18 Jul 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:
- [ ] If your changes affect the code, did you write the tests?
- [ ] Are server tests passing with coverage? (`cd server && npm run coverage`) — Codecov requires **100% coverage on lines changed in this PR**
- [ ] Did Cypress E2E tests pass? (`npm run cypress:run` from repo root, if UI changed)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [ ] 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 your changes modify the API (REST or Node.js), did you modify the API documentation?
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation?
- [ ] Did you add fake requests data for the demo mode (`front/src/config/demo.js`)?
### Description of change
On the Zigbee2mqtt device page, the IEEE address field and the "Open in Zigbee2mqtt" link (added in #2488) disappeared as soon as the device was saved (e.g. after changing its room), and only came back after a full page reload.
**Why:** `ieee_address` is not stored in the Gladys database. It is enriched client-side when the device list is loaded, by matching saved devices against the devices discovered by Zigbee2mqtt. When saving a device, `saveDevice` replaces the device in the state with the raw server response, which doesn't contain `ieee_address`, so the whole block was hidden. The `model` field had the exact same issue and was already copied back after save — `ieee_address` was simply missing.
**Fix:** one line in `front/src/routes/integration/all/zigbee2mqtt/device-page/actions.js`: copy `ieee_address` from the local device to the saved device, exactly like `model`.
## Summary by CodeRabbit
* **Bug Fixes**
* Preserved Zigbee device IEEE addresses after saving, ensuring device details remain accurate in the device list.
Aprovecho para hacer una pequeña pregunta: he tenido que detener y reiniciar mi servidor varias veces últimamente debido a obras.
Cada vez tengo que restaurar una copia de seguridad de la configuración de Gladys y cada vez, los servicios se inician pero no se establece la conexión entre MQTT y ZIGBEE2MQTT. Por lo tanto, mis sensores ya no envían nada y tengo que reiniciar la integración y volver a agregar los sensores.
¿Tienen alguna pista para resolver este tipo de problema?