guim31
13 Diciembre, 2022 12:04
1
Actualmente, en el marco del uso de múltiples botones conectados (Xiaomi u otros), no se pueden integrar directamente en las escenas, ya que al presionarlos, lo que se recibe son cosas como:
single_left, single_right, single_both, double_left, double_right, double_both, triple_left, triple_right, triple_both, hold_left, hold_right, hold_both
Pero en las escenas, solo podemos usar esto:
Que solo permite enteros numéricos.
Por lo tanto, sería necesario poder integrar estos valores « textuales » en las escenas, sin pasar por Nodered.
VonOx
13 Diciembre, 2022 13:15
2
La PR ya está en curso por @AlexTrovato
master ← atrovato:button-click-user-friendly
ouvert 10:15AM - 04 Nov 22 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 affects code, did your 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 features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [ ] 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](https://community.gladysassistant.com/) for testing before merging.
- ~~[ ] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)~~
- ~~[ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).~~
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Override button click values by user friendly wording.
See https://community.gladysassistant.com/t/affichage-des-boutons-textuels-dans-les-scenes-et-tableau-de-bord-au-lieu-dentier/7644
#### Dashboard

#### Scene

guim31
13 Diciembre, 2022 13:44
3
¡Mierda… debería visitar GitHub con más frecuencia! (siempre que logre entender algo de ello).
@guim31 ,
¿estás de acuerdo en que se trata de la misma solicitud que creaste en noviembre de 2022?
Os advierto: probablemente haya que editar el título / mi mensaje para que sea más claro ^^
La idea es dejar de gestionar la información de los botones en forma de enteros (que no significan nada) como:
clic simple: 1
doble clic: 2
pulsación larga: 5
Cito a @pierre-gilles para que al menos él pueda entender de qué se trata:
¡Siempre he estado a favor de poner un selector (input select) para este tipo de botón en lugar de estos enteros poco amigables para el usuario!
¡A sus opiniones / id…
Como la marcaste como « resuelta », me permito cerrarla. No dudes en decírmelo si es necesario volver a abrirla, ya que la PR (que parece ser común con tu otra solicitud) aún no ha sido lanzada.