Closed darkiop closed 4 years ago
@darkiop Zeig mal bitte die raw daten eines datenpunktes der den smartName hat. Worfür ist der smartName gedacht - also wofür wird dieser verwendet?
{ "from": "system.adapter.javascript.0", "user": "system.user.admin", "ts": 1581845991786, "common": { "name": "Test-Button", "role": "button", "type": "mixed", "read": true, "write": true, "smartName": { "de": "Test-Button", "smartType": "SWITCH" } }, "native": {}, "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator", "state": 1636 }, "_id": "javascript.0.Test-Button", "type": "state" }
Mit dem smartName wird der DP direkt dem IOT Adapter zugeordnet. Du sparst dir dann das manuelle Anlegen in diesem.
Also die common werte werden beim verlinken komplett mit kopiert, d.h. wenn im parent object vorhanden, müsst es da sein.
Oder du hättest gerne das man im config screen des Adapters zwei felder hat für smarName und SmartType?
Was hat es mit der sprache zu tun "de": "Test-Button"
?
Guten Morgen, kopieren OK - schau ich mir mal an ob das funktioniert.
Meine Anfrage bezog sicher aber auf den Zustand, dass das Quellobjekt diesen SmartName nicht hat und somit durch das linked-Objekt diesen bekommen kann - denn nicht immer ist es möglich das Quell-Objekt entsprechend anzupassen.
Das mit der Sprache müsste der String sein, der dann in der Alexa-App angezeigt wird.
Gruß
In the options for the new object give the possibility to assign a SmartName directly to it.
example: createState("Test-Button", { name: 'Test-Button', "role": "button", "type": "mixed", "read": true, "write": true, "smartName": { "de": "Test-Button", "smartType": "SWITCH" } });