Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set Device Name from attribute #10

Open
ferchinas opened this issue Nov 26, 2021 · 0 comments
Open

How to set Device Name from attribute #10

ferchinas opened this issue Nov 26, 2021 · 0 comments

Comments

@ferchinas
Copy link

Hello, thank you very much for this wonderful App.
I need users to be able to change the deviceName of each of their devices.
Since I did not find a way to set the value of the "Name" or "Label" property of the devices from the dashboard. I save it in a shared attribute (so that the device can read it and show it on its screen) that the user can change it from the dashboard.

I plan to retrieve the value with the following call

var entityId = EntityId.fromTypeAndUuid (EntityType.DEVICE, device.entityId.id!);
var deviceServerAtts = tbClient.getAttributeService (). getAttributesByScope (entityId, "SHARED_SCOPE", ["config.deviceName"]);

The problem is that I don't know where to replace "Name" of the device with the value of the shared attribute "config.deviceName" in the whole App.

Can someone guide me?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant