Change location from within the binding itself

Hello! The documentation describes how a Thing can update own configuration. But is it possible to update “Description” or “Location” string ? How?

Probably it can be done, but IMO it should not be done. These are set by the user and not by the binding itself. Why do you want to do this? Maybe there is another way to achieve the same result.

The scenario is: there is a Danfoss Icon home heating controller, represented as a Bridge. There are certain number of room thermostats, connected to it. Rooms are identified by number from 0 to N and that’s all, that’s the “address”. Unfortunately beforehand it’s impossible to determine which is which.
However after making a connection it’s possible to retrieve room name from the thermostat itself. I wanted to take advantage of this. Let’s say if the user leaves “location” empty when adding the Thing, room name is retrieved and written into Location automatically.
Yes, i know, this is weird and non-typical scenario, normally the user / technician who sets up the system knows all the addresses, but this is not what Danfoss is thinking.

Sounds like a valid use case but if setting the location isn’t somehow possible, have you looked at properties?

Yes, i have. I know about properties. Location just looks appropriate.

The thing has getLocation and setLocation methods. So it is possible to set it programatically. I do that in the Niko Home Control binding:
However, the location is limited value. The only place I know it is being used is in PaperUI. And that is going away in 0H 3.0 anyway. I have not gotten to that, but is probably better to investigate metadata for this. That would not only make it available on the thing, but could propagate it to the items connected to the channels of the thing.

Okay, thank you for letting me know.
I’ll stick to property then for now.