Hallo zusammen,
Kleiner Vorschlag, ich weiß, dass es manchmal zu Kollisionen mit den Selectoren kommt, wenn man ein Gerät in einer Integration erstellt, das denselben Namen hat wie ein Gerät in einer anderen Integration.
Ich schlage vor, eine vierstellige Zahl am Ende jedes zukünftigen Selectors hinzuzufügen (nicht die bereits erstellten), um Kollisionen zu vermeiden, aber trotzdem einen lesbaren und « menschlich lesbaren » Selector zu behalten
Beispiel:
Name: Temperatursensor Schlafzimmer
Selector: temperatursensor-schlafzimmer-1234
Der Selector ist genauso lesbar, aber es gibt keine Kollisionen mehr.
Für mich ergibt das Sinn, es ist im Übrigen das gleiche Problem wie bei Künstlernamen oder Dashboards.
VonOx
22. Oktober 2021 um 06:18
3
Ich bin derselben Meinung wie @lmilcent
Entschuldigung @pierre-gilles , ich hatte den Zusammenhang mit dem GitHub-Issue nicht hergestellt
Vielen Dank für dein Feedback
Entwurf eines Pull Requests:
master ← add-random-string-to-selector
ouvert 10:35AM - 22 Oct 21 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?
- [ ] Are tests passing? (`npm test` on both front/server)
- [ ] Is the linter passing? (`npm run eslint` on both front/server)
- [ ] Did you run prettier? (`npm run prettier` on both front/server)
- [ ] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [ ] 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).
- [ ] Did you add fake requests data for the demo mode (`front/src/config/demo.json`) 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
Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!
(Es ist noch WIP, es muss noch viel getestet werden)
Bisher hatte ich nicht verstanden, wozu das gut sein sollte.
Und da ich in dieser Situation bin, bin ich mit deinem Vorschlag einverstanden.
Dadurch könnten wir Dashboards mit demselben Namen für mehrere Benutzer haben.